Skip to content

Commit cbe4977

Browse files
authored
gh-152902: Add Intel icx compiler to configure.ac (GH-152825)
1 parent a2581eb commit cbe4977

3 files changed

Lines changed: 135 additions & 10 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Added Intel ``icx`` compiler support to ``configure.ac``. Contributed by
2+
High Performance Kernels LLC.

configure

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

configure.ac

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,8 @@ AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [
10961096
cat > conftest.c <<EOF
10971097
#if defined(__EMSCRIPTEN__)
10981098
emcc
1099+
#elif defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
1100+
icx
10991101
#elif defined(__INTEL_COMPILER) || defined(__ICC)
11001102
icc
11011103
#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
@@ -1145,8 +1147,9 @@ then
11451147
case "$ac_cv_cc_name" in
11461148
gcc) AC_PATH_TOOL([CXX], [g++], [notfound]) ;;
11471149
cc) AC_PATH_TOOL([CXX], [c++], [notfound]) ;;
1148-
clang) AC_PATH_TOOL([CXX], [clang++], [notfound]) ;;
1149-
icc) AC_PATH_TOOL([CXX], [icpc], [notfound]) ;;
1150+
clang) AC_PATH_TOOL([CXX], [clang++], [notfound]) ;;
1151+
icx) AC_PATH_TOOL([CXX], [icpx], [notfound]) ;;
1152+
icc) AC_PATH_TOOL([CXX], [icpc], [notfound]) ;;
11501153
esac
11511154
if test "$CXX" = "notfound"
11521155
then
@@ -2091,7 +2094,7 @@ fi
20912094
LLVM_PROF_ERR=no
20922095

20932096
case "$ac_cv_cc_name" in
2094-
clang)
2097+
clang|icx)
20952098
# Any changes made here should be reflected in the GCC+Darwin case below
20962099
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
20972100
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
@@ -2969,6 +2972,10 @@ case "$ac_cv_cc_name" in
29692972
mpicc)
29702973
CFLAGS_NODIST="$CFLAGS_NODIST"
29712974
;;
2975+
icx)
2976+
# ICX needs fp-model=precise (the default in clang) or floats behave badly
2977+
CFLAGS_NODIST="$CFLAGS_NODIST -ffp-model=precise"
2978+
;;
29722979
icc)
29732980
# ICC needs -fp-model strict or floats behave badly
29742981
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
@@ -6345,8 +6352,8 @@ AX_C_FLOAT_WORDS_BIGENDIAN(
63456352
# rounding precision of 64 bits. For gcc/x86, we can fix this by
63466353
# using inline assembler to get and set the x87 FPU control word.
63476354

6348-
# This inline assembler syntax may also work for suncc and icc,
6349-
# so we try it on all platforms.
6355+
# This inline assembler syntax works for icx and may also work for
6356+
# suncc and icc, so we try it on all platforms.
63506357

63516358
AC_CACHE_CHECK([whether we can use gcc inline assembler to get and set x87 control word], [ac_cv_gcc_asm_for_x87], [
63526359
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[

0 commit comments

Comments
 (0)