mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-26 22:00:29 +00:00
Add libgcc_s build
This commit is contained in:
parent
9dc2ca57eb
commit
d07dff95de
@ -10,5 +10,6 @@
|
||||
/usr/lib/libz.dylib=libz.so
|
||||
/usr/lib/libbz2.1.0.dylib=libbz2.so
|
||||
/usr/lib/libbz2=libbz2.so
|
||||
/usr/lib/libgcc_s.1.dylib=libgcc_s.so
|
||||
/usr/lib/libobjc.A.dylib=libobjc.so
|
||||
|
||||
|
@ -56,6 +56,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/duct/include")
|
||||
|
||||
add_subdirectory(libc)
|
||||
add_subdirectory(libm)
|
||||
add_subdirectory(libgcc)
|
||||
add_subdirectory(libinfo)
|
||||
add_subdirectory(libmalloc)
|
||||
add_subdirectory(libunwind)
|
||||
|
24
src/libgcc/CMakeLists.txt
Normal file
24
src/libgcc/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
||||
project(libgcc)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
|
||||
|
||||
set(libgcc_sources
|
||||
dummy.c
|
||||
)
|
||||
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling")
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
add_library(gcc_s SHARED ${libgcc_sources})
|
||||
# target_link_libraries(gcc_s -lgcc)
|
||||
# TODO: link against libcompiler_rt
|
||||
|
||||
install(TARGETS gcc_s DESTINATION lib${SUFFIX}/darling)
|
3
src/libgcc/dummy.c
Normal file
3
src/libgcc/dummy.c
Normal file
@ -0,0 +1,3 @@
|
||||
// For binary compatibility only
|
||||
void mach_init_routine() {}
|
||||
|
Loading…
Reference in New Issue
Block a user