summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gnu-cxxflags36
-rw-r--r--config/gnu-flags2
2 files changed, 31 insertions, 7 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index ee690db..8d1ca67 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -100,30 +100,54 @@ case "$cxx_vendor-$cxx_version" in
H5_CXXFLAGS="$H5_CXXFLAGS -Wsign-promo -Woverloaded-virtual -Wold-style-cast -Weffc++ -Wreorder -Wnon-virtual-dtor -Wctor-dtor-privacy -Wabi"
# Production
+ # NDEBUG is handled explicitly by the configure script
case "$cxx_vendor-$cxx_version" in
g++-[34].*)
- PROD_CXXFLAGS="-O3"
+ PROD_CXXFLAGS=
;;
g++-5.*)
- PROD_CXXFLAGS="-O3 -fstdarg-opt"
+ PROD_CXXFLAGS="-fstdarg-opt"
;;
*)
- PROD_CXXFLAGS="-O -finline-functions"
+ PROD_CXXFLAGS="-finline-functions"
;;
esac
# Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
case "$cxx_vendor-$cxx_version" in
g++-5.*)
- DEBUG_CXXFLAGS="-Og -g -ftrapv -fno-common"
+ DEBUG_CXXFLAGS="-ftrapv -fno-common"
;;
*)
- DEBUG_CXXFLAGS="-g"
+ DEBUG_CXXFLAGS=
;;
esac
+ # Symbols
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
# Profile
- PROFILE_CXXFLAGS="-Og -g -pg"
+ PROFILE_CXXFLAGS="-pg"
+
+ # Optimization
+ case "$cxx_vendor-$cxx_version" in
+ g++-[34].*)
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS=
+ ;;
+ g++-5.*)
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-Og"
+ ;;
+ *)
+ HIGH_OPT_CXXFLAGS="-O"
+ DEBUG_OPT_CXXFLAGS=
+ ;;
+ esac
+ NO_OPT_CXXFLAGS="-O0"
# Flags are set
cxx_flags_set=yes
diff --git a/config/gnu-flags b/config/gnu-flags
index 9cd0fd0..87aef3a 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -132,7 +132,7 @@ case "$cc_vendor-$cc_version" in
# Profile
PROFILE_CFLAGS="-pg"
- # Optimization (only CFLAGS at this time)
+ # Optimization
case "$cc_vendor-$cc_version" in
gcc-[34].*)
HIGH_OPT_CFLAGS="-O3"