Skip to content

Commit 1fbfd96

Browse files
mjggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d516b2d commit 1fbfd96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

detect-compiler

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CC="$*"
99
#
1010
# FreeBSD clang version 3.4.1 (tags/RELEASE...)
1111
get_version_line() {
12-
$CC -v 2>&1 | grep ' version '
12+
LANG=C LC_ALL=C $CC -v 2>&1 | grep ' version '
1313
}
1414

1515
get_family() {

0 commit comments

Comments
 (0)