]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
prereq-build: add clang support 17259/head
authorRosen Penev <rosenp@gmail.com>
Thu, 28 Nov 2024 22:52:14 +0000 (14:52 -0800)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 16 Jun 2026 08:56:46 +0000 (10:56 +0200)
The Apple g++ check is really clang in disguise. Furthermore, testing on
Linux hosts reveals that clang can sufficiently replace gcc.

Minimum version of clang is 12 because of ccache.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17259
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
include/prereq-build.mk

index 9a83d6b4c3a1e4711f687cb9146dad48e88c2084..f37ea3bd086f5101791dc383ecff528351f17b92 100644 (file)
@@ -35,7 +35,8 @@ $(eval $(call SetupHostCommand,gcc, \
        Please install the GNU C Compiler (gcc) 10 or later, \
        $(CC) -dumpversion | grep -E '^(1[0-9]|[2-9][0-9])\.?', \
        gcc -dumpversion | grep -E '^(1[0-9]|[2-9][0-9])\.?', \
-       gcc --version | grep -E 'Apple.(LLVM|clang)' ))
+       clang -dumpversion | grep -E '^(1[2-9]|[2-9][0-9])\.', \
+       clang-12 -dumpversion | grep -E '^(1[2-9]|[2-9][0-9])\.' ))
 
 $(eval $(call TestHostCommand,working-gcc, \
        Please reinstall the GNU C Compiler (10 or later) - \
@@ -47,7 +48,8 @@ $(eval $(call SetupHostCommand,g++, \
        Please install the GNU C++ Compiler (g++) 10 or later, \
        $(CXX) -dumpversion | grep -E '^(1[0-9]|[2-9][0-9])\.?', \
        g++ -dumpversion | grep -E '^(1[0-9]|[2-9][0-9])\.?', \
-       g++ --version | grep -E 'Apple.(LLVM|clang)' ))
+       clang++ -dumpversion | grep -E '^(1[2-9]|[2-9][0-9])\.', \
+       clang++-12 -dumpversion | grep -E '^(1[2-9]|[2-9][0-9])\.' ))
 
 $(eval $(call TestHostCommand,working-g++, \
        Please reinstall the GNU C++ Compiler (10 or later) - \