summaryrefslogtreecommitdiff
path: root/detect-compiler
diff options
context:
space:
mode:
authorMichael J Gruber <git@grubix.eu>2022-05-09 11:22:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-05-09 15:52:26 (GMT)
commit1fbfd96f50971ed7ca4cae4957ffe10f2441d49f (patch)
tree8d6720535886c0a3ed560862ba51770c1a169fa3 /detect-compiler
parentd516b2db0af2221bd6b13e7347abdcb5830b2829 (diff)
downloadgit-1fbfd96f50971ed7ca4cae4957ffe10f2441d49f.zip
git-1fbfd96f50971ed7ca4cae4957ffe10f2441d49f.tar.gz
git-1fbfd96f50971ed7ca4cae4957ffe10f2441d49f.tar.bz2
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 <git@grubix.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'detect-compiler')
-rwxr-xr-xdetect-compiler2
1 files changed, 1 insertions, 1 deletions
diff --git a/detect-compiler b/detect-compiler
index 11d60da..50087f5 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() {