summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-01-27 21:45:23 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-01-27 21:45:23 (GMT)
commit1454a458262dd012c94f56ccc55ccbbe57b63399 (patch)
tree3924efe3b45657d02b8dcc394df30626591a6610 /config
parent7afa7bb6afd1cf4daee58010e4f9411262abeab9 (diff)
downloadhdf5-1454a458262dd012c94f56ccc55ccbbe57b63399.zip
hdf5-1454a458262dd012c94f56ccc55ccbbe57b63399.tar.gz
hdf5-1454a458262dd012c94f56ccc55ccbbe57b63399.tar.bz2
[svn-r28996] Autotools configure updates to allow separation of build type, debug
symbols, asserts, profiling, and optimization. Also much refactoring, improved help, and --enable-<foo> options will now emit errors on nonsense (e.g.: --enable-foo="asdfasdf"). The libhdf5.settings.in file was also reformatted. Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial and parallel autotools w/ various options
Diffstat (limited to 'config')
-rw-r--r--config/cce-fflags17
-rw-r--r--config/cce-flags18
-rw-r--r--config/gnu-fflags16
-rw-r--r--config/gnu-flags47
-rw-r--r--config/ibm-flags29
-rw-r--r--config/intel-fflags16
-rw-r--r--config/intel-flags20
-rw-r--r--config/linux-gnulibc12
-rw-r--r--config/pgi-fflags16
-rw-r--r--config/pgi-flags36
10 files changed, 167 insertions, 50 deletions
diff --git a/config/cce-fflags b/config/cce-fflags
index 896e711..b96551d 100644
--- a/config/cce-fflags
+++ b/config/cce-fflags
@@ -53,14 +53,23 @@ if test "X-cce" = "X-$f9x_vendor"; then
# Production
# -Wl,-s to remove all symbols for smaller file
- PROD_FCFLAGS="-O3 -Wl,-s"
+ # Note that this will likely override the symbols flag
+ PROD_FCFLAGS="-Wl,-s"
# Debug
- DEBUG_FCFLAGS="-g -O0"
+ DEBUG_FCFLAGS=
- # Profile
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS="-O0"
+ NO_OPT_FCFLAGS="-O0"
# Flags are set
f9x_flags_set=yes
diff --git a/config/cce-flags b/config/cce-flags
index a34fcbe..bdfb5f9 100644
--- a/config/cce-flags
+++ b/config/cce-flags
@@ -55,18 +55,28 @@ if test "X-cce" = "X-$cc_vendor"; then
# Production
# -Wl,-s to remove all symbols for smaller file
- PROD_CFLAGS="-O3 -Wl,-s"
+ PROD_CFLAGS="-Wl,-s"
PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-g -O0"
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
DEBUG_CPPFLAGS=
- # Profile
+ # Symbols
+ SYMBOL_CFLAGS="-g"
+ SYMBOL_CPPFLAGS=
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
+ PROFILE_CFLAGS="-p"
PROFILE_CPPFLAGS=
+ # Optimization
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
+
# Flags are set
cc_flags_set=yes
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 911a264..3a90c10 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -83,13 +83,21 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
H5_FCFLAGS="$H5_FCFLAGS -Wno-c-binding-type"
# Production
- PROD_FCFLAGS="-O2 -s"
+ PROD_FCFLAGS="-s"
# Debug
- DEBUG_FCFLAGS="-g -fbounds-check"
+ DEBUG_FCFLAGS="-fbounds-check"
- # Profile
- PROFILE_FCFLAGS="-g -pg"
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O2"
+ DEBUG_OPT_FCFLAGS="-O0"
+ NO_OPT_FCFLAGS="-O0"
# Flags are set
f9x_flags_set=yes
diff --git a/config/gnu-flags b/config/gnu-flags
index e7f8f14..232bf05 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -97,39 +97,64 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
# Production
+ # NDEBUG is handled explicitly by the configure script
case "$cc_vendor-$cc_version" in
gcc-[34].*)
- PROD_CFLAGS="-O3"
+ PROD_CFLAGS=
;;
gcc-5.*)
- PROD_CFLAGS="-O3 -fstdarg-opt"
+ PROD_CFLAGS="-fstdarg-opt"
;;
*)
- PROD_CFLAGS="-O -finline-functions"
+ # gcc automatically inlines based on the optimization level
+ # this is just a failsafe
+ PROD_CFLAGS="-finline-functions"
;;
esac
- PROD_CPPFLAGS=
# Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
case "$cc_vendor-$cc_version" in
gcc-5.*)
- DEBUG_CFLAGS="-Og -g -ftrapv -fno-common"
+ DEBUG_CFLAGS="-ftrapv -fno-common"
;;
*)
- DEBUG_CFLAGS="-g"
+ DEBUG_CFLAGS=
;;
esac
- #DEBUG_CFLAGS="$DEBUG_CFLAGS -fsanitize=undefined"
+ #DEBUG_CFLAGS="-fsanitize=undefined"
DEBUG_CPPFLAGS=
- # Try out the new "stack protector" feature introduced in gcc 4.1
- # (We should also think about adding some of the other memory protection options)
- #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
+ # Symbols
+ SYMBOL_CFLAGS="-g"
+ SYMBOL_CPPFLAGS=
# Profile
- PROFILE_CFLAGS="-Og -g -pg"
+ PROFILE_CFLAGS="-pg"
PROFILE_CPPFLAGS=
+ # Optimization (only CFLAGS at this time)
+ case "$cc_vendor-$cc_version" in
+ gcc-[34].*)
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS=
+ ;;
+ gcc-5.*)
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-Og"
+ ;;
+ *)
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS=
+ ;;
+ esac
+ NO_OPT_CFLAGS="-O0"
+
+ # Try out the new "stack protector" feature introduced in gcc 4.1
+ # (We should also think about adding some of the other memory protection options)
+ #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
+
# Flags are set
cc_flags_set=yes
;;
diff --git a/config/ibm-flags b/config/ibm-flags
index 462372d..731968d 100644
--- a/config/ibm-flags
+++ b/config/ibm-flags
@@ -55,19 +55,38 @@ if test "XL" = "$cc_vendor"; then
# Turn off shared lib option. It causes some test suite to fail.
enable_shared="${enable_shared:-no}"
+
# Make sure this is applied to other API compile options such as C++.
AM_CFLAGS="$AM_CFLAGS"
+
# -qflag=w:w makes the lowest level of reported compile issues to be "warning"
# instead of "information". This suppresses a very large number of messages
# concerning the portability of __inline__.
H5_CFLAGS="-qlanglvl=stdc99 -qflag=w:w $H5_CFLAGS"
- DEBUG_CFLAGS="-g -qfullpath"
- DEBUG_CPPFLAGS=
- # -O causes test/dtypes to fail badly. Turn it off for now.
- PROD_CFLAGS=""
+
+ # Produciton
+ PROD_CFLAGS=
PROD_CPPFLAGS=
- PROFILE_CFLAGS="-g -qfullpath -pg"
+
+ # Debug
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS="-qfullpath"
+ DEBUG_CPPFLAGS=
+
+ # Symbols
+ SYMBOL_CFLAGS="-g"
+ SYMBOL_CPPFLAGS=
+
+ # Profiling
+ PROFILE_CFLAGS="-pg"
PROFILE_CPPFLAGS=
+
+ # Optimization
+ # -O causes test/dtypes to fail badly. Turn it off for now.
+ HIGH_OPT_CFLAGS=
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
# Flags are set
cc_flags_set=yes
fi
diff --git a/config/intel-fflags b/config/intel-fflags
index 3e33fc9..1f7cf78 100644
--- a/config/intel-fflags
+++ b/config/intel-fflags
@@ -73,14 +73,22 @@ if test "X-ifort" = "X-$f9x_vendor"; then
H5_FCFLAGS="$H5_FCFLAGS"
# Production
- PROD_FCFLAGS="-O3"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -check all"
+ DEBUG_FCFLAGS="-check all"
- # Profile
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
# Flags are set
f9x_flags_set=yes
diff --git a/config/intel-flags b/config/intel-flags
index 3187daf..a3238fa 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -68,21 +68,31 @@ if test "X-icc" = "X-$cc_vendor"; then
# General
# Default to C99 standard.
- H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch}"
+ H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch} -Wcheck -Wall"
# Production is set to default; see settings for specific version further down
- PROD_CFLAGS="-O"
+ PROD_CFLAGS=
PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-Wcheck -Wall -g -O0"
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
DEBUG_CPPFLAGS=
- # Profile
+ # Symbols
+ SYMBOL_CFLAGS="-g"
+ SYMBOL_CPPFLAGS=
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
+ PROFILE_CFLAGS="-p"
PROFILE_CPPFLAGS=
+ # Optimization
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
+
# Flags are set
cc_flags_set=yes
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 405fa34..46771dc 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -51,7 +51,7 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
- pgcc*)
+ pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 8e574e4..fbcba52 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -87,12 +87,20 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
PROD_FCFLAGS="-fast -s -Mnoframe"
# Debug
- DEBUG_FCFLAGS="-g -Mbounds -Mchkptr -Mdclchk"
+ DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk"
- # Profile
- PROFILE_FCFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profiling
+ PROFILE_FCFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_FCFLAGS="-g -pg"
+ #PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS=
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
# Flags are set
f9x_flags_set=yes
diff --git a/config/pgi-flags b/config/pgi-flags
index 29e6f05..674f60e 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -72,13 +72,11 @@ if test "X-pgcc" = "X-$cc_vendor"; then
# Production
case "$cc_vendor-$cc_version" in
- # Tweak down compiler optimizations for v10.6, it has a bug
pgcc-10.6*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS="-s"
;;
- # Tweak down compiler optimizations for v9.x
pgcc-9.*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS="-s"
;;
*)
PROD_CFLAGS="-fast -s"
@@ -87,15 +85,37 @@ if test "X-pgcc" = "X-$cc_vendor"; then
PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-g -Mbounds"
+ # NDEBUG is handled explicitly by the configure script
+ DEBUG_CFLAGS="-Mbounds"
DEBUG_CPPFLAGS=
- # Profile
- PROFILE_CFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOL_CFLAGS="-g"
+ SYMBOL_CPPFLAGS=
+
+ # Profiling
+ PROFILE_CFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_CFLAGS="-g -pg"
+ #PROFILE_CFLAGS="-pg"
PROFILE_CPPFLAGS=
+ # Optimization
+ case "$cc_vendor-$cc_version" in
+ # Tweak down compiler optimizations for v10.6, it has a bug
+ pgcc-10.6*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ # Tweak down compiler optimizations for v9.x
+ pgcc-9.*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ *)
+ HIGH_OPT_CFLAGS=
+ ;;
+ esac
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
# Flags are set
cc_flags_set=yes