aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2023-07-16 23:06:01 +0200
committerSylvestre Ledru <sylvestre@debian.org>2023-07-17 09:59:56 +0200
commitb446c6dfcf42f39c7f1fce204ccb51e9dcd89046 (patch)
treed8709f55824ea3e64fd613e3e67b881fc7708cf8 /compiler-rt
parentcc006acdd6d7280a85c63fe375a4c9d1738e3fcd (diff)
downloadllvm-b446c6dfcf42f39c7f1fce204ccb51e9dcd89046.zip
llvm-b446c6dfcf42f39c7f1fce204ccb51e9dcd89046.tar.gz
llvm-b446c6dfcf42f39c7f1fce204ccb51e9dcd89046.tar.bz2
cmake: set _LARGEFILE_SOURCE=1 to fix a cmake error
``` -- Performing additional configure checks with target flags: -mips32r2;-mabi=32;-D_LARGEFILE_SOURCE;-D_FILE_OFFSET_BITS=64 -- Performing Test COMPILER_RT_HAS_mips_FLOAT16 CMake Error: Parse error in command line argument: _LARGEFILE_SOURCE Should be: VAR:type=value ``` See: https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-16&arch=mips64el&ver=1%3A16.0.6-4&stamp=1689111818&raw=0 Differential Revision: https://reviews.llvm.org/D155409
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/cmake/base-config-ix.cmake8
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt2
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index ede8428..9c62320 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -228,16 +228,16 @@ macro(test_targets)
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
# FIXME: Ideally, we would build the N32 library too.
if("${COMPILER_RT_MIPS_EL}" AND ("${COMPILER_RT_MIPS32R6}" OR "${COMPILER_RT_MIPS64R6}"))
- test_target_arch(mipsel "" "-mips32r6" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
+ test_target_arch(mipsel "" "-mips32r6" "-mabi=32" "-D_LARGEFILE_SOURCE=1" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64el "" "-mips64r6" "-mabi=64")
elseif("${COMPILER_RT_MIPS_EL}")
- test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
+ test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE=1" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_MIPS32R6}" OR "${COMPILER_RT_MIPS64R6}")
- test_target_arch(mips "" "-mips32r6" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
+ test_target_arch(mips "" "-mips32r6" "-mabi=32" "-D_LARGEFILE_SOURCE=1" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64 "" "-mips64r6" "-mabi=64")
else()
- test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
+ test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE=1" "-D_FILE_OFFSET_BITS=64")
test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
endif()
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index 972176d..c6f6633 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -165,7 +165,7 @@ set_target_properties(SanitizerUnitTests PROPERTIES FOLDER "Compiler-RT Tests")
macro(add_sanitizer_tests_for_arch arch)
set(extra_flags)
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
- list(APPEND extra_flags "-D_LARGEFILE_SOURCE")
+ list(APPEND extra_flags "-D_LARGEFILE_SOURCE=1")
list(APPEND extra_flags "-D_FILE_OFFSET_BITS=64")
endif()
get_sanitizer_common_lib_for_arch(${arch} SANITIZER_COMMON_LIB)