Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5e0ab50

Browse files
committedApr 12, 2024··
pythongh-96398: Detect emcc and mpicc in compiler names in configure
1 parent 39a6b29 commit 5e0ab50

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed
 

‎configure

+7-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac

+7-2
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,9 @@ dnl check for GCC last, other compilers set __GNUC__, too.
992992
dnl msvc is listed for completeness.
993993
AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [
994994
cat > conftest.c <<EOF
995-
#if defined(__INTEL_COMPILER) || defined(__ICC)
995+
#if defined(__EMSCRIPTEN__)
996+
emcc
997+
#elif defined(__INTEL_COMPILER) || defined(__ICC)
996998
icc
997999
#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
9981000
xlc
@@ -1009,6 +1011,9 @@ EOF
10091011
10101012
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
10111013
ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
1014+
if $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then
1015+
ac_cv_cc_name="mpicc"
1016+
fi
10121017
else
10131018
ac_cv_cc_name="unknown"
10141019
fi
@@ -1939,7 +1944,7 @@ if test "$Py_LTO" = 'true' ; then
19391944
;;
19401945
esac
19411946
;;
1942-
*emcc*)
1947+
emcc)
19431948
if test "$Py_LTO_POLICY" != "default"; then
19441949
AC_MSG_ERROR([emcc supports only default lto.])
19451950
fi

0 commit comments

Comments
 (0)