Add -fPIC to hdf-eos2 builds (#43794)
* Add -fPIC to hdf-eos2 builds * Use self.compiler.cc_pic_flag instead of -fPIC * Fix style in var/spack/repos/builtin/packages/hdf-eos2/package.py
This commit is contained in:
parent
23f16041cd
commit
272c7c069a
1 changed files with 11 additions and 0 deletions
|
@ -160,4 +160,15 @@ def configure_args(self):
|
||||||
if "zlib" in self.spec:
|
if "zlib" in self.spec:
|
||||||
extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix))
|
extra_args.append("--with-zlib={0}".format(self.spec["zlib-api"].prefix))
|
||||||
|
|
||||||
|
# https://forum.hdfgroup.org/t/help-building-hdf4-with-clang-error-implicit-declaration-of-function-test-mgr-szip-is-invalid-in-c99/7680
|
||||||
|
# -fPIC: https://github.com/spack/spack/issues/43792
|
||||||
|
if self.spec.satisfies("%apple-clang"):
|
||||||
|
extra_args.append(
|
||||||
|
"CFLAGS=-Wno-error=implicit-function-declaration {0}".format(
|
||||||
|
self.compiler.cc_pic_flag
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
extra_args.append("CFLAGS={0}".format(self.compiler.cc_pic_flag))
|
||||||
|
|
||||||
return extra_args
|
return extra_args
|
||||||
|
|
Loading…
Reference in a new issue