Buildsystem: Fix userspace link order

This commit is contained in:
Bananymous 2023-05-16 19:21:07 +03:00
parent 80d9f6131b
commit 82dcec9576
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ set(SOURCES
add_executable($PROGRAM_NAME \${SOURCES}) add_executable($PROGRAM_NAME \${SOURCES})
target_compile_options($PROGRAM_NAME PUBLIC -O2 -g) target_compile_options($PROGRAM_NAME PUBLIC -O2 -g)
add_dependencies($PROGRAM_NAME libc-install) add_dependencies($PROGRAM_NAME libc-install)
target_link_options($PROGRAM_NAME PUBLIC -nodefaultlibs -lc) target_link_options($PROGRAM_NAME PUBLIC -nodefaultlibs)
target_link_libraries($PROGRAM_NAME PUBLIC \${BANAN_LIB}/libc.a)
add_custom_target($PROGRAM_NAME-install add_custom_target($PROGRAM_NAME-install
COMMAND cp \${CMAKE_CURRENT_BINARY_DIR}/$PROGRAM_NAME \${BANAN_BIN}/ COMMAND cp \${CMAKE_CURRENT_BINARY_DIR}/$PROGRAM_NAME \${BANAN_BIN}/