summaryrefslogtreecommitdiffstats
path: root/config/gnu-flags
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-04-30 21:32:23 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2020-04-30 21:32:23 (GMT)
commite392416bdf71dcbf360ad8a2192e03425032cbe0 (patch)
tree11aa11556b1c66316a016a6d3291c9a09098b8fe /config/gnu-flags
parent0801609ac2acba1b221f5cc29623d6d58eee97d8 (diff)
downloadhdf5-e392416bdf71dcbf360ad8a2192e03425032cbe0.zip
hdf5-e392416bdf71dcbf360ad8a2192e03425032cbe0.tar.gz
hdf5-e392416bdf71dcbf360ad8a2192e03425032cbe0.tar.bz2
Update to use optimization flags, C++ error flags, and correct
libhdf5.settings.in to remove unworkable changes.
Diffstat (limited to 'config/gnu-flags')
-rw-r--r--config/gnu-flags33
1 files changed, 16 insertions, 17 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 7e69ede..d8a45a6 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -131,15 +131,27 @@ if test "X-gcc" = "X-$cc_vendor"; then
H5_CFLAGS="$H5_CFLAGS $arch"
+ ################
+ # Optimization #
+ ################
+
+ if test $cc_vers_major -le 4; then
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS=
+ else
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-Og"
+ fi
+
##############
# Production #
##############
# NDEBUG is handled explicitly by the configure script
if test $cc_vers_major -le 4; then
- PROD_CFLAGS=
+ PROD_CFLAGS=$HIGH_OPT_CFLAGS
else
- PROD_CFLAGS="-fstdarg-opt"
+ PROD_CFLAGS=$HIGH_OPT_CFLAGS "-fstdarg-opt"
fi
#########
@@ -149,9 +161,9 @@ 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 -le 4; then
- DEBUG_CFLAGS=
+ DEBUG_CFLAGS=$DEBUG_OPT_CFLAGS
else
- DEBUG_CFLAGS="-ftrapv -fno-common"
+ DEBUG_CFLAGS=$DEBUG_OPT_CFLAGS "-ftrapv -fno-common"
fi
###########
@@ -167,19 +179,6 @@ if test "X-gcc" = "X-$cc_vendor"; then
PROFILE_CFLAGS="-pg"
- ################
- # Optimization #
- ################
-
- if test $cc_vers_major -le 4; then
- HIGH_OPT_CFLAGS="-O3"
- DEBUG_OPT_CFLAGS=
- else
- HIGH_OPT_CFLAGS="-O3"
- DEBUG_OPT_CFLAGS="-Og"
- fi
- NO_OPT_CFLAGS="-O0"
-
############
# Warnings #
############