diff -r cca2ed4e8b41 .gitignore --- a/.gitignore Thu Dec 17 10:35:05 2015 +0000 +++ b/.gitignore Thu Dec 17 11:22:40 2015 -0600 @@ -14,6 +14,7 @@ *.gc?? *.profclang? *.profraw +*.dyn .gdb_history Doc/build/ Doc/venv/ diff -r cca2ed4e8b41 .hgignore --- a/.hgignore Thu Dec 17 10:35:05 2015 +0000 +++ b/.hgignore Thu Dec 17 11:22:40 2015 -0600 @@ -53,6 +53,7 @@ *.gc?? *.profclang? *.profraw +*.dyn Lib/distutils/command/*.pdb Lib/lib2to3/*.pickle Lib/test/data/* diff -r cca2ed4e8b41 Makefile.pre.in --- a/Makefile.pre.in Thu Dec 17 10:35:05 2015 +0000 +++ b/Makefile.pre.in Thu Dec 17 11:22:40 2015 -0600 @@ -1593,6 +1593,7 @@ profile-removal: find . -name '*.gc??' -exec rm -f {} ';' find . -name '*.profclang?' -exec rm -f {} ';' + find . -name '*.dyn' -exec rm -f {} ';' rm -f $(COVERAGE_INFO) rm -rf $(COVERAGE_REPORT) diff -r cca2ed4e8b41 configure.ac --- a/configure.ac Thu Dec 17 10:35:05 2015 +0000 +++ b/configure.ac Thu Dec 17 11:22:40 2015 -0600 @@ -593,6 +593,22 @@ 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 @@ 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 @@ ;; 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 @@ 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 @@ 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 @@ ;; 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