diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-01-29 13:51:29 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-01-29 13:51:29 (GMT) |
commit | 61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a (patch) | |
tree | ec8d1f78ce20288e0151cda3393561ed34215329 /config/gnu-flags | |
parent | 821ce6874d9e2b322dda171f95901d5f68a1c26a (diff) | |
download | hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.zip hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.tar.gz hdf5-61ab7b8bf3f15e31728ed5d4274a4e826f76ff7a.tar.bz2 |
[svn-r29016] Merge of r28936, 28949, 28960-29009 from trunk.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
autotools serial w/ Fortran and C++
autotools parallel (MPICH 3.1.4) w/ Fortran
CMake serial (3.3.2, via cmakehdf5)
Diffstat (limited to 'config/gnu-flags')
-rw-r--r-- | config/gnu-flags | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index e7f8f14..232bf05 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -97,39 +97,64 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline" # Production + # NDEBUG is handled explicitly by the configure script case "$cc_vendor-$cc_version" in gcc-[34].*) - PROD_CFLAGS="-O3" + PROD_CFLAGS= ;; gcc-5.*) - PROD_CFLAGS="-O3 -fstdarg-opt" + PROD_CFLAGS="-fstdarg-opt" ;; *) - PROD_CFLAGS="-O -finline-functions" + # gcc automatically inlines based on the optimization level + # this is just a failsafe + PROD_CFLAGS="-finline-functions" ;; esac - PROD_CPPFLAGS= # Debug + # NDEBUG is handled explicitly by the configure script + # -g is hanled by the symbols flags case "$cc_vendor-$cc_version" in gcc-5.*) - DEBUG_CFLAGS="-Og -g -ftrapv -fno-common" + DEBUG_CFLAGS="-ftrapv -fno-common" ;; *) - DEBUG_CFLAGS="-g" + DEBUG_CFLAGS= ;; esac - #DEBUG_CFLAGS="$DEBUG_CFLAGS -fsanitize=undefined" + #DEBUG_CFLAGS="-fsanitize=undefined" DEBUG_CPPFLAGS= - # Try out the new "stack protector" feature introduced in gcc 4.1 - # (We should also think about adding some of the other memory protection options) - #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" + # Symbols + SYMBOL_CFLAGS="-g" + SYMBOL_CPPFLAGS= # Profile - PROFILE_CFLAGS="-Og -g -pg" + PROFILE_CFLAGS="-pg" PROFILE_CPPFLAGS= + # Optimization (only CFLAGS at this time) + case "$cc_vendor-$cc_version" in + gcc-[34].*) + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS= + ;; + gcc-5.*) + HIGH_OPT_CFLAGS="-O3" + DEBUG_OPT_CFLAGS="-Og" + ;; + *) + HIGH_OPT_CFLAGS="-O" + DEBUG_OPT_CFLAGS= + ;; + esac + NO_OPT_CFLAGS="-O0" + + # Try out the new "stack protector" feature introduced in gcc 4.1 + # (We should also think about adding some of the other memory protection options) + #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" + # Flags are set cc_flags_set=yes ;; |