From: LLVM Packaging Team Date: Sun, 13 Feb 2022 13:04:40 +0000 (+0000) Subject: sparc-D98575-compiler-rt X-Git-Tag: archive/raspbian/1%12.0.1-20+rpi1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf362ac2f98ff641d6c57bfd7b8407eb85186480;p=llvm-toolchain-12.git sparc-D98575-compiler-rt Gbp-Pq: Topic sparc Gbp-Pq: Name sparc-D98575-compiler-rt.patch --- diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake index 1edab43e7c..0ff9930e26 100644 --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/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