Add upstream patch D98575 to fix 32-bit compiler-rt build on sparc64

This commit is contained in:
John Paul Adrian Glaubitz 2021-03-13 12:30:20 +01:00
parent e6e5801609
commit efb90982f9
3 changed files with 19 additions and 0 deletions

1
debian/changelog vendored
View File

@ -7,6 +7,7 @@ llvm-toolchain-snapshot (1:13~++20210218085556+fcdef15d77bd-1~exp1) UNRELEASED;
[ John Paul Adrian Glaubitz ]
* Add upstream patch D98574 to fix clang macro definitions on sparc64
* Add upstream patch D98575 to fix 32-bit compiler-rt build on sparc64
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Feb 2021 08:59:36 +0100

17
debian/patches/D98575.patch vendored Normal file
View File

@ -0,0 +1,17 @@
--- llvm-toolchain-snapshot-13~++20210129063721+010b176cdefb.orig/compiler-rt/cmake/base-config-ix.cmake
+++ llvm-toolchain-snapshot-13~++20210129063721+010b176cdefb/compiler-rt/cmake/base-config-ix.cmake
@@ -189,8 +189,12 @@ macro(test_targets)
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "s390x")
test_target_arch(s390x "" "")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "sparc")
- test_target_arch(sparc "" "-m32")
- test_target_arch(sparcv9 "" "-m64")
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ test_target_arch(sparc "" "-mcpu=v9" "-m32")
+ append("-latomic" CMAKE_LD_FLAGS)
+ else()
+ test_target_arch(sparcv9 "" "-m64")
+ endif()
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mipsel|mips64el")
# Gcc doesn't accept -m32/-m64 so we do the next best thing and use
# -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match

View File

@ -123,6 +123,7 @@ risc/clang-riscv64-multiarch.diff
# sparc64
D98574.patch
D98575.patch
# Compiler-rt - workaround
workaround-bug-42994-use-linker.diff