From f80019dfda61ba42c189277dc16643648e23553d Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Thu, 30 Apr 2020 16:42:55 -0500 Subject: Update config/gnu-cxxflags. --- config/gnu-cxxflags | 33 ++++++++++++++++----------------- 1 file 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 # ############ -- cgit v0.12