summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cce-fflags17
-rw-r--r--config/cce-flags18
-rw-r--r--config/cmake/ConfigureChecks.cmake9
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/gnu-cxxflags795
-rw-r--r--config/gnu-fflags20
-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-gnulibc19
-rw-r--r--config/pgi-fflags16
-rw-r--r--config/pgi-flags36
13 files changed, 973 insertions, 63 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..e479363 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
+ SYMBOLS_CFLAGS="-g"
+ SYMBOLS_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/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 8bd6f45..49e9a05 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -6,15 +6,6 @@ include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
-# Option to Clear File Buffers before write --enable-clear-file-buffers
-#-----------------------------------------------------------------------------
-option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
-if (HDF5_Enable_Clear_File_Buffers)
- set (H5_CLEAR_MEMORY 1)
-endif (HDF5_Enable_Clear_File_Buffers)
-MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
-
-#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
#-----------------------------------------------------------------------------
option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index ce8219f..31c5afb 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -18,10 +18,6 @@
/* Define if building universal (internal helper macro) */
#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@
-/* Define if the memory buffers being written to disk should be cleared before
- writing. */
-#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@
-
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
new file mode 100644
index 0000000..ee690db
--- /dev/null
+++ b/config/gnu-cxxflags
@@ -0,0 +1,795 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF5 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# GNU g++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not GNU; otherwise `cxx_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for g++
+# unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: g++
+# cxx_version: Version number: 2.91.60, 2.7.2.1
+#
+if test X = "X$cxx_flags_set"; then
+ # PathScale compiler spits out gcc version string too. Need to
+ # filter it out.
+ # icc beginning with version 12 includes a "gcc version compatiblilty"
+ # string, causing the gcc H5_CFLAGS to be erroneously added. The line
+ # "grep -v 'icc version'" causes the discarding of any output
+ # containing 'icc version'. The cc_version for icc is correctly determined
+ # and flags added in the intel-flags script.
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\
+ grep -v 'icc version' |\
+ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+ cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'`
+ cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'`
+ if test X = "X$cxx_vendor" -a X != "X$cxx_version"; then
+ cxx_vendor=g++
+ fi
+ if test "-" != "$cxx_vendor-$cxx_version"; then
+ echo "compiler '$CXX' is GNU $cxx_vendor-$cxx_version"
+ fi
+
+ # Some version numbers
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+ cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
+ test -n "$cc_vers_major" || cxx_vers_major=0
+ test -n "$cc_vers_minor" || cxx_vers_minor=0
+ test -n "$cc_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+fi
+
+# Common g++ flags for various situations
+case "$cxx_vendor-$cxx_version" in
+ g++*)
+ # Architecture-specific flags
+ arch=
+ case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "uname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*-i386)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*|*III*|*IV*|*Athlon*)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+
+ # Host-specific flags
+ case "`hostname`" in
+ sleipnir.ncsa.uiuc.edu)
+ arch="$arch -pipe"
+ ;;
+ esac
+
+ # General (copied from H5_CFLAGS)
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wmissing-declarations -Wredundant-decls -Winline"
+
+ # C++-specific
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsign-promo -Woverloaded-virtual -Wold-style-cast -Weffc++ -Wreorder -Wnon-virtual-dtor -Wctor-dtor-privacy -Wabi"
+
+ # Production
+ case "$cxx_vendor-$cxx_version" in
+ g++-[34].*)
+ PROD_CXXFLAGS="-O3"
+ ;;
+ g++-5.*)
+ PROD_CXXFLAGS="-O3 -fstdarg-opt"
+ ;;
+ *)
+ PROD_CXXFLAGS="-O -finline-functions"
+ ;;
+ esac
+
+ # Debug
+ case "$cxx_vendor-$cxx_version" in
+ g++-5.*)
+ DEBUG_CXXFLAGS="-Og -g -ftrapv -fno-common"
+ ;;
+ *)
+ DEBUG_CXXFLAGS="-g"
+ ;;
+ esac
+
+ # Profile
+ PROFILE_CXXFLAGS="-Og -g -pg"
+
+ # Flags are set
+ cxx_flags_set=yes
+ ;;
+esac
+
+# Version-specific g++ flags
+#
+# Please follow the pattern below by adding new versions at the top, copying
+# the information from the previous version and adding modifications to that.
+case "$cxx_vendor-$cxx_version" in
+
+# Closer to the g++ 5.2 release, we should check for additional flags to
+# include and break it out into it's own section, like the other versions
+# below. -QAK
+ g++-5*)
+
+ # Append warning flags from gcc-3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdate-time -Wopenmp-simd"
+
+ # (There was no release of gcc 5.0)
+
+ # Append more extra warning flags that only gcc 5.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Warray-bounds=2"
+ ;;
+
+ g++-4.9*)
+ # Append warning flags
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc 3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc 3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdate-time -Wopenmp-simd"
+ ;;
+
+ g++-4.8*)
+ # Append warning flags
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+ ;;
+
+ g++-4.7*)
+ # Append warning flags
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+ ;;
+
+ g++-4.6*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-aliasing -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+ ;;
+
+ g++-4.5*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-aliasing -Wstrict-overflow=5"
+ ;;
+
+ g++-4.4*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+ ;;
+
+ g++-4.3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wvla"
+ ;;
+
+ g++-4.2*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+ ;;
+
+ g++-4.1.*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+ ;;
+
+ g++-4.0*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+ ;;
+
+ g++-3.4*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append more extra warning flags that only gcc3.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+ ;;
+
+ g++-3.3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append more extra warning flags that only gcc3.3+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+ ;;
+
+ g++-3.2*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append more extra warning flags that only gcc3.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+ ;;
+
+ g++-3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append some extra warning flags that only gcc3+ know about
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ ;;
+esac
+
+# Clear cxx info if no flags set
+if test "X$cxx_flags_set" = "X"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 1d6caa1..3a90c10 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -78,14 +78,26 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
FSEARCH_DIRS=""
H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W"
+ # Turn off warnings for passing non-ANSI types to BIND().
+ # We pass a lot of hid_t, etc. types so this generates a LOT of spurious warnings.
+ 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"
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
- # Profile
- PROFILE_FCFLAGS="-g -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..ecb5859 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
+ SYMBOLS_CFLAGS="-g"
+ SYMBOLS_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..60a7af9 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
+ SYMBOLS_CFLAGS="-g"
+ SYMBOLS_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..060e78a 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
+ SYMBOLS_CFLAGS="-g"
+ SYMBOLS_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 465bfed..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
;;
@@ -92,6 +92,9 @@ else
esac
fi
+# Figure out GNU FC compiler flags
+. $srcdir/config/gnu-fflags
+
# Figure out PGI FC compiler flags
. $srcdir/config/pgi-fflags
@@ -130,6 +133,9 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi
+# Figure out GNU CXX compiler flags
+. $srcdir/config/gnu-cxxflags
+
# compiler version strings
# check if the compiler_version_info is already set
@@ -177,6 +183,7 @@ case $FC in
*mpif90*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 | grep 'version' |\
sed 's/^[a-z0-9]* for //' |\
+ sed ā€™s/\ā€/\\\ā€/gā€™ |\
sed 's/^\([a-z]* \)/ built with \1/1'`
fc_version_info=`echo $fc_version_info`
;;
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..a6dcba3 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
+ SYMBOLS_CFLAGS="-g"
+ SYMBOLS_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