compiler-rt-cross-compile.patch 854 B

12345678910111213141516
  1. Add `-target x86_64-apple-darwin' to the compiler-rt overridden CFLAGS
  2. diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
  3. index 28d398672..aac68bf36 100644
  4. --- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
  5. +++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
  6. @@ -265,7 +265,7 @@ endfunction()
  7. macro(darwin_add_builtin_libraries)
  8. set(DARWIN_EXCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Darwin-excludes)
  9. - set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer")
  10. + set(CFLAGS "-fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -target x86_64-apple-darwin -isysroot ${CMAKE_OSX_SYSROOT} -I${CMAKE_OSX_SYSROOT}/usr/include")
  11. set(CMAKE_C_FLAGS "")
  12. set(CMAKE_CXX_FLAGS "")
  13. set(CMAKE_ASM_FLAGS "")