diff options
Diffstat (limited to 'config/intel-flags')
-rw-r--r-- | config/intel-flags | 66 |
1 files changed, 40 insertions, 26 deletions
diff --git a/config/intel-flags b/config/intel-flags index 139ea49..100e68a 100644 --- a/config/intel-flags +++ b/config/intel-flags @@ -18,7 +18,7 @@ # # -# Prepend `$srcdir/config/intel-` to the filename suffix(es) given as +# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as # subroutine argument(s), remove comments starting with # and ending # at EOL, replace spans of whitespace (including newlines) with spaces, # and re-emit the file(s) thus filtered on the standard output stream. @@ -26,7 +26,7 @@ load_intel_arguments() { set -- $(for arg; do - sed 's,#.*$,,' $srcdir/config/intel-${arg} + sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} done) IFS=' ' echo "$*" } @@ -81,49 +81,63 @@ if test "X-icc" = "X-$cc_vendor"; then # General # Default to C99 standard. H5_CFLAGS="$H5_CFLAGS $arch -std=c99" - H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments warnings-general)" - # Production is set to default; see settings for specific version further down - PROD_CFLAGS="-O" - PROD_CPPFLAGS= + # Production + PROD_CFLAGS= # Debug - DEBUG_CFLAGS="-Wcheck -Wall -g -O0" - DEBUG_CPPFLAGS= + # NDEBUG is handled explicitly in configure + DEBUG_CFLAGS= - # Profile + # Symbols + SYMBOLS_CFLAGS="-g" + NO_SYMBOLS_CFLAGS="-Wl,-s" + + # Profiling # Use this for profiling with gprof - PROFILE_CFLAGS="-g -p" - PROFILE_CPPFLAGS= + PROFILE_CFLAGS="-p" - # Flags are set - cc_flags_set=yes + # Optimization + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS="-O0" + NO_OPT_CFLAGS="-O0" -fi + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general)" + + ############################# + # Version-specific warnings # + ############################# -# Version specific ICC flags -# -# Please follow the pattern below by adding new versions at the top, copying -# the information from the previous version and adding modifications to that. -# The default at the bottom will apply if no earlier version matches. case "$cc_vendor-$cc_version" in icc-1[5-6]*) H5_CFLAGS="$H5_CFLAGS -Wcomment -Wdeprecated -Wextra-tokens -Wformat -Wformat-security -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-variable -Wwrite-strings" ;; icc-10*) - PROD_CFLAGS="-O1 -Wl,-s" + HIGH_OPT_CFLAGS="-O1" ;; icc-8.0*) - # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. - PROD_CFLAGS="-O2 -Wl,-s" - ;; + # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. + HIGH_OPT_CFLAGS="-O2" + ;; icc-*) - # -s became obsolete; we also fixed bugs that allow us to enable higher level - # of optimization starting with 1.8.7 - PROD_CFLAGS="-O3" ;; esac + ################# + # Flags are set # + ################# + cc_flags_set=yes + +fi + # Clear cc info if no flags set if test "X-$cc_flags_set" = "X-"; then cc_vendor= |