prism: support for aarch64 (#18562)

* prism: support for aarch64

* prism: Change patch file.
This commit is contained in:
t-nojiri 2020-09-10 23:56:19 +09:00 committed by GitHub
parent 25291cf01c
commit e13e2b0d54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,35 @@
--- spack-src/prism/Makefile.bak 2019-04-19 07:53:32.000000000 +0900
+++ spack-src/prism/Makefile 2020-09-08 15:22:09.775733701 +0900
@@ -66,6 +66,9 @@
ifneq (,$(findstring ia64, $(shell uname -m)))
ARCH = ia64
endif
+ ifneq (,$(findstring aarch64, $(shell uname -m)))
+ ARCH = aarch64
+ endif
endif
# For Mac/Windows, we decide whether to build in 64-bit mode based on
# whether java is 32/64-bit (since these need to match)
@@ -173,6 +176,14 @@
LDFLAGS = $(CUDD_XCFLAGS) $(OPTIMISE)
BINDISTSUFFIX = linux64
else
+ ifeq ($(ARCH),aarch64)
+ # Position Independent Code required on Aarch64
+ CUDD_XCFLAGS = -fPIC -DPIC -DHAVE_IEEE_754 -DBSD -DSIZEOF_VOID_P=8 -DSIZEOF_LONG=8 $(DEBUG) $(WARNINGS)
+ CFLAGS = $(CUDD_XCFLAGS) $(OPTIMISE)
+ CPPFLAGS = --std=c++11 $(CUDD_XCFLAGS) $(OPTIMISE)
+ LDFLAGS = $(CUDD_XCFLAGS) $(OPTIMISE)
+ BINDISTSUFFIX = linux64
+ else
CUDD_XCFLAGS = -m32 -malign-double -DHAVE_IEEE_754 -DBSD $(DEBUG) $(WARNINGS)
CFLAGS = $(CUDD_XCFLAGS) $(OPTIMISE)
CPPFLAGS = --std=c++11 $(CUDD_XCFLAGS) $(OPTIMISE)
@@ -180,6 +191,7 @@
BINDISTSUFFIX = linux32
endif
endif
+ endif
BIN_TARGETS=prism.linux xprism.linux
JFLAGS = -encoding UTF8
SHARED = -shared

View file

@ -19,6 +19,8 @@ class Prism(MakefilePackage):
depends_on('java', type=('build', 'run'))
patch('Makefile.patch', when='target=aarch64:')
def setup_run_environment(self, env):
env.set('PRISM_DIR', self.prefix)