mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r29131] Updated the GNU g++ compiler config file to use the new debug/
production, etc. system. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 autotools serial - prod/debug w/ C++
This commit is contained in:
parent
ad0925c214
commit
77f2f1c132
@ -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
|
||||
|
@ -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"
|
||||
|
@ -2056,21 +2056,25 @@ AC_SUBST([OPTIMIZATION])
|
||||
case "X-$OPTIMIZATION" in
|
||||
X-high)
|
||||
H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS"
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS"
|
||||
H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS"
|
||||
AC_MSG_RESULT([high])
|
||||
;;
|
||||
X-debug)
|
||||
H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS"
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS"
|
||||
H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS"
|
||||
AC_MSG_RESULT([debug])
|
||||
;;
|
||||
X-none)
|
||||
H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS"
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS"
|
||||
H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS"
|
||||
AC_MSG_RESULT([none])
|
||||
;;
|
||||
*)
|
||||
H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION"
|
||||
H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION"
|
||||
H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION"
|
||||
OPTIMIZATION="custom ($OPTIMIZATION)"
|
||||
AC_MSG_RESULT([$OPTIMIZATION])
|
||||
|
Loading…
Reference in New Issue
Block a user