[PATCH] detect-compiler: make detection independent of locale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`detect-compiler` has accumulated a few compiler dependent workarounds
lately for the more and more ubiquitious gcc12. This is intended to make
CI set-ups work across tool-chain updates, but also help those
developers who build with `DEVELOPER=1`.

Alas, `detect-compiler` uses the locale dependent output of `$(CC) -v`
to parse for the version string, which fails unless it literally
contains ` version`.

Use `LANG=C $(CC) -v` instead to grep for stable output.

Signed-off-by: Michael J Gruber <git@xxxxxxxxx>
---
Sorry for not checking the ML before sending the previous patches. I
know now that the dir.c warning is a false psoitive and http.c's use of
stack variables and globals is a mess ;)

To my excuse: Over here, the problem with the warnings was made worse
because `DEVELOPER=1` turned them into errors for reasons fixed by this
patch ...

 detect-compiler | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/detect-compiler b/detect-compiler
index 11d60da5b7..473f3bd4fe 100755
--- a/detect-compiler
+++ b/detect-compiler
@@ -9,7 +9,7 @@ CC="$*"
 #
 # FreeBSD clang version 3.4.1 (tags/RELEASE...)
 get_version_line() {
-	$CC -v 2>&1 | grep ' version '
+	LANG=C $CC -v 2>&1 | grep ' version '
 }
 
 get_family() {
-- 
2.36.1.512.g0d1bd43151




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux