summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-09-29 23:21:09 +0000
committerChris Bieneman <beanz@apple.com>2015-09-29 23:21:09 +0000
commitd208e41030e13906c25d9569517e206e68f569bc (patch)
tree3c7f6adc9aee75cab3c48b9814bbfd0924a90885
parentd868fef16c7e51170ac1386c2b3f56ebcf16533d (diff)
downloadbcm5719-llvm-d208e41030e13906c25d9569517e206e68f569bc.tar.gz
bcm5719-llvm-d208e41030e13906c25d9569517e206e68f569bc.zip
[CMake] [macho_embedded] We need to set some extra flags when building the macho_embedded builtins.
If we don't specify the arm target the float ABI compiler flags get ignored. llvm-svn: 248853
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 474c9fdae0a..12c1747962a 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -338,6 +338,11 @@ function(darwin_add_embedded_builtin_libraries)
set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+
+ set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+ set(CFLAGS_armv7em "-target thumbv7-apple-darwin-eabi")
+ set(CFLAGS_armv7m "-target thumbv7-apple-darwin-eabi")
+ set(CFLAGS_i386 "-march=pentium")
set(DARWIN_SOFT_FLOAT_ARCHS armv6m armv7m armv7em armv7)
set(DARWIN_HARD_FLOAT_ARCHS armv7em armv7 i386 x86_64)
@@ -378,7 +383,7 @@ function(darwin_add_embedded_builtin_libraries)
OS macho_embedded
ARCH ${arch}
SOURCES ${${arch}_filtered_sources}
- CFLAGS -arch ${arch} ${${type}_FLAG} ${${float_type}_FLOAT_FLAG}
+ CFLAGS -arch ${arch} ${${type}_FLAG} ${${float_type}_FLOAT_FLAG} ${CFLAGS_${arch}}
PARENT_TARGET builtins)
endforeach()
foreach(lib ${macho_embedded_${lib_suffix}_libs})
OpenPOWER on IntegriCloud