[OpenWrt-Devel] [PATCH v2] build: make GCC version 6+ minimal host build requirement

Petr Štetiar ynezz at true.cz
Tue Nov 12 15:01:29 EST 2019


Currently minimal GNU supported GCC version is 7 (from May 2, 2017),
buildbots are using default GCC version 6 on Debian 9 (old stable),
current Debian stable has GCC version 8.3.0.

Cc: Etienne Champetier <champetier.etienne at gmail.com>
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 v2: fix regexps (champtar)

 README                  |  2 +-
 include/prereq-build.mk | 22 ++++++++--------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/README b/README
index c867c1fa4da8..6d11dd1188ff 100644
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ To build your own firmware you need a Linux, BSD or MacOSX system (case
 sensitive filesystem required). Cygwin is unsupported because of the lack
 of a case sensitive file system.
 
-You need gcc, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff,
+You need gcc6+, binutils, bzip2, flex, python3.5+, perl, make, find, grep, diff,
 unzip, gawk, getopt, subversion, libz-dev and libc headers installed.
 
 1. Run "./scripts/feeds update -a" to obtain all the latest package definitions
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 4c5991005634..2a225fc25298 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -27,12 +27,9 @@ $(eval $(call TestHostCommand,proper-umask, \
 	umask | grep -xE 0?0[012][012]))
 
 $(eval $(call SetupHostCommand,gcc, \
-	Please install the GNU C Compiler (gcc) 4.8 or later, \
-	$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
-	gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
-	gcc48 --version | grep gcc, \
-	gcc49 --version | grep gcc, \
-	gcc5 --version | grep gcc, \
+	Please install the GNU C Compiler (gcc) 6 or later, \
+	$(CC) -dumpversion | grep -E '^([6-9]\.?|[0-9]{2}\.?)', \
+	gcc -dumpversion | grep -E '^([6-9]\.?|[0-9]{2}\.?)', \
 	gcc6 --version | grep gcc, \
 	gcc7 --version | grep gcc, \
 	gcc8 --version | grep gcc, \
@@ -40,18 +37,15 @@ $(eval $(call SetupHostCommand,gcc, \
 	gcc --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-gcc, \
-	\nPlease reinstall the GNU C Compiler (4.8 or later) - \
+	\nPlease reinstall the GNU C Compiler (6 or later) - \
 	it appears to be broken, \
 	echo 'int main(int argc, char **argv) { return 0; }' | \
 		gcc -x c -o $(TMP_DIR)/a.out -))
 
 $(eval $(call SetupHostCommand,g++, \
-	Please install the GNU C++ Compiler (g++) 4.8 or later, \
-	$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
-	g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
-	g++48 --version | grep g++, \
-	g++49 --version | grep g++, \
-	g++5 --version | grep g++, \
+	Please install the GNU C++ Compiler (g++) 6 or later, \
+	$(CXX) -dumpversion | grep -E '^([6-9]\.?|[0-9]{2}\.?)', \
+	g++ -dumpversion | grep -E '^([6-9]\.?|[0-9]{2}\.?)', \
 	g++6 --version | grep g++, \
 	g++7 --version | grep g++, \
 	g++8 --version | grep g++, \
@@ -59,7 +53,7 @@ $(eval $(call SetupHostCommand,g++, \
 	g++ --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-g++, \
-	\nPlease reinstall the GNU C++ Compiler (4.8 or later) - \
+	\nPlease reinstall the GNU C++ Compiler (6 or later) - \
 	it appears to be broken, \
 	echo 'int main(int argc, char **argv) { return 0; }' | \
 		g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list