diff options
author | Gregory Lee <lee218@llnl.gov> | 2019-08-13 17:13:21 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-08-13 19:13:21 -0500 |
commit | aabdeb9b6392a396a5c37d4d91fdf16b19b6d50f (patch) | |
tree | e4f68f462b64bc239f9a0fe787f01543b1cfafeb /var | |
parent | c931757d02e4f94c560481bdcb8a585af193d44f (diff) | |
download | spack-aabdeb9b6392a396a5c37d4d91fdf16b19b6d50f.tar.gz spack-aabdeb9b6392a396a5c37d4d91fdf16b19b6d50f.tar.bz2 spack-aabdeb9b6392a396a5c37d4d91fdf16b19b6d50f.tar.xz spack-aabdeb9b6392a396a5c37d4d91fdf16b19b6d50f.zip |
patch opa-psm2 to build with spack wrappers (#12407)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/opa-psm2/opa-psm2-compiler.patch | 45 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/opa-psm2/package.py | 10 |
2 files changed, 54 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/opa-psm2/opa-psm2-compiler.patch b/var/spack/repos/builtin/packages/opa-psm2/opa-psm2-compiler.patch new file mode 100644 index 0000000000..7c232579c9 --- /dev/null +++ b/var/spack/repos/builtin/packages/opa-psm2/opa-psm2-compiler.patch @@ -0,0 +1,45 @@ +--- opa-psm2-PSM2_11.2.77/buildflags.mak 2019-01-16 09:21:55.000000000 -0800 ++++ opa-psm2-PSM2_11.2.77.compiler_fix/buildflags.mak 2019-08-12 10:17:01.044565000 -0700 +@@ -61,13 +61,13 @@ export os ?= $(shell uname -s | tr '[A-Z + export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,') + + ifeq (${CCARCH},gcc) +- export CC := gcc ++ export CC := cc + else + ifeq (${CCARCH},gcc4) + export CC := gcc4 + else + ifeq (${CCARCH},icc) +- export CC := icc ++ export CC := cc + else + anerr := $(error Unknown C compiler arch: ${CCARCH}) + endif # ICC +@@ -107,7 +107,7 @@ BASECFLAGS +=-Wall $(WERROR) + # + # test if compiler supports 32B(AVX2)/64B(AVX512F) move instruction. + # +-ifeq (${CC},icc) ++ifeq (${CCARCH},icc) + ifeq ($(PSM_DISABLE_AVX2),) + MAVX2=-xATOM_SSE4.2 -DPSM_AVX512 + else +@@ -121,7 +121,7 @@ else + endif + endif + +-ifneq (icc,${CC}) ++ifneq (icc,${CCARCH}) + ifeq ($(PSM_DISABLE_AVX2),) + RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX2 ; echo $$?) + else +@@ -141,7 +141,7 @@ endif + # This support is dynamic at runtime, so is OK to enable as long as compiler can generate + # the code. + ifneq (,${PSM_AVX512}) +- ifneq (icc,${CC}) ++ ifneq (icc,${CCARCH}) + RET := $(shell echo "int main() {}" | ${CC} -mavx512f -E -dM -xc - 2>&1 | grep -q AVX512 ; echo $$?) + ifeq (0,${RET}) + BASECFLAGS += -mavx512f diff --git a/var/spack/repos/builtin/packages/opa-psm2/package.py b/var/spack/repos/builtin/packages/opa-psm2/package.py index 4364b9daa9..32f4a8c0a3 100644 --- a/var/spack/repos/builtin/packages/opa-psm2/package.py +++ b/var/spack/repos/builtin/packages/opa-psm2/package.py @@ -29,10 +29,18 @@ class OpaPsm2(MakefilePackage): # patch to prevent opa-psm2 from adding an additional "usr/" # subdirectory within the installation prefix, which breaks paths for # dependent packages like libfabric - patch('opa-psm2-install-prefix.patch', when='@11.2.68:') + patch('opa-psm2-install-prefix.patch', when='@11.2.68:') + + # patch to get the Makefile to use the spack compiler wrappers + patch('opa-psm2-compiler.patch', when='@11.2.68:', + sha256='fe31fda9aaee13acb87d178af2282446196d2cc0b21163034573706110b2e2d6') def setup_environment(self, spack_env, run_env): spack_env.set('DESTDIR', self.prefix) + if '%intel' in self.spec: + # this variable must be set when we use the Intel compilers to + # ensure that the proper flags are set + spack_env.set('CCARCH', 'icc') def edit(self, spec, prefix): # Change the makefile so libraries and includes are not |