mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
Toolchain+LibC: Fix usage of crt files
We now configure the gcc spec files to use a different crt files for static & PIE binaries. This relieves us from the need to explicitly specify the desired crt0 file in cmake scripts.
This commit is contained in:
parent
6990d62977
commit
bbedd320b5
9 changed files with 32 additions and 20 deletions
|
@ -28,8 +28,7 @@ function(serenity_lib target_name fs_name)
|
|||
serenity_install_headers(${target_name})
|
||||
serenity_install_sources("Libraries/${target_name}")
|
||||
#add_library(${target_name} SHARED ${SOURCES} ${GENERATED_SOURCES})
|
||||
add_library(${target_name} SHARED ${SOURCES} ${GENERATED_SOURCES} ${CMAKE_SOURCE_DIR}/Libraries/LibC/crt0_shared.cpp)
|
||||
#library_sources("{target_name}" PRIVATE ${CMAKE_SOURCE_DIR}/Libraries/LibC/crt0_shared.cpp)
|
||||
add_library(${target_name} SHARED ${SOURCES} ${GENERATED_SOURCES})
|
||||
install(TARGETS ${target_name} DESTINATION usr/lib)
|
||||
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name})
|
||||
serenity_generated_sources(${target_name})
|
||||
|
@ -67,7 +66,6 @@ endfunction()
|
|||
|
||||
function(serenity_bin target_name)
|
||||
add_executable(${target_name} ${SOURCES})
|
||||
target_sources(${target_name} PRIVATE ${CMAKE_SOURCE_DIR}/Libraries/LibC/crt0_shared.cpp)
|
||||
install(TARGETS ${target_name} RUNTIME DESTINATION bin)
|
||||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue