summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Ciurej <ciurej1@llnl.gov>2020-06-09 13:52:01 -0700
committerGitHub <noreply@github.com>2020-06-09 13:52:01 -0700
commit806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c (patch)
treefe7ac1d498bb701f278e0e6a942a42ab157059cc
parent8b1ffebe002c4c997d672382f9d045a590618649 (diff)
downloadspack-806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c.tar.gz
spack-806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c.tar.bz2
spack-806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c.tar.xz
spack-806a19c6b63acccb7c0e58a27f46ccf4c7db3f2c.zip
libffi: add patch for building with clang on power (#16855)
* libffi: add patch for building with '%clang target=power*' * libffi: fix version of clang/power patch
-rw-r--r--var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch24
-rw-r--r--var/spack/repos/builtin/packages/libffi/package.py2
2 files changed, 26 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch b/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch
new file mode 100644
index 0000000000..b6749cc26f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libffi/clang-powerpc-3.2.1.patch
@@ -0,0 +1,24 @@
+diff --git a/src/powerpc/linux64.S b/src/powerpc/linux64.S
+index d2acb70..921e9cb 100644
+--- a/src/powerpc/linux64.S
++++ b/src/powerpc/linux64.S
+@@ -83,6 +83,7 @@ ffi_call_LINUX64:
+ mr %r4, %r1
+ # if defined _CALL_LINUX || _CALL_ELF == 2
+ bl ffi_prep_args64
++ nop
+ # else
+ bl .ffi_prep_args64
+ # endif
+diff --git a/src/powerpc/linux64_closure.S b/src/powerpc/linux64_closure.S
+index 97421a4..3c62d5f 100644
+--- a/src/powerpc/linux64_closure.S
++++ b/src/powerpc/linux64_closure.S
+@@ -152,6 +152,7 @@ ffi_closure_LINUX64:
+ # make the call
+ # if defined _CALL_LINUX || _CALL_ELF == 2
+ bl ffi_closure_helper_LINUX64
++ nop
+ # else
+ bl .ffi_closure_helper_LINUX64
+ # endif
diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py
index d21b62b1e5..0ee50aec07 100644
--- a/var/spack/repos/builtin/packages/libffi/package.py
+++ b/var/spack/repos/builtin/packages/libffi/package.py
@@ -17,6 +17,8 @@ class Libffi(AutotoolsPackage, SourcewarePackage):
version('3.3', sha256='72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056')
version('3.2.1', sha256='d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37')
+ patch('clang-powerpc-3.2.1.patch', when='@3.2.1%clang platform=linux')
+
@property
def headers(self):
# The headers are probably in self.prefix.lib but we search everywhere