summaryrefslogtreecommitdiffstats
path: root/config/gnu-flags
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-07-10 20:05:50 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-07-10 20:05:50 (GMT)
commit40b63bffb7268f363ed7172916350d1b9a73fca8 (patch)
treeccfc5a03520d66287dfa9286ac99c3b2d58fd8b0 /config/gnu-flags
parent924d4c01a8b32d1a1c2496ca68a066b5bd9343e9 (diff)
downloadhdf5-40b63bffb7268f363ed7172916350d1b9a73fca8.zip
hdf5-40b63bffb7268f363ed7172916350d1b9a73fca8.tar.gz
hdf5-40b63bffb7268f363ed7172916350d1b9a73fca8.tar.bz2
* Fixed a bug in the gcc warning parsing
* Changed version parsing from == gcc 4.x to < to handle ancient compilers.
Diffstat (limited to 'config/gnu-flags')
-rw-r--r--config/gnu-flags16
1 files changed, 8 insertions, 8 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 3d7331b..4407865 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -23,7 +23,7 @@
# cc_vendor: The compiler name: gcc
# cc_version: Version number: 2.91.60, 2.7.2.1
#
-if test X = "X$cc_flags_set"; then
+if test "X-" = "X-$cc_flags_set"; then
# PathScale compiler spits out gcc version string too. Need to
# filter it out.
# icc beginning with version 12 includes a "gcc version compatiblilty"
@@ -104,7 +104,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
##############
# NDEBUG is handled explicitly by the configure script
- if test $cc_vers_major -eq 4; then
+ if test $cc_vers_major -le 4; then
PROD_CFLAGS=
else
PROD_CFLAGS="-fstdarg-opt"
@@ -116,7 +116,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# NDEBUG is handled explicitly by the configure script
# -g is handled by the symbols flags
- if test $cc_vers_major -eq 4; then
+ if test $cc_vers_major -le 4; then
DEBUG_CFLAGS=
else
DEBUG_CFLAGS="-ftrapv -fno-common"
@@ -139,7 +139,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# Optimization #
################
- if test $cc_vers_major -eq 4; then
+ if test "$cc_vers_major" -le 4; then
HIGH_OPT_CFLAGS="-O3"
DEBUG_OPT_CFLAGS=
else
@@ -189,24 +189,24 @@ if test "X-gcc" = "X-$cc_vendor"; then
#######################
# Disable warnings about using the 'long long' type w/ gcc 4.6 and earlier
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $$cc_vers_minor -le 6; then
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 6; then
H5_CFLAGS="$H5_CFLAGS -Wno-long-long"
fi
# -Wvolatile-register-var was later incorporated into -Wall and
# only needs to be specified explicitly for gcc 4.2-4.3
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $$cc_vers_minor -le 3; then
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 3; then
H5_CFLAGS="$H5_CFLAGS -Wvolatile-register-var"
fi
# -Wstrict-aliasing was later incorporated into -Wall and
# only needs to be specified explicitly for gcc 4.5-4.6
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5 -o $cc_vers_major -eq 4 -a $$cc_vers_minor -le 6; then
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 6; then
H5_CFLAGS="$H5_CFLAGS -Wstrict-aliasing"
fi
# The non-valued form of -Wstrict-overflow is used in gcc 4.2-4.4
- if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $$cc_vers_minor -le 4; then
+ if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 4; then
H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow"
fi