summaryrefslogtreecommitdiffstats
path: root/config/gnu-fflags
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-04-08 17:45:59 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2020-04-08 17:45:59 (GMT)
commitb35dcaf84731e72991d0cd1d421fe2d68a065842 (patch)
tree98ee457b5f1371bb4aff3028fca2b07e983d9972 /config/gnu-fflags
parent8890fa3eb51fc47e79a9ac3dd0247ef2cc472f72 (diff)
parentb27a20f8c0e286ea7c2836605632ea2ee5522d03 (diff)
downloadhdf5-b35dcaf84731e72991d0cd1d421fe2d68a065842.zip
hdf5-b35dcaf84731e72991d0cd1d421fe2d68a065842.tar.gz
hdf5-b35dcaf84731e72991d0cd1d421fe2d68a065842.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'b27a20f8c0e286ea7c2836605632ea2ee5522d03': (59 commits) Hide Frortran directive warnings Updated test ddl files so CMake passes after h5dump failures. Remove flag from gfort-general in gfort-5, add /EHsc to Win C++ Update printf pointer syntax and revert fortran to f2003 Reduce window fortran standard to f90 Minor updates and fix settings for fortran flags Update intel flags Narrowed the scope of ISO_C_BINDING with ONLY additions Fix missing endif Correct improper file move Move intel warnings to subfolder, update autotools files Corrected note Remove overzealous additions Correct whitespace in flags, force list mode Flag construction must be after compiler detection TRILAB-192 add c++ and fortran warnings build systems one file Skip testing of passthrough VOL connector in a Family File tools test Update release note for CMake warnings Restore previous tools library driver name behavior with passthrough VOL connector Add missing header include ...
Diffstat (limited to 'config/gnu-fflags')
-rw-r--r--config/gnu-fflags50
1 files changed, 30 insertions, 20 deletions
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 185a4c6..2859158 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -17,6 +17,20 @@
# if the compiler is not GNU; otherwise `f9x_flags_set' is set to `yes'
#
+#
+# Prepend `$srcdir/config/gnu-warnings/` to the filename suffix(es) given as
+# subroutine argument(s), remove comments starting with # and ending
+# at EOL, replace spans of whitespace (including newlines) with spaces,
+# and re-emit the file(s) thus filtered on the standard output stream.
+#
+load_gnu_arguments()
+{
+ set -- $(for arg; do
+ sed 's,#.*$,,' $srcdir/config/gnu-warnings/${arg} | demote_errors
+ done)
+ IFS=' ' echo "$*"
+}
+
# Get the compiler version in a way that works for GNU fortran
# gfortran unless a compiler version is already known
#
@@ -95,8 +109,8 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# Symbols #
###########
- SYMBOLS_FCFLAGS="-g"
NO_SYMBOLS_FCFLAGS="-s"
+ SYMBOLS_FCFLAGS="-g"
#############
# Profiling #
@@ -125,8 +139,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# General #
###########
- H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising"
- H5_FCFLAGS="$H5_FCFLAGS -Waliasing -Wcharacter-truncation"
+ H5_FCFLAGS="$H5_CFLAGS $(load_gnu_arguments gfort-general)"
#############################
# Version-specific warnings #
@@ -134,48 +147,45 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# gfortran 4.3 (nothing new)
- # gfortran 4.4
+ # gfortran >= 4.4
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 4; then
- H5_FCFLAGS="$H5_FCFLAGS -Warray-temporaries -Wintrinsics-std"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.4)"
fi
- # gfortran 4.5
+ # gfortran >= 4.5
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then
- H5_FCFLAGS="$H5_FCFLAGS -Wimplicit-procedure"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.5)"
fi
# gfortran 4.6 (nothing new)
- # gfortran 4.7
+ # gfortran >= 4.7
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 7; then
- H5_FCFLAGS="$H5_FCFLAGS -Wreal-q-constant -Wfunction-elimination"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.7)"
fi
- # gfortran 4.8
+ # gfortran >= 4.8
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 8; then
- H5_FCFLAGS="$H5_FCFLAGS -Wrealloc-lhs -Wrealloc-lhs-all"
- # 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"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.8)"
fi
# gfortran 4.9 (nothing new)
- # gfortran 5
+ # gfortran >= 5
if test $f9x_vers_major -ge 5; then
- H5_FCFLAGS="$H5_FCFLAGS -Wuse-without-only"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-5)"
fi
- # gfortran 6
+ # gfortran >= 6
if test $f9x_vers_major -ge 6; then
- H5_FCFLAGS="$H5_FCFLAGS -Winteger-division"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-6)"
fi
# gfortran 7 (nothing new)
- # gfortran 8
+ # gfortran >= 8
if test $f9x_vers_major -ge 8; then
- H5_FCFLAGS="$H5_FCFLAGS -Wfrontend-loop-interchange"
+ H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-8)"
fi
# gfortran 9 (nothing new)