configure.ac contains multiple checks of this kind:
case $CC in
When paths contain "clang"/"gcc"/"icc", they might be part of $CC
for example because of the "--sysroot" parameter. That could cause
judgement error about clang/gcc/icc compilers. e.g.
when "icc" is containded in working path, below errors are reported when compiling python3:
x86_64-wrs-linux-gcc: error: strict: No such file or directory
x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
We are aware that the checks are problematic have already plans to replace $CC checks with $ac_cv_cc_name. It's a new variable that I introduced a short while ago.
Reacted by Erlend E. Aasland and Michael Droettboom
#110034 points out that we've got various attempts to detect the compiler version in configure. There's the $CC variable, there's $cc_is_clang, $ac_cv_cc_name, and $GCC. All four of them are used.
#110577 points out that the compiler selection check on macOS is at least partly obsolete. Perhaps that issue deserves to be re-opened and investigated on its own.
$ac_cv_cc_name was introduced by Christian in 3124d9a (PR: #93492, issue: #93491).
Activity
tiran commented on Aug 29, 2022
We are aware that the checks are problematic have already plans to replace $CC checks with $ac_cv_cc_name. It's a new variable that I introduced a short while ago.
tiran commented on Aug 29, 2022
CC @erlend-aasland @mdboom
erlend-aasland commented on Apr 12, 2024
cc. @corona10
erlend-aasland commented on Apr 12, 2024
A quick summary:
#110034 points out that we've got various attempts to detect the compiler version in configure. There's the $CC variable, there's $cc_is_clang, $ac_cv_cc_name, and $GCC. All four of them are used.
#110577 points out that the compiler selection check on macOS is at least partly obsolete. Perhaps that issue deserves to be re-opened and investigated on its own.
$ac_cv_cc_name was introduced by Christian in 3124d9a (PR: #93492, issue: #93491).
pythongh-96398: Consistently use $ac_cv_cc_name for compiler checks i…
erlend-aasland commented on Apr 12, 2024
#117815 adapts most relevant checks to use $ac_cv_cc_name. Reviews welcome!
pythongh-96398: Detect emcc and mpicc in compiler names in configure
pythongh-96398: Detect emcc and mpicc in compiler names in configure
gh-96398: Detect emcc and mpicc in compiler names in configure (#117819)
pythongh-96398: Detect GCC compatible compilers in configure
pythongh-96398: Detect GCC compatible compilers in configure
gh-96398: Detect GCC compatible compilers in configure (#117825)
pythongh-96398: Purge Emscripten code from configure.ac
pythongh-96398: Fix mpicc check in configure.ac
pythongh-96398: Fix mpicc check in configure.ac
gh-96398: Fix mpicc check in configure.ac (#117857)
pythongh-96398: Detect emcc and mpicc in compiler names in configure (p…
pythongh-96398: Detect GCC compatible compilers in configure (python#…
pythongh-96398: Fix mpicc check in configure.ac (python#117857)
gh-96398: Improve accuracy of compiler checks in configure.ac (#117815)
erlend-aasland commented on Nov 7, 2024
This should now be resolved. Please shout out if you still encounter problems.
pythongh-96398: Improve accuracy of compiler checks in configure.ac (p…
pythongh-96398: Improve accuracy of compiler checks in configure.ac (p…