mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +00:00
Toolchain+LibC: Don't link LibC against crt0
Instead GCC should be used to automatically link against crt0 and crt0_shared depending on the type of object file that is being built. Unfortunately this requires a rebuild of the toolchain as well as everything that has been built with the old GCC.
This commit is contained in:
parent
67516fa555
commit
50e4cad4a0
2 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES} ${ASM_SOURCES})
|
|||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
|
||||
add_library(LibCStaticWithoutDeps STATIC ${SOURCES})
|
||||
target_link_libraries(LibCStaticWithoutDeps crt0 ssp)
|
||||
target_link_libraries(LibCStaticWithoutDeps ssp)
|
||||
add_dependencies(LibCStaticWithoutDeps LibM LibSystem)
|
||||
|
||||
add_custom_target(LibCStatic
|
||||
|
@ -109,7 +109,7 @@ set_property(
|
|||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
|
||||
serenity_libc(LibC c)
|
||||
target_link_libraries(LibC crt0 ssp system)
|
||||
target_link_libraries(LibC ssp system)
|
||||
|
||||
# We mark LibCStatic as a dependency of LibC because this triggers the build of the LibCStatic target
|
||||
add_dependencies(LibC LibM LibSystem LibCStatic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue