summaryrefslogtreecommitdiff
path: root/Kernel/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrew Kaster <andrewdkaster@gmail.com>2020-05-18 18:54:51 -0600
committerAndreas Kling <kling@serenityos.org>2020-05-20 08:37:50 +0200
commitc1eb744ff0a82cf6c8e3470ac10e2f417c7d9de2 (patch)
tree02aca2ec7136f8ceb24221506aedffb80e62aa4f /Kernel/CMakeLists.txt
parentcdbbe14062ea49f9a9d9b0e5627aba9efd07659a (diff)
downloadserenity-c1eb744ff0a82cf6c8e3470ac10e2f417c7d9de2.zip
Build: Include headers from LibC, LibM, and LibPthread with -isystem
Make sure that userspace is always referencing "system" headers in a way that would build on target :). This means removing the explicit include_directories of Libraries/LibC in favor of having it export its headers as SYSTEM. Also remove a redundant include_directories of Libraries in the 'serenity build' part of the build script. It's already set at the top. This causes issues for the Kernel, and for crt0.o. These special cases are handled individually.
Diffstat (limited to 'Kernel/CMakeLists.txt')
-rw-r--r--Kernel/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 6ef6d24296..f6684df8ce 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -161,6 +161,9 @@ if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
else()
include_directories(../Toolchain/Local/i686-pc-serenity/include/c++/10.1.0/)
include_directories(../Toolchain/Local/i686-pc-serenity/include/c++/10.1.0/i686-pc-serenity/)
+ # FIXME: Many files include <LibC/sys/ioctl_numbers.h> and <LibC/errno_numbers.h>
+ # With -nostdinc, this makes it interesting to include these headers properly
+ include_directories(../Libraries/LibC)
endif()
add_executable(Kernel ${SOURCES})