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.
This commit is contained in:
Matthew Scott Krafczyk 2017-05-06 12:02:32 -05:00 committed by Adam J. Stewart
parent 73896e9481
commit 741e4df233
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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