[compiler-rt] [compiler-rt] Fix building on OpenBSD/amd64 (PR #165086)
Oliver Hunt via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 00:01:00 PDT 2025
================
@@ -234,13 +234,29 @@ macro(test_targets)
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le|ppc64le")
test_target_arch(powerpc64le "" "-m64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc")
- test_target_arch(powerpc "" "-m32")
- test_target_arch(powerpc64 "" "-m64")
+ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
+ test_target_arch(powerpc "" "-m32")
+ test_target_arch(powerpc64 "" "-m64")
+ else()
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ test_target_arch(powerpc "" "-m32")
+ else()
+ test_target_arch(powerpc64 "" "-m64")
+ endif()
+ endif()
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(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
----------------
ojhunt wrote:
ditto
https://github.com/llvm/llvm-project/pull/165086
More information about the llvm-commits
mailing list