diff options
Diffstat (limited to 'config/gnu-fflags')
-rw-r--r-- | config/gnu-fflags | 31 |
1 files changed, 15 insertions, 16 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 # ############ |