summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-02-10 01:42:44 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-02-10 01:42:44 +0000
commit54a0e40442a9c9cbb696097e9dc29ed9b5d8b7f8 (patch)
treea1e384af85a12ed50941f00d9106dbc7c9074bdf
parente4725beba7e79312809b7d4aedc07db255b26bc7 (diff)
downloadbcm5719-llvm-54a0e40442a9c9cbb696097e9dc29ed9b5d8b7f8.tar.gz
bcm5719-llvm-54a0e40442a9c9cbb696097e9dc29ed9b5d8b7f8.zip
[CMake] PowerPC: detect host endianness to build corresponding version of runtimes.
Prior to this change we built two identical runtimes, named "powerpc64" and "powerpc64le", while their actual endianness matched the host endianness. llvm-svn: 228650
-rw-r--r--compiler-rt/cmake/config-ix.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 32bd65e8392..c8c01e96b3a 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -1,6 +1,7 @@
include(CheckCXXCompilerFlag)
include(CheckLibraryExists)
include(CheckSymbolExists)
+include(TestBigEndian)
# CodeGen options.
check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG)
@@ -144,8 +145,12 @@ else()
test_target_arch(i386 "")
endif()
elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
- test_target_arch(powerpc64 "-m64")
- test_target_arch(powerpc64le "-m64")
+ TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN)
+ if(HOST_IS_BIG_ENDIAN)
+ test_target_arch(powerpc64 "-m64")
+ else()
+ test_target_arch(powerpc64le "-m64")
+ endif()
elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
# regex for mipsel, mips64el
OpenPOWER on IntegriCloud