diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2015-12-21 18:09:17 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2015-12-21 18:09:17 (GMT) |
commit | 5af856404afc1b1e6b9dd4ac86a5771a407cbc6a (patch) | |
tree | 7519777e6aba9ce82c5eb88ed2e3c0b815698326 /configure.ac | |
parent | 66c08d90f6d7e5889a19891a0ef994354b14f172 (diff) | |
download | cpython-5af856404afc1b1e6b9dd4ac86a5771a407cbc6a.zip cpython-5af856404afc1b1e6b9dd4ac86a5771a407cbc6a.tar.gz cpython-5af856404afc1b1e6b9dd4ac86a5771a407cbc6a.tar.bz2 |
Issue #25827: Add support for ICC to configure
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 694293e..94632f2 100644 --- a/configure.ac +++ b/configure.ac @@ -593,6 +593,22 @@ AC_ARG_WITH(gcc, esac]) AC_MSG_RESULT($without_gcc) +AC_MSG_CHECKING(for --with-icc) +AC_ARG_WITH(icc, + AS_HELP_STRING([--with-icc], [build with icc]), +[ + case $withval in + no) CC=${CC:-cc} + with_icc=no;; + yes) CC=icc + CXX=icpc + with_icc=yes;; + *) CC=$withval + with_icc=$withval;; + esac], [ + with_icc=no]) +AC_MSG_RESULT($with_icc) + # If the user switches compilers, we can't believe the cache if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" then @@ -699,6 +715,7 @@ then 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]) ;; + icc|*/icc) AC_PATH_TOOL(CXX, [icpc], [icpc], [notfound]) ;; esac if test "$CXX" = "notfound" then @@ -1259,6 +1276,12 @@ case $CC in ;; esac ;; + *icc*) + PGO_PROF_GEN_FLAG="-prof-gen" + PGO_PROF_USE_FLAG="-prof-use" + LLVM_PROF_MERGER="true" + LLVM_PROF_FILE="" + ;; esac # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be @@ -1370,6 +1393,13 @@ yes) BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" fi + # ICC doesn't recognize the option, but only emits a warning + ## XXX does it emit an unused result warning and can it be disabled? + case "$CC" in + *icc*) + ac_cv_disable_unused_result_warning=no + ;; + *) AC_MSG_CHECKING(if we can turn off $CC unused result warning) ac_save_cc="$CC" CC="$CC -Wunused-result -Werror" @@ -1386,6 +1416,8 @@ yes) CFLAGS="$save_CFLAGS" CC="$ac_save_cc" AC_MSG_RESULT($ac_cv_disable_unused_result_warning) + ;; + esac if test $ac_cv_disable_unused_result_warning = yes then @@ -1608,6 +1640,13 @@ yes) ;; esac +# ICC needs -fp-model strict or floats behave badly +case "$CC" in +*icc*) + CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" + ;; +esac + if test "$Py_DEBUG" = 'true'; then : else |