diff options
author | John Micco <jmicco@users.noreply.github.com> | 2023-08-27 21:07:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-27 21:07:09 (GMT) |
commit | fecb9faf0b2df6a219696502a34b918c5d2bfe9d (patch) | |
tree | 83ab35ad3f8501fb2f8e831ef46c0d6e153297d0 /configure | |
parent | 38afa4af9bfc8297a5ee270c37f3f120a04297ea (diff) | |
download | cpython-fecb9faf0b2df6a219696502a34b918c5d2bfe9d.zip cpython-fecb9faf0b2df6a219696502a34b918c5d2bfe9d.tar.gz cpython-fecb9faf0b2df6a219696502a34b918c5d2bfe9d.tar.bz2 |
gh-108465: Use compiler basename when determining compiler flags (#108392)
Note:
GNU Autoconf discourages the use of 'basename', and recommends 'expr' instead.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -8562,7 +8562,10 @@ printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;} fi fi LLVM_PROF_ERR=no -case $CC in + +# GNU Autoconf recommends the use of expr instead of basename. +CC_BASENAME=$(expr "//$CC" : '.*/\(.*\)') +case "$CC_BASENAME" in *clang*) # Any changes made here should be reflected in the GCC+Darwin case below PGO_PROF_GEN_FLAG="-fprofile-instr-generate" @@ -9391,7 +9394,7 @@ fi # ICC doesn't recognize the option, but only emits a warning ## XXX does it emit an unused result warning and can it be disabled? - case $CC in #( + case "$CC_BASENAME" in #( *icc*) : ac_cv_disable_unused_result_warning=no @@ -9972,7 +9975,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ ;; esac -case "$CC" in +case "$CC_BASENAME" in *mpicc*) CFLAGS_NODIST="$CFLAGS_NODIST" ;; |