From 414f0f6cd9393f7a12cac86ba1cc0532e8f679bc Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 3 Apr 2024 14:45:28 +0300 Subject: [PATCH] Userspace: Don't link with libc This fixes bug where sometimes cmake does not find libc from sysroot LibC is linked per program in its own CMakeLists.txt --- userspace/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/userspace/CMakeLists.txt b/userspace/CMakeLists.txt index 85e158a3..7e59a16d 100644 --- a/userspace/CMakeLists.txt +++ b/userspace/CMakeLists.txt @@ -56,7 +56,8 @@ add_subdirectory(aoc2023) foreach(USERSPACE_PROJECT ${USERSPACE_PROJECTS}) target_compile_options(${USERSPACE_PROJECT} PRIVATE -g) - add_dependencies(${USERSPACE_PROJECT} libc-install ban-install) add_dependencies(userspace ${USERSPACE_PROJECT}) add_dependencies(userspace-install ${USERSPACE_PROJECT}-install) + + target_link_options(${USERSPACE_PROJECT} PRIVATE -nolibc) endforeach()