llvm9: fix armv5* build

This commit is contained in:
Jürgen Buchmüller 2020-03-29 08:00:02 +02:00
parent 3c4f982fec
commit af05da2ad0
2 changed files with 21 additions and 28 deletions

View File

@ -1,24 +1,11 @@
--- compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S 2019-12-11 20:15:30.000000000 +0100
+++ compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S 2020-03-21 05:30:07.342179685 +0100
@@ -26,7 +26,9 @@
//
.p2align 2
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__save_vfp_d8_d15_regs)
+#if defined(COMPILER_RT_ARMHF_TARGET)
vstmdb sp!, {d8-d15} // push registers d8-d15 onto stack
+#endif
bx lr // return to prolog
END_COMPILERRT_FUNCTION(__save_vfp_d8_d15_regs)
--- compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S 2019-12-11 20:15:30.000000000 +0100
+++ compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S 2020-03-21 05:29:46.592180512 +0100
@@ -26,7 +26,9 @@
//
.p2align 2
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__restore_vfp_d8_d15_regs)
+#if defined(COMPILER_RT_ARMHF_TARGET)
vldmia sp!, {d8-d15} // pop registers d8-d15 off stack
+#endif
bx lr // return to prolog
END_COMPILERRT_FUNCTION(__restore_vfp_d8_d15_regs)
--- compiler-rt-9.0.1.src/lib/builtins/CMakeLists.txt 2019-12-11 20:15:30.000000000 +0100
+++ compiler-rt-9.0.1.src/lib/builtins/CMakeLists.txt 2020-03-29 07:23:38.172813038 +0200
@@ -419,8 +419,6 @@
)
set(arm_Thumb1_SOURCES
${arm_Thumb1_JT_SOURCES}
- ${arm_Thumb1_SjLj_EH_SOURCES}
- ${arm_Thumb1_VFPv2_SOURCES}
${arm_Thumb1_icache_SOURCES}
)

View File

@ -1,4 +1,4 @@
# Template file for 'llvm9'.
# Template file for 'llvm9'
pkgname=llvm9
version=9.0.1
revision=5
@ -57,10 +57,6 @@ if [ "$_lldb_enable" = "yes" ]; then
fi
subpackages+=" lld lld-devel"
case "$XBPS_TARGET_MACHINE" in
armv5*) broken="Tries to assemble VFP instructions with armv5tel arch";;
esac
post_patch() {
# patches
cd ${XBPS_BUILDDIR}/llvm-${version}.src
@ -75,6 +71,16 @@ post_patch() {
patch -sNp1 -i ${i}
done
case "$XBPS_TARGET_MACHINE" in
armv5*)
cd ${XBPS_BUILDDIR}/compiler-rt-${version}.src
for i in ${FILESDIR}/patches/compiler-rt/compiler-rt-*.patch; do
msg_normal "Applying $i to compiler-rt\n"
patch -sNp1 -i ${i}
done
;;
esac
if [ "$_lldb_enable" = "yes" ]; then
cd ${XBPS_BUILDDIR}/lldb-${version}.src
for i in ${FILESDIR}/patches/lldb/*.patch; do