diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-05 23:20:48 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-06-05 23:20:48 (GMT) |
commit | 60aebe36b64de110a2a73bc66726e77fba299711 (patch) | |
tree | acdaa3051f84ec4657730ec62ec1b4b90aa6c044 /config | |
parent | 52ac99827b3bfa89f4fcf3539d58debeaa73bd36 (diff) | |
download | hdf5-60aebe36b64de110a2a73bc66726e77fba299711.zip hdf5-60aebe36b64de110a2a73bc66726e77fba299711.tar.gz hdf5-60aebe36b64de110a2a73bc66726e77fba299711.tar.bz2 |
[svn-r30015] Description:
Update GNU compiler flags for 6.x release.
Tested on:
MacOSX/64 10.11.5 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'config')
-rw-r--r-- | config/gnu-cxxflags | 8 | ||||
-rw-r--r-- | config/gnu-flags | 122 |
2 files changed, 101 insertions, 29 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index f87ef8e..46fd048 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -105,7 +105,7 @@ case "$cxx_vendor-$cxx_version" in g++-[34].*) PROD_CXXFLAGS= ;; - g++-5.*) + g++-[56].*) PROD_CXXFLAGS="-fstdarg-opt" ;; *) @@ -117,7 +117,7 @@ case "$cxx_vendor-$cxx_version" in # NDEBUG is handled explicitly by the configure script # -g is hanled by the symbols flags case "$cxx_vendor-$cxx_version" in - g++-5.*) + g++-[56].*) DEBUG_CXXFLAGS="-ftrapv -fno-common" ;; *) @@ -138,7 +138,7 @@ case "$cxx_vendor-$cxx_version" in HIGH_OPT_CXXFLAGS="-O3" DEBUG_OPT_CXXFLAGS= ;; - g++-5.*) + g++-[56].*) HIGH_OPT_CXXFLAGS="-O3" DEBUG_OPT_CXXFLAGS="-Og" ;; @@ -163,7 +163,7 @@ case "$cxx_vendor-$cxx_version" in # Closer to the g++ 5.2 release, we should check for additional flags to # include and break it out into it's own section, like the other versions # below. -QAK - g++-5*) + g++-[56]*) # Append warning flags from gcc-3* case H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute" diff --git a/config/gnu-flags b/config/gnu-flags index 87aef3a..5fdd78e 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -102,7 +102,7 @@ case "$cc_vendor-$cc_version" in gcc-[34].*) PROD_CFLAGS= ;; - gcc-5.*) + gcc-[56].*) PROD_CFLAGS="-fstdarg-opt" ;; *) @@ -116,7 +116,7 @@ case "$cc_vendor-$cc_version" in # NDEBUG is handled explicitly by the configure script # -g is hanled by the symbols flags case "$cc_vendor-$cc_version" in - gcc-5.*) + gcc-[56].*) DEBUG_CFLAGS="-ftrapv -fno-common" ;; *) @@ -138,7 +138,7 @@ case "$cc_vendor-$cc_version" in HIGH_OPT_CFLAGS="-O3" DEBUG_OPT_CFLAGS= ;; - gcc-5.*) + gcc-[56].*) HIGH_OPT_CFLAGS="-O3" DEBUG_OPT_CFLAGS="-Og" ;; @@ -164,10 +164,10 @@ esac # the information from the previous version and adding modifications to that. case "$cc_vendor-$cc_version" in -# Closer to the gcc 5.2 release, we should check for additional flags to +# When the gcc 7.x release is out, we should check for additional flags to # include and break it out into it's own section, like the other versions # below. -QAK - gcc-5*) + gcc-6*) # Append warning flags # Don't use the '-Wtraditional' flag, we're way past having K&R C code # H5_CFLAGS="$H5_CFLAGS -Wtraditional" @@ -205,10 +205,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -232,11 +232,83 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format" # Append more extra warning flags that only gcc 4.9+ know about - H5_CFLAGS="$H5_CFLAGS -Wdate-time -Wopenmp-simd" + H5_CFLAGS="$H5_CFLAGS -Wdate-time" + + # Append more extra warning flags that only gcc 5.x+ know about + H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat" + + # Append more extra warning flags that only gcc 6.x+ know about + H5_CFLAGS="$H5_CFLAGS -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa" + ;; + + gcc-5*) + # Append warning flags + # Don't use the '-Wtraditional' flag, we're way past having K&R C code + # H5_CFLAGS="$H5_CFLAGS -Wtraditional" + # Don't use the '-Wtraditional-conversion' flag, there's too many warnings + # from GCC's assert macro + # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" + + # Append warning flags from gcc-3* case + # (don't use -Wpadded flag for normal builds, many of the warnings its + # issuing can't be fixed and they are making it hard to detect other, + # more important warnings) + #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" + H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" + + # Append warning flags from gcc-3.2* case + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" + + # Enable more format checking flags, beyond the basic -Wformat included + # in -Wall + H5_CFLAGS="$H5_CFLAGS -Wformat=2" + + # The "unreachable code" warning appears to be reliable now... + H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" + + # Append warning flags from gcc-3.3* case + H5_CFLAGS="$H5_CFLAGS -Wendif-labels" + + # Append warning flags from gcc-3.4* case + H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" - # (There was no release of gcc 5.0) + # Replace old -W flag with new -Wextra flag + H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" + + # Append more extra warning flags that only gcc4.0+ know about + H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" - # Append more extra warning flags that only gcc 5.1+ know about + # Append more extra warning flags that only gcc 4.1+ know about + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" + + # Append more extra warning flags that only gcc 4.2+ know about + # (none, or incorporated in -Wall / -Wextra now) + + # Append more extra warning flags that only gcc 4.3+ know about + # + # Technically, variable-length arrays are part of the C99 standard, but + # we should approach them a bit cautiously... -QAK + H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" + + # Append more extra warning flags that only gcc 4.4+ know about + H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" + + # Append more extra warning flags that only gcc 4.5+ know about + H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" + + # Append more extra warning flags that only gcc 4.6+ know about + H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines" + + # Append more extra warning flags that only gcc 4.7+ know about + H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" + + # Append more extra warning flags that only gcc 4.8+ know about + H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format" + + # Append more extra warning flags that only gcc 4.9+ know about + H5_CFLAGS="$H5_CFLAGS -Wdate-time" + + # Append more extra warning flags that only gcc 5.x+ know about H5_CFLAGS="$H5_CFLAGS -Warray-bounds=2 -Wc99-c11-compat" ;; @@ -278,10 +350,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -305,7 +377,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format" # Append more extra warning flags that only gcc 4.9+ know about - H5_CFLAGS="$H5_CFLAGS -Wdate-time -Wopenmp-simd" + H5_CFLAGS="$H5_CFLAGS -Wdate-time" ;; gcc-4.8*) @@ -346,10 +418,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -412,10 +484,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -471,10 +543,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -527,10 +599,10 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + # (none, or incorporated in -Wall / -Wextra now) # Append more extra warning flags that only gcc 4.3+ know about # @@ -579,7 +651,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized" # Append more extra warning flags that only gcc 4.2+ know about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" @@ -628,7 +700,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized -Wvolatile-register-var" # Append more extra warning flags that only gcc 4.2+ know about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" @@ -674,7 +746,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized -Wvolatile-register-var" # Append more extra warning flags that only gcc 4.2+ know about H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" @@ -714,7 +786,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" # Append more extra warning flags that only gcc 4.1+ know about - H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wnormalized -Wvolatile-register-var" ;; gcc-4.0*) |