Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-96398: python3: use cc_basename instead of CC when checking binary name #96399

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use cc_basename instead of CC in configure.ac when checking binary name.
19 changes: 10 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ AC_CONFIG_HEADERS([pyconfig.h])
AC_CANONICAL_HOST
AC_SUBST(build)
AC_SUBST(host)
LT_INIT

AS_VAR_IF([cross_compiling], [maybe],
[AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])]
Expand Down Expand Up @@ -879,7 +880,7 @@ AC_SUBST(CXX)
preset_cxx="$CXX"
if test -z "$CXX"
then
case "$CC" in
case "$cc_basename" in
gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
Expand Down Expand Up @@ -1292,7 +1293,7 @@ rmdir CaseSensitiveTestDir

case $ac_sys_system in
hp*|HP*)
case $CC in
case $cc_basename in
cc|*/cc) CC="$CC -Ae";;
esac;;
esac
Expand Down Expand Up @@ -1826,7 +1827,7 @@ esac
],
[AC_MSG_RESULT(no)])
if test "$Py_LTO" = 'true' ; then
case $CC in
case $cc_basename in
*clang*)
dnl flag to disable lto during linking
LDFLAGS_NOLTO="-fno-lto"
Expand Down Expand Up @@ -1998,7 +1999,7 @@ then
fi
fi
LLVM_PROF_ERR=no
case $CC in
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"
Expand Down Expand Up @@ -2059,7 +2060,7 @@ esac
# compiler and platform. BASECFLAGS tweaks need to be made even if the
# user set OPT.

case $CC in
case $cc_basename in
*clang*)
cc_is_clang=1
;;
Expand Down Expand Up @@ -2278,7 +2279,7 @@ yes)

# ICC doesn't recognize the option, but only emits a warning
## XXX does it emit an unused result warning and can it be disabled?
AS_CASE([$CC],
AS_CASE([$cc_basename],
[*icc*], [ac_cv_disable_unused_result_warning=no]
[PY_CHECK_CC_WARNING([disable], [unused-result])])
AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
Expand Down Expand Up @@ -2520,7 +2521,7 @@ yes)
;;
esac

case "$CC" in
case "$cc_basename" in
*icc*)
# ICC needs -fp-model strict or floats behave badly
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
Expand Down Expand Up @@ -3389,7 +3390,7 @@ then
then
LINKFORSHARED="-Wl,--export-dynamic"
fi;;
SunOS/5*) case $CC in
SunOS/5*) case $cc_basename in
*gcc*)
if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
then
Expand Down Expand Up @@ -6650,7 +6651,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then
# Some versions of gcc miscompile inline asm:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
# http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
case $CC in
case $cc_basename in
*gcc*)
AC_MSG_CHECKING(for gcc ipa-pure-const bug)
saved_cflags="$CFLAGS"
Expand Down