2026-02-19 19:31:15 +00:00
|
|
|
file(GLOB c_sources *.c *.h)
|
|
|
|
|
file(GLOB arch_sources arch/${CMAKE_SYSTEM_PROCESSOR}/*.S)
|
|
|
|
|
|
|
|
|
|
set_property(SOURCE ${arch_sources} PROPERTY LANGUAGE C)
|
|
|
|
|
|
|
|
|
|
add_executable(bootstrap ${c_sources} ${arch_sources})
|
|
|
|
|
|
2026-02-26 19:47:58 +00:00
|
|
|
target_link_libraries(bootstrap libmango ulibc liblaunch interface::fs)
|
2026-02-19 19:31:15 +00:00
|
|
|
|
|
|
|
|
target_compile_options(bootstrap PRIVATE
|
|
|
|
|
-fPIC -pie -fno-stack-protector -nostdlib -ffreestanding)
|
|
|
|
|
target_link_options(bootstrap PRIVATE
|
|
|
|
|
-fPIC -static -pie -nostdlib -ffreestanding
|
|
|
|
|
-T ${CMAKE_CURRENT_SOURCE_DIR}/arch/${TARGET_ARCH}/layout.ld)
|