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:
parent
73896e9481
commit
741e4df233
@ -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)
|
||||
|
13
var/spack/repos/builtin/packages/zlib/w_patch.patch
Normal file
13
var/spack/repos/builtin/packages/zlib/w_patch.patch
Normal 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
|
Loading…
Reference in New Issue
Block a user