summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorNitesh Jain <nitesh.jain@imgtec.com>2017-04-24 10:36:46 +0000
committerNitesh Jain <nitesh.jain@imgtec.com>2017-04-24 10:36:46 +0000
commit2f681da9f497e0bb318f0871029084ee2075a5f7 (patch)
tree1d5cc075f9a1b36a0d39c3bff4c07082e23d14c8 /cmake
parent6ffaaaaee166c3a5d0e7402e77bb5972b9d2f710 (diff)
[LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM.
Reviewers: beanz Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste Differential Revision: https://reviews.llvm.org/D32125 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 099d2ebcc437..882d68e6b608 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -222,6 +222,13 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
endif( LLVM_BUILD_32_BITS )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
+# If building on a GNU specific 32-bit system, make sure off_t is 64 bits
+# so that off_t can stored offset > 2GB
+if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+ add_definitions( -D_LARGEFILE_SOURCE )
+ add_definitions( -D_FILE_OFFSET_BITS=64 )
+endif()
+
if( XCODE )
# For Xcode enable several build settings that correspond to
# many warnings that are on by default in Clang but are