spack/var/spack/repos/builtin/packages/bamutil/libstatgen-issue-17.patch
George Hartzell 7aeff18b6f bamutil builds with newer gcc's (#10229)
The most recent release of bamutil that we support uses an embedded
copy of libStatGen that has several issues that keep it from building
with newer releases of gcc.

They've all been fixed upstream and the latest release of bamutil
would pick them up if/when we support it.  The build process has
changed though, plus my team needs *this* version.

This commit backports those fixes.
2018-12-31 16:12:14 -06:00

17 lines
976 B
Diff

diff --git a/general/Makefile b/general/Makefile
index ed39442..d828c6b 100755
--- a/libStatGen/general/Makefile
+++ b/libStatGen/general/Makefile
@@ -8,7 +8,10 @@ ifeq ($(UNAME), Linux)
# an error, but allow unused results and variables for the
# time being.
#
- USER_WARNINGS ?= -Werror $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-strict-overflow" ; fi)
+ # Disable format-truncation check because StringBasics specifically tests
+ # to make sure snprintf truncates as expected.
+ USER_WARNINGS ?= -Werror -Wno-format-truncation $(shell if [ X$(CCVERSION) \> X7.0.0 ] ; then echo " -Wno-strict-overflow -Wno-format-truncation" ; elif [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-strict-overflow" ; fi)
+# USER_WARNINGS ?= -Werror $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-strict-overflow" ; fi)
#-Wno-strict-overflow
# -Wno-unused-variable $(shell if [ X$(CCVERSION) \> X4.2.0 ] ; then echo " -Wno-unused-result" ; fi)
endif