diff options
author | George Hartzell <hartzell@alerce.com> | 2018-06-23 18:34:04 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-06-23 20:34:04 -0500 |
commit | 1e92721ab53eb2476f672c1515b68b3fc6229415 (patch) | |
tree | f545219f59b711116309d3e2c6bdc115c359194a /var | |
parent | 486400548358d3539d0b47f67f639e8be6283c6d (diff) | |
download | spack-1e92721ab53eb2476f672c1515b68b3fc6229415.tar.gz spack-1e92721ab53eb2476f672c1515b68b3fc6229415.tar.bz2 spack-1e92721ab53eb2476f672c1515b68b3fc6229415.tar.xz spack-1e92721ab53eb2476f672c1515b68b3fc6229415.zip |
Fix m4 on OS X highsierra (#8559)
m4 exited immediately (causing the nettle build to fail).
```
(alice)[11:09:46]spack>>/Users/hartzell/tmp/spack-mac/spack/opt/spack/darwin-highsierra-x86_64/clang-9.1.0-apple/m4-1.4.18-caxsf7l5yd7qbq2bown6bzi5el3ltfwf/bin/m4
Abort trap: 6
(alice)[11:10:18]spack>>fg
```
Tracked down a fix via the Homebrew recipe. I'll send a note to the
`bug-m4@gnu.org` list to ensure that upstream knows about it.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/m4/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/m4/secure_snprintf.patch | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index 219cde979e..35adc3c0af 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -36,6 +36,9 @@ class M4(AutotoolsPackage): patch('gnulib-pgi.patch', when='@1.4.18') patch('pgi.patch', when='@1.4.17') + # from: https://github.com/Homebrew/homebrew-core/blob/master/Formula/m4.rb + # Patch credit to Jeremy Huddleston Sequoia <jeremyhu@apple.com> + patch('secure_snprintf.patch', when='platform_os = highsierra') variant('sigsegv', default=True, description="Build the libsigsegv dependency") diff --git a/var/spack/repos/builtin/packages/m4/secure_snprintf.patch b/var/spack/repos/builtin/packages/m4/secure_snprintf.patch new file mode 100644 index 0000000000..da3ae5ba0d --- /dev/null +++ b/var/spack/repos/builtin/packages/m4/secure_snprintf.patch @@ -0,0 +1,15 @@ +With format string strictness, High Sierra also enforces that %n isn't used +in dynamic format strings, but we should just disable its use on darwin in +general. + +--- a/lib/vasnprintf.c.orig 2017-06-22 15:19:15.000000000 -0700 ++++ b/lib/vasnprintf.c 2017-06-22 15:20:20.000000000 -0700 +@@ -4869,7 +4869,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) ++# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; |