Fix Building

This commit is contained in:
Thomas A 2023-02-05 17:41:29 -08:00
parent 4640018744
commit 727e6edc97

View File

@ -7,27 +7,42 @@ set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 0)
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -nostdinc++ -fno-rtti -fno-exceptions -funwind-tables -ggdb -O0") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBUNWIND_IS_NATIVE_ONLY -nostdinc -nostdinc++ -fno-rtti -fno-exceptions -funwind-tables -ggdb -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -nostdinc -fno-rtti -funwind-tables -ggdb -O0") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -nostdinc -fno-rtti -funwind-tables -ggdb -O0")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libunwind/src)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libunwind/include)
set(libunwind_sources set(LIBUNWIND_CXX_SOURCES
src/libuwind.cxx libunwind/src/libunwind.cpp
src/Registers.S libunwind/src/Unwind-EHABI.cpp
src/unw_getcontext.S libunwind/src/Unwind-seh.cpp
src/UnwindLevel1.c libunwind/src/Unwind_AppleExtras.cpp
src/UnwindLevel1-gcc-ext.c )
src/Unwind-sjlj.c
set(LIBUNWIND_C_SOURCES
libunwind/src/UnwindLevel1.c
libunwind/src/UnwindLevel1-gcc-ext.c
libunwind/src/Unwind-sjlj.c
)
set(LIBUNWIND_ASM_SOURCES
libunwind/src/UnwindRegistersRestore.S
libunwind/src/UnwindRegistersSave.S
)
set(LIBUNWIND_SOURCES
${LIBUNWIND_CXX_SOURCES}
${LIBUNWIND_C_SOURCES}
${LIBUNWIND_ASM_SOURCES}
) )
set(DYLIB_INSTALL_NAME "/usr/lib/system/libunwind.dylib") set(DYLIB_INSTALL_NAME "/usr/lib/system/libunwind.dylib")
add_circular(unwind FAT add_circular(unwind FAT
SOURCES SOURCES
${libunwind_sources} ${LIBUNWIND_SOURCES}
SIBLINGS SIBLINGS
system_c system_c
keymgr keymgr
@ -37,7 +52,7 @@ add_circular(unwind FAT
#make_fat(unwind) #make_fat(unwind)
include(darling_static_lib) include(darling_static_lib)
add_darling_static_library(unwind_static SOURCES ${libunwind_sources}) add_darling_static_library(unwind_static SOURCES ${LIBUNWIND_SOURCES})
set_target_properties(unwind_static PROPERTIES COMPILE_FLAGS "-DNDEBUG=1") set_target_properties(unwind_static PROPERTIES COMPILE_FLAGS "-DNDEBUG=1")
make_fat(unwind_static) make_fat(unwind_static)