mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +00:00
Meta: Make it possible to (somewhat) build the system inside Serenity
This removes some hard references to the toolchain, some unnecessary uses of an external install command, and disables a -Werror flag (for the time being) - only if run inside serenity. With this, we can build and link the kernel :^)
This commit is contained in:
parent
80d6f46d4e
commit
5729e76c7d
3 changed files with 27 additions and 20 deletions
|
@ -306,7 +306,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE -fno-rtti -ffreestanding -fbu
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-80387 -mno-mmx -mno-sse -mno-sse2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-asynchronous-unwind-tables")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib -nostdinc -nostdinc++")
|
||||
if (NOT ${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib -nostdinc -nostdinc++")
|
||||
endif()
|
||||
|
||||
# Kernel Address Sanitize (KASAN) implementation is still a work in progress, this option
|
||||
# is not currently meant to be used, besides when developing Kernel ASAN support.
|
||||
|
@ -329,7 +331,6 @@ file(GENERATE OUTPUT linker.ld INPUT linker.ld)
|
|||
|
||||
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
|
||||
include_directories(/usr/local/include/c++/10.2.0/)
|
||||
include_directories(/usr/local/include/c++/10.2.0/${SERENITY_ARCH}-pc-serenity/)
|
||||
else()
|
||||
include_directories(../Toolchain/Local/${SERENITY_ARCH}/${SERENITY_ARCH}-pc-serenity/include/c++/10.2.0/)
|
||||
include_directories(../Toolchain/Local/${SERENITY_ARCH}/${SERENITY_ARCH}-pc-serenity/include/c++/10.2.0/${SERENITY_ARCH}-pc-serenity/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue