build/build-clang/compiler-rt-cross-compile.patch
author Tim Nguyen <ntim.bugs@gmail.com>
Wed, 06 Mar 2019 23:38:06 +0100
changeset 520647 41c00dfcd1b6772781d1f74da8464562024d9e1a
parent 508170 eb20068ba6ea62c0dd38aba6e3e7b5e2d0bcd78c
child 534292 2e560a9e4bcffc8476086c1da25c7412cd9a1805
permissions -rw-r--r--
Bug 1532632 - Followup: replace readonly="true" with readonly="readonly" in certViewer.xul's second textarea. r=me

Add `-target x86_64-darwin11' to the compiler-rt overridden CFLAGS

diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 28d398672..aac68bf36 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -265,7 +265,7 @@ endfunction()
 macro(darwin_add_builtin_libraries)
   set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)
 
-  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
+  set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-darwin11 -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
   set(CMAKE_C_FLAGS "")
   set(CMAKE_CXX_FLAGS "")
   set(CMAKE_ASM_FLAGS "")