diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2016-02-17 01:09:04 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2016-02-17 01:09:04 (GMT) |
commit | ad0925c214c9d3afe9a013aa1e3adfb2bc3ba4dc (patch) | |
tree | b09eecd7d0c54fea92af1eadce26a052bcaf2262 | |
parent | 6731dca11fb634e0eec285c59d61fe0de79f042d (diff) | |
download | hdf5-ad0925c214c9d3afe9a013aa1e3adfb2bc3ba4dc.zip hdf5-ad0925c214c9d3afe9a013aa1e3adfb2bc3ba4dc.tar.gz hdf5-ad0925c214c9d3afe9a013aa1e3adfb2bc3ba4dc.tar.bz2 |
[svn-r29129] Added NO_SYMBOLS_CFLAGS, etc. to allow stripping symbols when
--disable-symbols is specified and to ensure that production
mode (where symbol stripping is usually a part of the FLAGS)
doesn't conflict with --enable-symbols. This will allow better
(though still limited) debugging of production/optimized code.
The PGI, XLC, Intel, and Solaris files were not modified and
do not generate the symbol removal flag at this time. They'll
be updated in future check-ins. In the meantime, production
mode on those platforms still usually strips symbols.
This check-in also updates the Cygwin-specific files to use
the new autotools FLAGS and option scheme when uncommon
(non-gnu, etc.) Fortran compilers are used.
Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1
autotools serial (prod/debug w/ and w/o symbols)
symbol presence/absence checked with objdump
-rw-r--r-- | config/cce-fflags | 6 | ||||
-rw-r--r-- | config/cce-flags | 10 | ||||
-rw-r--r-- | config/gnu-fflags | 3 | ||||
-rw-r--r-- | config/gnu-flags | 4 | ||||
-rw-r--r-- | config/i686-pc-cygwin | 22 | ||||
-rw-r--r-- | config/ibm-flags | 6 | ||||
-rw-r--r-- | config/linux-gnulibc1 | 22 | ||||
-rw-r--r-- | config/x86_64-pc-cygwin | 23 | ||||
-rw-r--r-- | configure.ac | 3 |
9 files changed, 73 insertions, 26 deletions
diff --git a/config/cce-fflags b/config/cce-fflags index b96551d..233f9ff 100644 --- a/config/cce-fflags +++ b/config/cce-fflags @@ -52,15 +52,15 @@ if test "X-cce" = "X-$f9x_vendor"; then H5_FCFLAGS="${H5_FCFLAGS} -hnocaf" # Production - # -Wl,-s to remove all symbols for smaller file - # Note that this will likely override the symbols flag - PROD_FCFLAGS="-Wl,-s" + PROD_FCFLAGS= # Debug DEBUG_FCFLAGS= # Symbols + # -Wl,-s to remove all symbols for smaller file SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-Wl,-s" # Profiling # Use this for profiling with gprof diff --git a/config/cce-flags b/config/cce-flags index e479363..8f3b2dc 100644 --- a/config/cce-flags +++ b/config/cce-flags @@ -54,23 +54,20 @@ if test "X-cce" = "X-$cc_vendor"; then H5_CFLAGS="${H5_CFLAGS:--hc99 $arch}" # Production - # -Wl,-s to remove all symbols for smaller file - PROD_CFLAGS="-Wl,-s" - PROD_CPPFLAGS= + PROD_CFLAGS= # Debug # NDEBUG is handled explicitly in configure DEBUG_CFLAGS= - DEBUG_CPPFLAGS= # Symbols + # -Wl,-s to remove all symbols for smaller file SYMBOLS_CFLAGS="-g" - SYMBOLS_CPPFLAGS= + NO_SYMBOLS_CFLAGS="-Wl,-s" # Profiling # Use this for profiling with gprof PROFILE_CFLAGS="-p" - PROFILE_CPPFLAGS= # Optimization HIGH_OPT_CFLAGS="-O3" @@ -87,3 +84,4 @@ if test "X-$cc_flags_set" = "X-"; then cc_vendor= cc_version= fi + diff --git a/config/gnu-fflags b/config/gnu-fflags index 3a90c10..62498a9 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -83,13 +83,14 @@ if test "X-gfortran" = "X-$f9x_vendor"; then H5_FCFLAGS="$H5_FCFLAGS -Wno-c-binding-type" # Production - PROD_FCFLAGS="-s" + PROD_FCFLAGS= # Debug DEBUG_FCFLAGS="-fbounds-check" # Symbols SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-s" # Profiling PROFILE_FCFLAGS="-pg" diff --git a/config/gnu-flags b/config/gnu-flags index ecb5859..9cd0fd0 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -124,15 +124,13 @@ case "$cc_vendor-$cc_version" in ;; esac #DEBUG_CFLAGS="-fsanitize=undefined" - DEBUG_CPPFLAGS= # Symbols + NO_SYMBOLS_CFLAGS="-s" SYMBOLS_CFLAGS="-g" - SYMBOLS_CPPFLAGS= # Profile PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= # Optimization (only CFLAGS at this time) case "$cc_vendor-$cc_version" in diff --git a/config/i686-pc-cygwin b/config/i686-pc-cygwin index 9b1ab74..7355e4a 100644 --- a/config/i686-pc-cygwin +++ b/config/i686-pc-cygwin @@ -104,9 +104,25 @@ case $FC_BASENAME in # (just in case since this should be a default EIP) H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" FSEARCH_DIRS="" - DEBUG_FCFLAGS="-g" - PROD_FCFLAGS="-O" - PROFILE_FCFLAGS="-g -pg" + + # Production + PROD_FCFLAGS= + + # Debug + DEBUG_FCFLAGS= + + # Symbols + SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-s" + + # Profiling + PROFILE_FCFLAGS="-pg" + + # Optimization + HIGH_OPT_FCFLAGS="-O" + DEBUG_OPT_FCFLAGS= + NO_OPT_FCFLAGS= + f9x_flags_set=yes ;; diff --git a/config/ibm-flags b/config/ibm-flags index 60a7af9..412817c 100644 --- a/config/ibm-flags +++ b/config/ibm-flags @@ -66,20 +66,17 @@ if test "XL" = "$cc_vendor"; then # Produciton PROD_CFLAGS= - PROD_CPPFLAGS= # Debug # NDEBUG is handled explicitly in configure DEBUG_CFLAGS="-qfullpath" - DEBUG_CPPFLAGS= # Symbols SYMBOLS_CFLAGS="-g" - SYMBOLS_CPPFLAGS= + NO_SYMBOLS_CFLAGS= # Profiling PROFILE_CFLAGS="-pg" - PROFILE_CPPFLAGS= # Optimization # -O causes test/dtypes to fail badly. Turn it off for now. @@ -125,3 +122,4 @@ if test X != X$CXX; then fi fi + diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 9128d78..5bea816 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -117,9 +117,25 @@ case $FC_BASENAME in # (just in case since this should be a default EIP) H5_FCFLAGS="$H5_FCFLAGS" FSEARCH_DIRS="" - DEBUG_FCFLAGS="-g" - PROD_FCFLAGS="-O" - PROFILE_FCFLAGS="-g -pg" + + # Production + PROD_FCFLAGS= + + # Debug + DEBUG_FCFLAGS= + + # Symbols + SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-s" + + # Profiling + PROFILE_FCFLAGS="-pg" + + # Optimization + HIGH_OPT_FCFLAGS="-O" + DEBUG_OPT_FCFLAGS= + NO_OPT_FCFLAGS= + f9x_flags_set=yes ;; diff --git a/config/x86_64-pc-cygwin b/config/x86_64-pc-cygwin index 9b1ab74..210aa2b 100644 --- a/config/x86_64-pc-cygwin +++ b/config/x86_64-pc-cygwin @@ -104,9 +104,25 @@ case $FC_BASENAME in # (just in case since this should be a default EIP) H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS" FSEARCH_DIRS="" - DEBUG_FCFLAGS="-g" - PROD_FCFLAGS="-O" - PROFILE_FCFLAGS="-g -pg" + + # Production + PROD_FCFLAGS= + + # Debug + DEBUG_FCFLAGS= + + # Symbols + SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-s" + + # Profiling + PROFILE_FCFLAGS="-pg" + + # Optimization + HIGH_OPT_FCFLAGS="-O" + DEBUG_OPT_FCFLAGS= + NO_OPT_FCFLAGS= + f9x_flags_set=yes ;; @@ -119,3 +135,4 @@ if test -z "$CXX"; then CXX=g++ CXX_BASENAME=g++ fi + diff --git a/configure.ac b/configure.ac index 17e9ff9..ed6c3b5 100644 --- a/configure.ac +++ b/configure.ac @@ -1913,6 +1913,9 @@ case "X-$SYMBOLS" in AC_MSG_RESULT([yes]) ;; X-no) + H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS" AC_MSG_RESULT([no]) ;; *) |