Skip to content

configure.ac: using $CC to check compiler names may result in erroneous judgements #96398

Description

@kanavin

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'

Linked PRs

Activity

  1. tiran commented on Aug 29, 2022

    @tiran
    Member

    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.

  2. tiran commented on Aug 29, 2022

    @tiran
    Member
  3. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    Contributor
  4. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    Contributor

    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).

  5. added a commit that references this issue on Apr 12, 2024
  6. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    Contributor

    #117815 adapts most relevant checks to use $ac_cv_cc_name. Reviews welcome!

  7. added 10 commits that reference this issue on Apr 12, 2024
  8. added 3 commits that reference this issue on Apr 17, 2024
  9. added a commit that references this issue on Nov 7, 2024
  10. erlend-aasland commented on Nov 7, 2024

    @erlend-aasland
    Contributor

    This should now be resolved. Please shout out if you still encounter problems.

  11. added a commit that references this issue on Dec 8, 2024
  12. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions