[PATCH] [sanitizer][MIPS] Add --target flag for MIPS32
Sagar Thakur
Sagar.Thakur at imgtec.com
Thu May 7 01:25:32 PDT 2015
Addressed review comments
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9249
Files:
cmake/Modules/CompilerRTCompile.cmake
cmake/config-ix.cmake
Index: cmake/Modules/CompilerRTCompile.cmake
===================================================================
--- cmake/Modules/CompilerRTCompile.cmake
+++ cmake/Modules/CompilerRTCompile.cmake
@@ -46,6 +46,7 @@
else()
string(REPLACE " " ";" global_flags "${CMAKE_C_FLAGS}")
endif()
+ string(REPLACE " " ";" SOURCE_CFLAGS "${SOURCE_CFLAGS}")
if (MSVC)
translate_msvc_cflags(global_flags "${global_flags}")
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -196,11 +196,11 @@
# FIXME: Ideally, we would build the N32 library too.
if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
# regex for mipsel, mips64el
- test_target_arch(mipsel "" "-mips32r2")
- test_target_arch(mips64el "" "-mips64r2 -mabi=n64")
+ test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
+ test_target_arch(mips64el "" "-mips64r2" "-mabi=n64")
else()
- test_target_arch(mips "" "-mips32r2")
- test_target_arch(mips64 "" "-mips64r2 -mabi=n64")
+ test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
+ test_target_arch(mips64 "" "-mips64r2" "-mabi=n64")
endif()
elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm")
test_target_arch(arm "" "-march=armv7-a")
@@ -231,6 +231,11 @@
if(ARCH_INDEX EQUAL -1)
message(FATAL_ERROR "Unsupported architecture: ${arch}")
else()
+ set(argstring "")
+ foreach(CFLAG ${TARGET_${arch}_CFLAGS})
+ set(argstring "${argstring} ${CFLAG}")
+ endforeach()
+ set(TARGET_${arch}_CFLAGS ${argstring})
set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE)
endif()
endfunction()
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9249.25141.patch
Type: text/x-patch
Size: 1743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/df1e75d4/attachment.bin>
More information about the llvm-commits
mailing list