[Git][ghc/ghc][master] m4: Correctly detect GCC version
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Feb 26 20:19:54 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
61a78231 by Felix Yan at 2024-02-26T15:19:14-05:00
m4: Correctly detect GCC version
When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here.
```
$ cc --version
cc (GCC) 13.2.1 20230801
...
```
This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler`
This patch makes it check for upper-cased "GCC" too so that it works correctly:
```
checking version of gcc... 13.2.1
```
- - - - -
1 changed file:
- m4/fp_gcc_version.m4
Changes:
=====================================
m4/fp_gcc_version.m4
=====================================
@@ -8,7 +8,7 @@ AC_DEFUN([FP_GCC_VERSION], [
AC_MSG_ERROR([C compiler is required])
fi
- if $CC --version | grep -q gcc; then
+ if $CC --version | grep -qi gcc; then
AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version],
[
# Be sure only to look at the first occurrence of the "version " string;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/61a78231a1d6da47073f9c309d6075d9bb3f11cb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/61a78231a1d6da47073f9c309d6075d9bb3f11cb
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240226/956563cf/attachment.html>
More information about the ghc-commits
mailing list