Files
Khem Raj fd064db6b1 webkitgtk3: upgrade 2.50.6 -> 2.52.4
fix -Werror=poison-system-directories in g-ir-scanner

CMake's pkg_check_modules stores the bare INCLUDEDIR variable (/usr/include)
on imported targets' INTERFACE_INCLUDE_DIRECTORIES. WebKit's FindGI.cmake
forwards every interface include dir to g-ir-scanner as -I, so the
introspection compile is invoked with -I/usr/include. With a GCC configured
with --enable-poison-system-directories=error (as in OpenEmbedded cross gcc):

  cc1: error: include location "/usr/include" is unsafe for cross-compilation
  [-Werror=poison-system-directories]

g-ir-scanner only extracts -D/-I/-U from CFLAGS (not -Wno-error flags), so the
warning cannot be relaxed via the recipe CFLAGS. Filter the bare host system
include directories (/usr/include, /usr/local/include) out of the scanner flags
in FindGI.cmake instead; the sysroot include path is added automatically.

filter bare system include dirs from gir generator expr

The FindGI g-ir-scanner fix only filtered /usr/include from the dependency
loop that builds scanner_flags. The include dirs also reach the scanner via
the per-target INTERFACE_INCLUDE_DIRECTORIES generator expression that is
joined into -I flags on the g-ir-scanner command line, which was left
unfiltered.

JavaScriptCore-4.1.gir happens to carry no bare /usr/include on its target
so it succeeded, but WebKit2/WebKitGTK does, so the WebKitGTK introspection
still failed under the OpenEmbedded cross compiler:

  cc1: error: include location "/usr/include" is unsafe for cross-compilation
  [-Werror=poison-system-directories]

Filter /usr/include and /usr/local/include out of the target_inc generator
expression with $<FILTER:...,EXCLUDE,...> too.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-06-28 00:59:19 -07:00
..