Skip to content

Commit e4fa74f

Browse files
strukturedLocutusOfBorg
authored andcommitted
configure.ac, configure:
Fix ICC compiler check too permissive (Closes: #72770) Checking the full CC (containing PATH), might lead to incorrect assumption to be detected as icc if the path contains *icc* string. Using basename fixes the dectection in a proper way
1 parent 12b5a3c commit e4fa74f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

configure

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ then
19971997
fi
19981998
fi
19991999
LLVM_PROF_ERR=no
2000-
case $CC in
2000+
case $(basename "$CC") in
20012001
*clang*)
20022002
# Any changes made here should be reflected in the GCC+Darwin case below
20032003
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
@@ -2277,7 +2277,7 @@ yes)
22772277

22782278
# ICC doesn't recognize the option, but only emits a warning
22792279
## XXX does it emit an unused result warning and can it be disabled?
2280-
AS_CASE([$CC],
2280+
AS_CASE([$(basename $CC)],
22812281
[*icc*], [ac_cv_disable_unused_result_warning=no]
22822282
[PY_CHECK_CC_WARNING([disable], [unused-result])])
22832283
AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
@@ -2519,7 +2519,7 @@ yes)
25192519
;;
25202520
esac
25212521

2522-
case "$CC" in
2522+
case $(basename "$CC") in
25232523
*icc*)
25242524
# ICC needs -fp-model strict or floats behave badly
25252525
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"

0 commit comments

Comments
 (0)