From: Michael J Gruber Date: Mon, 9 May 2022 11:22:02 +0000 (+0200) Subject: detect-compiler: make detection independent of locale X-Git-Tag: v2.37.0-rc0~74^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fbfd96f50971ed7ca4cae4957ffe10f2441d49f;p=thirdparty%2Fgit.git detect-compiler: make detection independent of locale `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 Signed-off-by: Junio C Hamano --- diff --git a/detect-compiler b/detect-compiler index 11d60da5b7..50087f5670 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 LC_ALL=C $CC -v 2>&1 | grep ' version ' } get_family() {