From 24fc8ecb97556aec8704ddb9d2687463d1fcea63 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 21 Mar 2026 10:55:49 +0000 Subject: [PATCH] bootstrap: configure to build as a purely static executable --- sys/bootstrap/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/bootstrap/CMakeLists.txt b/sys/bootstrap/CMakeLists.txt index 072fb9a..a3412ac 100644 --- a/sys/bootstrap/CMakeLists.txt +++ b/sys/bootstrap/CMakeLists.txt @@ -10,7 +10,8 @@ target_link_libraries(bootstrap interface::fs) target_compile_options(bootstrap PRIVATE - -fno-stack-protector -nostdlib -ffreestanding) + -fno-stack-protector -nostdlib -ffreestanding -fno-PIC) target_link_options(bootstrap PRIVATE - -static -nostdlib -ffreestanding) - #-T ${CMAKE_CURRENT_SOURCE_DIR}/arch/${TARGET_ARCH}/layout.ld) + -static -nostdlib -ffreestanding) + +set_target_properties(bootstrap PROPERTIES POSITIION_INDEPENDENT_CODE FALSE)