From: Rosen Penev Date: Thu, 28 Nov 2024 22:52:14 +0000 (-0800) Subject: prereq-build: add clang support X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17259%2Fhead;p=thirdparty%2Fopenwrt.git prereq-build: add clang support 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 Link: https://github.com/openwrt/openwrt/pull/17259 Signed-off-by: Jonas Jelonek --- diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 9a83d6b4c3a..f37ea3bd086 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -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) - \