summaryrefslogtreecommitdiffstats
path: root/config/gnu-cxxflags
diff options
context:
space:
mode:
Diffstat (limited to 'config/gnu-cxxflags')
-rw-r--r--config/gnu-cxxflags33
1 files changed, 16 insertions, 17 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index b2ef36d..99480c5 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -121,15 +121,27 @@ if test "X-g++" = "X-$cxx_vendor"; then
# C++-specific
H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+ ################
+ # Optimization #
+ ################
+
+ if test $cxx_vers_major -le 4; then
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS=
+ else
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-Og"
+ fi
+
##############
# Production #
##############
# NDEBUG is handled explicitly by the configure script
if test $cxx_vers_major -le 4; then
- PROD_CXXFLAGS=
+ PROD_CXXFLAGS=$HIGH_OPT_CXXFLAGS
else
- PROD_CXXFLAGS="-fstdarg-opt"
+ PROD_CXXFLAGS=$HIGH_OPT_CXXFLAGS "-fstdarg-opt"
fi
#########
@@ -139,9 +151,9 @@ if test "X-g++" = "X-$cxx_vendor"; then
# NDEBUG is handled explicitly by the configure script
# -g is handled by the symbols flags
if test $cxx_vers_major -le 4; then
- DEBUG_CXXFLAGS=
+ DEBUG_CXXFLAGS=$DEBUG_OPT_CXXFLAGS
else
- DEBUG_CXXFLAGS="-ftrapv -fno-common"
+ DEBUG_CXXFLAGS=$DEBUG_OPT_CXXFLAGS "-ftrapv -fno-common"
fi
###########
@@ -157,19 +169,6 @@ if test "X-g++" = "X-$cxx_vendor"; then
PROFILE_CXXFLAGS="-pg"
- ################
- # Optimization #
- ################
-
- if test $cxx_vers_major -le 4; then
- HIGH_OPT_CXXFLAGS="-O3"
- DEBUG_OPT_CXXFLAGS=
- else
- HIGH_OPT_CXXFLAGS="-O3"
- DEBUG_OPT_CXXFLAGS="-Og"
- fi
- NO_OPT_CXXFLAGS="-O0"
-
############
# Warnings #
############