libomp: fix build on ppc64 and restrict archs

This commit is contained in:
q66 2019-11-26 00:22:04 +01:00 committed by Helmut Pozimski
parent a8138d295d
commit 9293016621
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,64 @@
Remove the invalid assumption that ELFv2 == LE.
--- runtime/src/z_Linux_asm.S
+++ runtime/src/z_Linux_asm.S
@@ -1503,12 +1503,12 @@ KMP_LABEL(kmp_1):
// return: r3 (always 1/TRUE)
//
.text
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
.abiversion 2
# endif
.globl __kmp_invoke_microtask
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
.p2align 4
# else
.p2align 2
@@ -1516,7 +1516,7 @@ KMP_LABEL(kmp_1):
.type __kmp_invoke_microtask,@function
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
__kmp_invoke_microtask:
.Lfunc_begin0:
.Lfunc_gep0:
@@ -1560,7 +1560,7 @@ __kmp_invoke_microtask:
.cfi_offset lr, 16
// Compute the size necessary for the local stack frame.
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
li 12, 72
# else
li 12, 88
@@ -1638,7 +1638,7 @@ __kmp_invoke_microtask:
// for the microtask begins 48 + 8*8 == 112 bytes above r1 for ELFv1 and
// 32 + 8*8 == 96 bytes above r1 for ELFv2.
addi 4, 4, 40
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
addi 12, 1, 88
# else
addi 12, 1, 104
@@ -1650,7 +1650,7 @@ __kmp_invoke_microtask:
bdnz .Lnext
.Lcall:
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
std 2, 24(1)
mr 12, 3
#else
@@ -1666,7 +1666,7 @@ __kmp_invoke_microtask:
mtctr 12
bctrl
-# if KMP_ARCH_PPC64_LE
+# if _CALL_ELF == 2
ld 2, 24(1)
# else
ld 2, 40(1)

View file

@ -2,6 +2,7 @@
pkgname=libomp
version=8.0.0
revision=1
archs="x86_64* i686* armv[67]* aarch64* ppc64*"
wrksrc="openmp-${version}.src"
build_style=cmake
configure_args="-DLIBOMP_ENABLE_SHARED=ON -DLIBOMP_INSTALL_ALIASES=OFF"
@ -14,6 +15,11 @@ homepage="https://openmp.llvm.org"
distfiles="https://releases.llvm.org/${version}/openmp-${version}.src.tar.xz"
checksum=f7b1705d2f16c4fc23d6531f67d2dd6fb78a077dd346b02fed64f4b8df65c9d5
do_check() {
# requires lit and clang, lit is not packaged
:
}
libomp-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}-${version}_${revision}"