From 741e4df233482bedefc000387625663cf201c231 Mon Sep 17 00:00:00 2001 From: Matthew Scott Krafczyk Date: Sat, 6 May 2017 12:02:32 -0500 Subject: Update zlib to work with other compilers (#4088) * Fix -include issue with intel and pgi in zlib MERGE CANDIDATE * Patch zlib to compiler with the cray compiler suite. --- var/spack/repos/builtin/packages/zlib/package.py | 2 ++ var/spack/repos/builtin/packages/zlib/w_patch.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 var/spack/repos/builtin/packages/zlib/w_patch.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index 5778c976ad..43d24c61d1 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -46,6 +46,8 @@ class Zlib(Package): variant('shared', default=True, description='Enables the build of shared libraries.') + patch('w_patch.patch', when="@1.2.11%cce") + def setup_environment(self, spack_env, run_env): if '+pic' in self.spec: spack_env.set('CFLAGS', self.compiler.pic_flag) diff --git a/var/spack/repos/builtin/packages/zlib/w_patch.patch b/var/spack/repos/builtin/packages/zlib/w_patch.patch new file mode 100644 index 0000000000..756cff6a78 --- /dev/null +++ b/var/spack/repos/builtin/packages/zlib/w_patch.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index e974d1f..ed26a63 100755 +--- a/configure ++++ b/configure +@@ -409,7 +409,7 @@ EOF + if test $shared -eq 1; then + echo Checking for shared library support... | tee -a configure.log + # we must test in two steps (cc then ld), required at least on SunOS 4.x +- if try $CC -w -c $SFLAGS $test.c && ++ if try $CC -c $SFLAGS $test.c && + try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then + echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log + elif test -z "$old_cc" -a -z "$old_cflags"; then -- cgit v1.2.3-60-g2f50