libc: Remove crti.o and crtn.o
Some checks failed
continuous-integration/drone/push Build is failing

Looks like these are now provided by the compiler.
This commit is contained in:
apio 2023-01-06 17:59:54 +01:00
parent 8838e2cf22
commit bdfe7dac17
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 1 additions and 35 deletions

View File

@ -22,18 +22,6 @@ add_custom_command(
COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_OBJECTS:crt0> ${LUNA_BASE}/usr/lib/crt0.o COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_OBJECTS:crt0> ${LUNA_BASE}/usr/lib/crt0.o
) )
add_library(crti STATIC src/arch/${ARCH}/crti.S)
add_custom_command(
TARGET crti
COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_OBJECTS:crti> ${LUNA_BASE}/usr/lib/crti.o
)
add_library(crtn STATIC src/arch/${ARCH}/crtn.S)
add_custom_command(
TARGET crtn
COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_OBJECTS:crtn> ${LUNA_BASE}/usr/lib/crtn.o
)
add_library(bare_libc STATIC ${SOURCES}) add_library(bare_libc STATIC ${SOURCES})
target_link_libraries(bare_libc PUBLIC luna) target_link_libraries(bare_libc PUBLIC luna)
@ -52,7 +40,7 @@ add_custom_target(libc
COMMAND ${CMAKE_AR} -rcs ${CMAKE_CURRENT_BINARY_DIR}/libc.a *.o COMMAND ${CMAKE_AR} -rcs ${CMAKE_CURRENT_BINARY_DIR}/libc.a *.o
COMMAND rm *.o COMMAND rm *.o
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS bare_libc luna crti crtn crt0 DEPENDS bare_libc luna crt0
) )
add_custom_command( add_custom_command(

View File

@ -1,13 +0,0 @@
.section .init
.global _init
_init:
push %rbp
movq %rsp, %rbp
/* gcc will nicely put the contents of crtbegin.o's .init section here. */
.section .fini
.global _fini
_fini:
push %rbp
movq %rsp, %rbp
/* gcc will nicely put the contents of crtbegin.o's .fini section here. */

View File

@ -1,9 +0,0 @@
.section .init
/* gcc will nicely put the contents of crtend.o's .init section here. */
popq %rbp
ret
.section .fini
/* gcc will nicely put the contents of crtend.o's .fini section here. */
popq %rbp
ret