summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2024-03-15 12:41:07 (GMT)
committerGitHub <noreply@github.com>2024-03-15 12:41:07 (GMT)
commitc7c8b93d06fd2c99dee523a11a2d62eb4dfaed74 (patch)
treea6e9fdab06f462e270500310823ffb74f74a73cb
parentece121b415a69e159f3143e2348b7c580adbd054 (diff)
downloadhdf5-c7c8b93d06fd2c99dee523a11a2d62eb4dfaed74.zip
hdf5-c7c8b93d06fd2c99dee523a11a2d62eb4dfaed74.tar.gz
hdf5-c7c8b93d06fd2c99dee523a11a2d62eb4dfaed74.tar.bz2
Fix Autotools -Werror cleanup (#4144)
The Autotools temporarily scrub -Werror(=whatever) from CFLAGS, etc. so configure checks don't trip over warnings generated by configure check programs. The sed line originally only scrubbed -Werror but not -Werror=something, which would cause errors when the '=something' was left behind in CFLAGS. The sed line has been updated to handle -Werror=something lines. Fixes one issue raised in #3872
-rw-r--r--configure.ac25
-rw-r--r--release_docs/RELEASE.txt14
2 files changed, 33 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index dff0c4a..b76f18f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,12 +194,25 @@ saved_user_LDFLAGS="$LDFLAGS"
saved_user_CPPFLAGS="$CPPFLAGS"
## Strip out -Werror from CFLAGS since that can cause checks to fail when
-## compiling the test program fails due to warnings
-CFLAGS="`echo $CFLAGS | sed -e 's/-Werror//g'`"
-CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Werror//g'`"
-FCFLAGS="`echo $FCFLAGS | sed -e 's/-Werror//g'`"
-JAVACFLAGS="`echo $JAVACFLAGS | sed -e 's/-Werror//g'`"
-CPPFLAGS="`echo $CPPFLAGS | sed -e 's/-Werror//g'`"
+## compiling test programs fails due to warnings
+##
+## Regex:
+##
+## -Werror Literal -Werror
+## \( Start optional capturing group
+## = Literal equals sign
+## [^[:space:]-] Non-space characters
+## \+ 1 or more of the above
+## \) End optional capturing group
+## \? 0 or 1 capturing group matches
+##
+WERROR_SED= "sed -e 's/-Werror\(=[^[:space:]]\+\)\?//g'"
+
+CFLAGS="`echo $CFLAGS | $WERROR_SED`"
+CXXFLAGS="`echo $CXXFLAGS | $WERROR_SED`"
+FCFLAGS="`echo $FCFLAGS | $WERROR_SED`"
+JAVACFLAGS="`echo $JAVACFLAGS | $WERROR_SED`"
+CPPFLAGS="`echo $CPPFLAGS | $WERROR_SED`"
## Support F9X variable to define Fortran compiler if FC variable is
## not used. This should be deprecated in the future.
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 4c6367e..688762e 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -575,6 +575,20 @@ Support for new platforms, languages and compilers
Bug Fixes since HDF5-1.14.0 release
===================================
+ Configuration:
+ -------------
+ - Fix Autotools -Werror cleanup
+
+ The Autotools temporarily scrub -Werror(=whatever) from CFLAGS, etc.
+ so configure checks don't trip over warnings generated by configure
+ check programs. The sed line originally only scrubbed -Werror but not
+ -Werror=something, which would cause errors when the '=something' was
+ left behind in CFLAGS.
+
+ The sed line has been updated to handle -Werror=something lines.
+
+ Fixes one issue raised in #3872
+
Library
-------
- Fixed asserts raised by large values of H5Pset_est_link_info() parameters