diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/gnu-flags | 130 | ||||
-rw-r--r-- | config/lt_vers.am | 2 |
2 files changed, 117 insertions, 15 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index 401bafe..a8e16cb 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -138,7 +138,7 @@ case "$cc_vendor-$cc_version" in esac # General - H5_CFLAGS="$H5_CFLAGS $arch -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline" + H5_CFLAGS="$H5_CFLAGS $arch -ansi -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 case "$cc_vendor-$cc_version" in @@ -187,7 +187,7 @@ case "$cc_vendor-$cc_version" in # Closer to the gcc 4.4 release, we should check for additional flags to # include and break it out into it's own section, like the other versions # below. -QAK - gcc-4.[123]*) + gcc-4.3*) # Replace -ansi flag with -std=c99 flag H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" @@ -202,13 +202,13 @@ case "$cc_vendor-$cc_version" in 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 -Wmultichar" + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" - # Enable mort format checking flags, beyond the basic -Wformat included + # Enable more format checking flags, beyond the basic -Wformat included # in -Wall - H5_CFLAGS="$H5_CFLAGS -Wformat-nonliteral -Wformat-security -Wformat-y2k" + H5_CFLAGS="$H5_CFLAGS -Wformat=2" - # The "unreachable code" warning does not appear to be reliable yet... + # The "unreachable code" warning appears to be reliable now... H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" # Append warning flags from gcc-3.3* case @@ -221,9 +221,111 @@ case "$cc_vendor-$cc_version" in 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 -Wmissing-field-initializers -Wvariadic-macros" + 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 gcc4.1+ know about + # Append more extra warning flags that only gcc 4.1+ know about + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat -Wvolatile-register-var" + + # Append more extra warning flags that only gcc 4.2+ know about + H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + + # 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 -Wvla" + + # Try out the new "stack protector" feature in gcc 4.1 + # (Strictly speaking this isn't really a "warning" flag, so it's added to + # the debugging flags) + #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" + ;; + + gcc-4.2*) + # Replace -ansi flag with -std=c99 flag + H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" + + # Disable warnings about using 'long long' type + H5_CFLAGS="$H5_CFLAGS -Wno-long-long" + + # 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 does not appear to be reliable yet... + 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" + + # 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 gcc 4.0+ know about + 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" + + # Append more extra warning flags that only gcc 4.2+ know about + H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + + # Try out the new "stack protector" feature in gcc 4.1 + # (Strictly speaking this isn't really a "warning" flag, so it's added to + # the debugging flags) + #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" + ;; + + gcc-4.1*) + # Replace -ansi flag with -std=c99 flag + H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" + + # Disable warnings about using 'long long' type + H5_CFLAGS="$H5_CFLAGS -Wno-long-long" + + # 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 does not appear to be reliable yet... + 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" + + # 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 gcc 4.0+ know about + 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" # Try out the new "stack protector" feature in gcc 4.1 @@ -247,7 +349,7 @@ case "$cc_vendor-$cc_version" in 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 -Wmultichar" + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" # The "format=2" warning generates too many warnings about valid # usage in the library. @@ -265,8 +367,8 @@ case "$cc_vendor-$cc_version" in # 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 -Wmissing-field-initializers -Wvariadic-macros" + # Append more extra warning flags that only gcc 4.0+ know about + H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" ;; gcc-3.4*) @@ -284,7 +386,7 @@ case "$cc_vendor-$cc_version" in 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 -Wmultichar" + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" # The "format=2" warning generates too many warnings about valid # usage in the library. @@ -318,7 +420,7 @@ case "$cc_vendor-$cc_version" in 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 -Wmultichar" + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" # The "format=2" warning generates too many warnings about valid # usage in the library. @@ -346,7 +448,7 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" # Append more extra warning flags that only gcc3.2+ know about - H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wmultichar" + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" # The "format=2" warning generates too many warnings about valid # usage in the library. diff --git a/config/lt_vers.am b/config/lt_vers.am index e8922b4..75a15e8 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 5 -LT_VERS_REVISION = 8 +LT_VERS_REVISION = 9 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and |