Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(30)

Unified Diff: configure.ac

Issue 25827: Support ICC in configure
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | .gitignore » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- 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
« no previous file with comments | « no previous file | .gitignore » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+