summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gnu-fflags31
-rw-r--r--config/gnu-flags33
2 files changed, 31 insertions, 33 deletions
diff --git a/config/gnu-fflags b/config/gnu-fflags
index eb3519c..07038ab 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -89,20 +89,32 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
H5_FCFLAGS="$H5_FCFLAGS $arch"
+ ################
+ # Optimization #
+ ################
+
+ if test $f9x_vers_major -le 4; then
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS=
+ else
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS="-Og"
+ fi
+
##############
# Production #
##############
- PROD_FCFLAGS=
+ PROD_FCFLAGS=$HIGH_OPT_FCFLAGS
#########
# Debug #
#########
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then
- DEBUG_FCFLAGS="-fcheck=all"
+ DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fcheck=all"
else
- DEBUG_FCFLAGS="-fbounds-check"
+ DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fbounds-check"
fi
###########
@@ -118,19 +130,6 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
PROFILE_FCFLAGS="-pg"
- ################
- # Optimization #
- ################
-
- if test $f9x_vers_major -le 4; then
- HIGH_OPT_FCFLAGS="-O3"
- DEBUG_OPT_FCFLAGS=
- else
- HIGH_OPT_FCFLAGS="-O3"
- DEBUG_OPT_FCFLAGS="-Og"
- fi
- NO_OPT_FCFLAGS="-O0"
-
############
# Warnings #
############
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 #
############