Repository navigation
configure.ac: using $CC to check compiler names may result in erroneous judgements #96398
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Aug 29, 2022 We are aware that the checks are problematic have already plans to replace
$CCchecks 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- addedbuildThe build process and cross-buildThe build process and cross-build
on Nov 23, 2023 cc. @corona10
A quick summary:
#110034 points out that we've got various attempts to detect the compiler version in configure. There's the
$CCvariable, 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_namewas introduced by Christian in 3124d9a (PR: #93492, issue: #93491).#117815 adapts most relevant checks to use
$ac_cv_cc_name. Reviews welcome!- added 10 commits that reference this issue
on Apr 12, 2024 This should now be resolved. Please shout out if you still encounter problems.
configure.ac contains multiple checks of this kind:
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'
Linked PRs