diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-20 14:23:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-20 16:24:26 +0200 |
commit | 250c3b363d4b59316ca4e95c045aa8a1dca3a028 (patch) | |
tree | e9fd9b7d8a13303a8cefa6c5c075d1ddf035dba5 | |
parent | 3d02b23af5d7ae16d71bcf9823ee63b4fec1d29a (diff) | |
download | serenity-250c3b363d4b59316ca4e95c045aa8a1dca3a028.zip |
Revert "Build: Include headers from LibC, LibM, and LibPthread with -isystem"
This reverts commit c1eb744ff0a82cf6c8e3470ac10e2f417c7d9de2.
-rw-r--r-- | Applications/Debugger/main.cpp | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | Kernel/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Libraries/LibC/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Libraries/LibDebug/DebugSession.h | 2 | ||||
-rw-r--r-- | Libraries/LibM/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Libraries/LibM/math.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibPthread/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Userland/functrace.cpp | 2 | ||||
-rw-r--r-- | Userland/strace.cpp | 2 | ||||
-rw-r--r-- | Userland/test-crypto.cpp | 2 |
11 files changed, 10 insertions, 15 deletions
diff --git a/Applications/Debugger/main.cpp b/Applications/Debugger/main.cpp index 3bba792f57..893126d6e2 100644 --- a/Applications/Debugger/main.cpp +++ b/Applications/Debugger/main.cpp @@ -30,6 +30,7 @@ #include <AK/LogStream.h> #include <AK/StringBuilder.h> #include <AK/kmalloc.h> +#include <LibC/sys/arch/i386/regs.h> #include <LibCore/File.h> #include <LibDebug/DebugInfo.h> #include <LibDebug/DebugSession.h> @@ -40,7 +41,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/arch/i386/regs.h> #include <unistd.h> static Line::Editor editor {}; diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ea505f9b0..0d0acb5f54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,6 @@ function(serenity_libc target_name fs_name) add_library(${target_name} ${SOURCES}) install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib) set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name}) - target_include_directories(${target_name} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_directories(LibC PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) endfunction() @@ -102,9 +101,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -Wno-sized-deallocation -fno-sized-d set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -DSANITIZE_PTRS") add_link_options(--sysroot ${CMAKE_BINARY_DIR}/Root) -# Source directory relative service headers +include_directories(Libraries/LibC) include_directories(Services) -# Generated Service/Library Headers include_directories(${CMAKE_CURRENT_BINARY_DIR}/Services) include_directories(${CMAKE_CURRENT_BINARY_DIR}/Libraries) diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index f6684df8ce..6ef6d24296 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -161,9 +161,6 @@ 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}) diff --git a/Libraries/LibC/CMakeLists.txt b/Libraries/LibC/CMakeLists.txt index feee96aa97..d5e94d1b96 100644 --- a/Libraries/LibC/CMakeLists.txt +++ b/Libraries/LibC/CMakeLists.txt @@ -52,8 +52,6 @@ file(GLOB ELF_SOURCES "../LibELF/*.cpp") set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/i386/plt_trampoline.S) add_library(crt0 STATIC crt0.cpp) -# We need include headers from LibC in crt0. namely, <assert.h> -target_include_directories(crt0 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) add_custom_command( TARGET crt0 COMMAND install -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o diff --git a/Libraries/LibDebug/DebugSession.h b/Libraries/LibDebug/DebugSession.h index 95687926c3..20a549f777 100644 --- a/Libraries/LibDebug/DebugSession.h +++ b/Libraries/LibDebug/DebugSession.h @@ -33,11 +33,11 @@ #include <AK/Optional.h> #include <AK/OwnPtr.h> #include <AK/String.h> +#include <LibC/sys/arch/i386/regs.h> #include <LibDebug/DebugInfo.h> #include <LibELF/Loader.h> #include <signal.h> #include <stdio.h> -#include <sys/arch/i386/regs.h> #include <sys/ptrace.h> #include <sys/wait.h> #include <unistd.h> diff --git a/Libraries/LibM/CMakeLists.txt b/Libraries/LibM/CMakeLists.txt index c9bf4dd655..7ed9959738 100644 --- a/Libraries/LibM/CMakeLists.txt +++ b/Libraries/LibM/CMakeLists.txt @@ -3,4 +3,5 @@ set(SOURCES ) serenity_libc(LibM m) +target_include_directories(LibM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(LibM LibC) diff --git a/Libraries/LibM/math.cpp b/Libraries/LibM/math.cpp index 26e9642296..021993e9d4 100644 --- a/Libraries/LibM/math.cpp +++ b/Libraries/LibM/math.cpp @@ -24,8 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <assert.h> -#include <math.h> +#include <LibC/assert.h> +#include <LibM/math.h> #include <stdint.h> #include <stdlib.h> diff --git a/Libraries/LibPthread/CMakeLists.txt b/Libraries/LibPthread/CMakeLists.txt index 3fd2e1d702..7a668f0684 100644 --- a/Libraries/LibPthread/CMakeLists.txt +++ b/Libraries/LibPthread/CMakeLists.txt @@ -4,3 +4,4 @@ set(SOURCES serenity_libc(LibPthread pthread) target_link_libraries(LibPthread LibC) +target_include_directories(LibPthread PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Userland/functrace.cpp b/Userland/functrace.cpp index 4e30d12fd8..877a7aa601 100644 --- a/Userland/functrace.cpp +++ b/Userland/functrace.cpp @@ -33,6 +33,7 @@ #include <AK/StringBuilder.h> #include <AK/kmalloc.h> #include <Kernel/Syscall.h> +#include <LibC/sys/arch/i386/regs.h> #include <LibCore/File.h> #include <LibDebug/DebugSession.h> #include <LibELF/Image.h> @@ -43,7 +44,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/arch/i386/regs.h> #include <unistd.h> static int usage() diff --git a/Userland/strace.cpp b/Userland/strace.cpp index 58e018d575..b6687cfa58 100644 --- a/Userland/strace.cpp +++ b/Userland/strace.cpp @@ -28,11 +28,11 @@ #include <AK/LogStream.h> #include <AK/Types.h> #include <Kernel/Syscall.h> +#include <LibC/sys/arch/i386/regs.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/arch/i386/regs.h> #include <sys/ptrace.h> #include <sys/wait.h> #include <unistd.h> diff --git a/Userland/test-crypto.cpp b/Userland/test-crypto.cpp index 2b0fb8b9f5..4f22de89c1 100644 --- a/Userland/test-crypto.cpp +++ b/Userland/test-crypto.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <LibC/limits.h> #include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/File.h> @@ -36,7 +37,6 @@ #include <LibCrypto/PK/RSA.h> #include <LibLine/Editor.h> #include <LibTLS/TLSv12.h> -#include <limits.h> #include <stdio.h> #include <time.h> |