From 496adb61a437cc9943e114eba8a4dc46323d89c0 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 16 May 2023 19:21:07 +0300 Subject: [PATCH] Buildsystem: Fix userspace link order --- userspace/create_program.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/userspace/create_program.sh b/userspace/create_program.sh index d833a912..2b25b782 100755 --- a/userspace/create_program.sh +++ b/userspace/create_program.sh @@ -18,7 +18,8 @@ set(SOURCES add_executable($PROGRAM_NAME \${SOURCES}) target_compile_options($PROGRAM_NAME PUBLIC -O2 -g) 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 COMMAND cp \${CMAKE_CURRENT_BINARY_DIR}/$PROGRAM_NAME \${BANAN_BIN}/