mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +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
|
@ -1,7 +1,6 @@
|
|||
set(LIBC_SOURCES
|
||||
arpa/inet.cpp
|
||||
assert.cpp
|
||||
crt0_shared.cpp
|
||||
ctype.cpp
|
||||
cxxabi.cpp
|
||||
dirent.cpp
|
||||
|
@ -64,6 +63,11 @@ add_custom_command(
|
|||
TARGET crt0
|
||||
COMMAND ${INSTALL_COMMAND} -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o
|
||||
)
|
||||
add_library(crt0_shared STATIC crt0_shared.cpp)
|
||||
add_custom_command(
|
||||
TARGET crt0_shared
|
||||
COMMAND ${INSTALL_COMMAND} -D $<TARGET_OBJECTS:crt0_shared> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0_shared.o
|
||||
)
|
||||
|
||||
set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue