summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2019-05-23 23:08:33 +0000
committerTom Stellard <tstellar@redhat.com>2019-05-23 23:08:33 +0000
commit94ed517a442fd733ade35679142f1abd3fdb9217 (patch)
tree78c5764c51c84b126ebfb128fb5564a287d31afa
parent64d2bcece5858b0d9c19834ac9b9f9024e52d306 (diff)
downloadcompiler-rt-94ed517a442fd733ade35679142f1abd3fdb9217.tar.gz
Merging r360825:
------------------------------------------------------------------------ r360825 | atanasyan | 2019-05-15 15:27:19 -0700 (Wed, 15 May 2019) | 14 lines [mips] Always use _LARGEFILE_SOURCE / _FILE_OFFSET_BITS for building MIPS 32-bit When MIPS 32-bit compiler-rt is building on 32-bit host or using 32-bit `DLLVM_HOST_TRIPLE` the `_LARGEFILE_SOURCE` and the `_FILE_OFFSET_BITS=64` macros defined by statements from the `HandleLLVMOptions.cmake`. In case of building 32-bit libraries on 64-bit host using default host triple these macros are not defined. As a result assertions check a consistency between the `struct_kernel_stat_sz` constant and the `struct_kernel_stat_sz` start to fail. To resolve this problem and enable building both 32/64-bit versions of MIPS compiler-rt libraries on 64-bit host at once always explicitly define the `_LARGEFILE_SOURCE` and the `_FILE_OFFSET_BITS=64` macros for MIPS 32-bit. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@361568 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/base-config-ix.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 6684d7371..aeabf1765 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -195,10 +195,10 @@ macro(test_targets)
# clang's default CPU's. In the 64-bit case, we must also specify the ABI
# since the default ABI differs between gcc and clang.
# FIXME: Ideally, we would build the N32 library too.
- test_target_arch(mipsel "" "-mips32r2" "-mabi=32")
+ test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
- test_target_arch(mips "" "-mips32r2" "-mabi=32")
+ test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
if(WIN32)