diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-12 14:33:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 14:33:29 (GMT) |
commit | 4ce10da36ff4c29dbf2cc40ebfcbcd260b635e05 (patch) | |
tree | 60ae0d051a319d48f778d28baab116168e84e548 /configure.ac | |
parent | 2d3d9b4461d0e2cb475014868af3c2f241cb6495 (diff) | |
download | cpython-4ce10da36ff4c29dbf2cc40ebfcbcd260b635e05.zip cpython-4ce10da36ff4c29dbf2cc40ebfcbcd260b635e05.tar.gz cpython-4ce10da36ff4c29dbf2cc40ebfcbcd260b635e05.tar.bz2 |
gh-96398: Detect emcc and mpicc in compiler names in configure (#117819)
- emcc defines __EMSCRIPTEN__
- mpicc doesn't define anything in particular; detect it using basename
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ece3fe7..35b3a4e 100644 --- a/configure.ac +++ b/configure.ac @@ -992,7 +992,9 @@ dnl check for GCC last, other compilers set __GNUC__, too. dnl msvc is listed for completeness. AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [ cat > conftest.c <<EOF -#if defined(__INTEL_COMPILER) || defined(__ICC) +#if defined(__EMSCRIPTEN__) + emcc +#elif defined(__INTEL_COMPILER) || defined(__ICC) icc #elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__) xlc @@ -1009,6 +1011,9 @@ EOF if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` + if $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then + ac_cv_cc_name="mpicc" + fi else ac_cv_cc_name="unknown" fi |