Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From e1c6540f7984bd48e1e2d80d965fa82c70de3c20 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 17 Apr 2016 12:35:41 -0700 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
| 6 | gcc-6 has now introduced stdlib.h in libstdc++ for better |
| 7 | compliance and its including the C library stdlib.h using |
| 8 | include_next which is sensitive to order of system header |
| 9 | include paths. Its infact better to not tinker with the |
| 10 | system header include paths at all. Since adding /usr/include |
| 11 | to -system is redundant and compiler knows about it moreover |
| 12 | now with gcc6 it interferes with compiler's functioning |
| 13 | and ends up with compile errors e.g. |
| 14 | |
| 15 | /usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory |
| 16 | |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | Upstream-Status: Pending |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | --- |
| 22 | Source/JavaScriptCore/shell/CMakeLists.txt | 2 +- |
| 23 | Source/WebCore/PlatformGTK.cmake | 6 +++--- |
| 24 | Source/WebKit/PlatformGTK.cmake | 2 +- |
| 25 | Source/cmake/WebKitMacros.cmake | 2 +- |
| 26 | Tools/MiniBrowser/gtk/CMakeLists.txt | 2 +- |
| 27 | Tools/TestWebKitAPI/PlatformGTK.cmake | 2 +- |
| 28 | 6 files changed, 8 insertions(+), 8 deletions(-) |
| 29 | |
| 30 | diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | index b3c7e0b..88446de 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 32 | --- a/Source/JavaScriptCore/shell/CMakeLists.txt |
| 33 | +++ b/Source/JavaScriptCore/shell/CMakeLists.txt |
| 34 | @@ -35,7 +35,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() |
| 35 | WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES}) |
| 36 | WEBKIT_WRAP_SOURCELIST(${TESTAPI_SOURCES}) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 37 | include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 38 | -include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) |
| 39 | +include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) |
| 40 | add_executable(jsc ${JSC_SOURCES}) |
| 41 | target_link_libraries(jsc ${JSC_LIBRARIES}) |
| 42 | |
| 43 | diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | index f7d8d70a..3c27b8bc 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 45 | --- a/Source/WebCore/PlatformGTK.cmake |
| 46 | +++ b/Source/WebCore/PlatformGTK.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | @@ -157,7 +157,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) |
| 48 | target_include_directories(WebCorePlatformGTK2 PRIVATE |
| 49 | ${WebCore_INCLUDE_DIRECTORIES} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 50 | ) |
| 51 | - target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE |
| 52 | + target_include_directories(WebCorePlatformGTK2 PRIVATE |
| 53 | ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | ${GTK2_INCLUDE_DIRS} |
| 55 | ${GDK2_INCLUDE_DIRS} |
| 56 | @@ -183,7 +183,7 @@ add_dependencies(WebCorePlatformGTK WebCore) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 57 | target_include_directories(WebCorePlatformGTK PRIVATE |
| 58 | ${WebCore_INCLUDE_DIRECTORIES} |
| 59 | ) |
| 60 | -target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE |
| 61 | +target_include_directories(WebCorePlatformGTK PRIVATE |
| 62 | ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} |
| 63 | ${GTK_INCLUDE_DIRS} |
| 64 | ${GDK_INCLUDE_DIRS} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 65 | @@ -199,7 +199,7 @@ include_directories( |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 66 | "${WEBCORE_DIR}/bindings/gobject/" |
| 67 | ) |
| 68 | |
| 69 | -include_directories(SYSTEM |
| 70 | +include_directories( |
| 71 | ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} |
| 72 | ) |
| 73 | |
| 74 | diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 75 | index 8c6ebb5..772c243 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 76 | --- a/Source/WebKit/PlatformGTK.cmake |
| 77 | +++ b/Source/WebKit/PlatformGTK.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 78 | @@ -655,7 +655,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 79 | target_include_directories(WebKitPluginProcess2 PRIVATE |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 80 | ${WebKitCommonIncludeDirectories} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 81 | ) |
| 82 | - target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE |
| 83 | + target_include_directories(WebKitPluginProcess2 PRIVATE |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | ${WebKitCommonSystemIncludeDirectories} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 85 | ${GTK2_INCLUDE_DIRS} |
| 86 | ${GDK2_INCLUDE_DIRS} |
| 87 | diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 88 | index a1e7e8f..ce24274 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 89 | --- a/Source/cmake/WebKitMacros.cmake |
| 90 | +++ b/Source/cmake/WebKitMacros.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 91 | @@ -134,7 +134,7 @@ macro(WEBKIT_FRAMEWORK _target) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 92 | ${${_target}_SOURCES} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 93 | ) |
| 94 | target_include_directories(${_target} PUBLIC "$<BUILD_INTERFACE:${${_target}_INCLUDE_DIRECTORIES}>") |
| 95 | - target_include_directories(${_target} SYSTEM PRIVATE "$<BUILD_INTERFACE:${${_target}_SYSTEM_INCLUDE_DIRECTORIES}>") |
| 96 | + target_include_directories(${_target} PRIVATE "$<BUILD_INTERFACE:${${_target}_SYSTEM_INCLUDE_DIRECTORIES}>") |
| 97 | target_include_directories(${_target} PRIVATE "$<BUILD_INTERFACE:${${_target}_PRIVATE_INCLUDE_DIRECTORIES}>") |
| 98 | target_link_libraries(${_target} ${${_target}_LIBRARIES}) |
| 99 | set_target_properties(${_target} PROPERTIES COMPILE_DEFINITIONS "BUILDING_${_target}") |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 100 | diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 101 | index dc2b61e..0128dca 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 102 | --- a/Tools/MiniBrowser/gtk/CMakeLists.txt |
| 103 | +++ b/Tools/MiniBrowser/gtk/CMakeLists.txt |
| 104 | @@ -57,7 +57,7 @@ endif () |
| 105 | add_definitions(-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6) |
| 106 | |
| 107 | include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) |
| 108 | -include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) |
| 109 | +include_directories(${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) |
| 110 | add_executable(MiniBrowser ${MiniBrowser_SOURCES}) |
| 111 | target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) |
| 112 | |
| 113 | diff --git a/Tools/TestWebKitAPI/PlatformGTK.cmake b/Tools/TestWebKitAPI/PlatformGTK.cmake |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 114 | index 4aef695..a14b163 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 115 | --- a/Tools/TestWebKitAPI/PlatformGTK.cmake |
| 116 | +++ b/Tools/TestWebKitAPI/PlatformGTK.cmake |
| 117 | @@ -20,7 +20,7 @@ include_directories( |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 118 | ${WEBKIT_DIR}/UIProcess/API/gtk |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 119 | ) |
| 120 | |
| 121 | -include_directories(SYSTEM |
| 122 | +include_directories( |
| 123 | ${GDK3_INCLUDE_DIRS} |
| 124 | ${GLIB_INCLUDE_DIRS} |
| 125 | ${GTK3_INCLUDE_DIRS} |