Update patches applied to WebKitGTK+, fix Wayland-only builds
cover Update patches applied to WebKitGTK+, fix Wayland-only builds
Hi all,
This patch set removes a patch which has been included upstream for a while, and then adds two to fix the build for ARMv8-A, plus one patch to fix the build when only Wayland is used (and X11 is disabled). All the patches were pulled from their respective bug reports at bugs.webkit.org and they will be included in future releases.
Tested by building for the Raspberry Pi 3, using raspberrypi3_defconfig as starting point, which makes the cross-compiler specifically target ARMv8-A (so it defined __ARCH_ARM_8A__ instead of the more generic __ARCH_ARM_8__).
Cheers,
Adrian Perez de Castro (4):
webkitgtk: Remove patch uneeded for the current version
webkitgtk: Add patches which allow building for ARMv8-A
webkitgtk: Add patch to allow Wayland-only builds
webkitgtk: Ensure that Mesa headers do not include X11 headers on
Wayland builds
...lure-to-build-when-the-compiler-specifica.patch | 20 ++++++++ package/webkitgtk/0001-fix-gcc6-builds.patch | 53 ---------------------- ...-to-build-when-the-compiler-specifically-.patch | 20 ++++++++ .../webkitgtk/0003-angle-egl-wayland-support.patch | 45 ++++++++++++++++++ package/webkitgtk/webkitgtk.mk | 3 ++ 5 files changed, 88 insertions(+), 53 deletions(-) create mode 100644 package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch delete mode 100644 package/webkitgtk/0001-fix-gcc6-builds.patch create mode 100644 package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch create mode 100644 package/webkitgtk/0003-angle-egl-wayland-support.patch
Signature · 1 line
2.13.2
PATCH 1/4 webkitgtk: Remove patch uneeded for the current version
Version 2.16.5 of WebKitGTK+ already includes the fix added by the removed patch, which is now unneeded.
--- package/webkitgtk/0001-fix-gcc6-builds.patch | 53 ---------------------------- 1 file changed, 53 deletions(-) delete mode 100644 package/webkitgtk/0001-fix-gcc6-builds.patch
package/webkitgtk/0001-fix-gcc6-builds.patch deleted +0 -53
@@ -1,53 +0,0 @@ -[CMake] Build failure with GCC 6 (fatal error: stdlib.h: No such file or directory) - -https://bugs.webkit.org/show_bug.cgi?id=161697 - -Reviewed by Michael Catanzaro. - -Get the list of system includes from GCC and add it to the CMake -list of implicit includes. This way, CMake will filter any of this -directories from the list of includes when calling the compiler. - -This avoids an issue with GCC 6 that causes build failures when -including the default include path as a system include (-isystem). - -Upstream, from: https://trac.webkit.org/changeset/205672 - -Signed-off-by: Gustavo Zacarias <[email protected]> - -Index: trunk/Source/cmake/OptionsCommon.cmake -=================================================================== ---- trunk/Source/cmake/OptionsCommon.cmake (revision 204084) -+++ trunk/Source/cmake/OptionsCommon.cmake (revision 205672) -@@ -36,4 +36,31 @@ - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics") -+endif () -+ -+# Ensure that the default include system directories are added to the list of CMake implicit includes. -+# This workarounds an issue that happens when using GCC 6 and using system includes (-isystem). -+# For more details check: https://bugs.webkit.org/show_bug.cgi?id=161697 -+macro(DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _compiler _flags _result) -+ file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n") -+ separate_arguments(_buildFlags UNIX_COMMAND "${_flags}") -+ execute_process(COMMAND ${_compiler} ${_buildFlags} -v -E -x ${_lang} -dD dummy -+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles OUTPUT_QUIET -+ ERROR_VARIABLE _gccOutput) -+ file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy") -+ if ("${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list") -+ set(${_result} ${CMAKE_MATCH_1}) -+ string(REPLACE "\n" " " ${_result} "${${_result}}") -+ separate_arguments(${_result}) -+ endif () -+endmacro() -+ -+if (CMAKE_COMPILER_IS_GNUCC) -+ DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}" SYSTEM_INCLUDE_DIRS) -+ set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS}) -+endif () -+ -+if (CMAKE_COMPILER_IS_GNUCXX) -+ DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c++" "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_FLAGS}" SYSTEM_INCLUDE_DIRS) -+ set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS}) - endif () -
Signature · 1 line
2.13.2
Thomas Petazzoni
AppliedPATCH 1/4 webkitgtk: Remove patch uneeded for the current version
Hello,
Quoted 8 lines · Adrian Perez de Castro
Version 2.16.5 of WebKitGTK+ already includes the fix added by the removed patch, which is now unneeded.
Signed-off-by Adrian Perez de Castro <[email protected]>--- package/webkitgtk/0001-fix-gcc6-builds.patch | 53 ---------------------------- 1 file changed, 53 deletions(-) delete mode 100644 package/webkitgtk/0001-fix-gcc6-builds.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/4 webkitgtk: Remove patch uneeded for the current version
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hello,
Quoted 4 lines · Adrian Perez de Castro
Version 2.16.5 of WebKitGTK+ already includes the fix added by the removed patch, which is now unneeded.
Signed-off-by Adrian Perez de Castro <[email protected]>
Committed to 2017.02.x and 2017.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/4 webkitgtk: Add patches which allow building for ARMv8-A
In reply to Adrian Perez de CastroThe two added patches allow building WebKitGTK+ when the compiler scpecifically targets ARMv8-A, and reports as such be pre-defining __ARCH_ARM_8A__ instead of just __ARCH_ARM_8__. Both patches were pulled from the corresponding upstream bug reports and edited to remove the conflicting parts which edit the ChangeLog files.
--- ...ailure-to-build-when-the-compiler-specifica.patch | 20 ++++++++++++++++++++ ...re-to-build-when-the-compiler-specifically-.patch | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch create mode 100644 package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch new file +20 -0
@@ -0,0 +1,20 @@ +bmalloc: Failure to build when the compiler specifically targets ARMv8-A / defines __ARM_ARCH_8A__ + +Upstream, from https://bugs.webkit.org/show_bug.cgi?id=174424 + +Signed-off-by: Adrian Perez de Castro <[email protected]> + +diff --git a/Source/bmalloc/bmalloc/BPlatform.h b/Source/bmalloc/bmalloc/BPlatform.h +index 45bbc249f59..597f7819d18 100644 +--- a/Source/bmalloc/bmalloc/BPlatform.h ++++ b/Source/bmalloc/bmalloc/BPlatform.h +@@ -123,7 +123,8 @@ + || defined(__ARM_ARCH_7S__) + #define BARM_ARCH_VERSION 7 + +-#elif defined(__ARM_ARCH_8__) ++#elif defined(__ARM_ARCH_8__) \ ++|| defined(__ARM_ARCH_8A__) + #define BARM_ARCH_VERSION 8 + + /* MSVC sets _M_ARM */
package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch new file +20 -0
@@ -0,0 +1,20 @@ +[WTF] Failure to build when the compiler specifically targets ARMv8-A / defines __ARM_ARCH_8A__ + +Upstream, from https://bugs.webkit.org/show_bug.cgi?id=174425 + +Signed-off-by: Adrian Perez de Castro <[email protected]> + +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 3d02b9c8553..9511e9e4e51 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -242,7 +242,8 @@ + || defined(__ARM_ARCH_7S__) + #define WTF_ARM_ARCH_VERSION 7 + +-#elif defined(__ARM_ARCH_8__) ++#elif defined(__ARM_ARCH_8__) \ ++ || defined(__ARM_ARCH_8A__) + #define WTF_ARM_ARCH_VERSION 8 + + /* MSVC sets _M_ARM */
Signature · 1 line
2.13.2
PATCH 2/4 webkitgtk: Add patches which allow building for ARMv8-A
Hello,
Quoted 6 lines · Adrian Perez de Castro
The two added patches allow building WebKitGTK+ when the compiler scpecifically targets ARMv8-A, and reports as such be pre-defining
__ARCH_ARM_8A__instead of just__ARCH_ARM_8__. Both patches were pulled from the corresponding upstream bug reports and edited to remove the conflicting parts which edit the ChangeLog files.
Quoted 7 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- ...ailure-to-build-when-the-compiler-specifica.patch | 20 ++++++++++++++++++++ ...re-to-build-when-the-compiler-specifically-.patch | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch create mode 100644 package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
Since the webkitgtk project is maintained upstream under Git, can we get Git formatted patches instead? Please use "git format-patch -N" to generate them, as we don't want patch numbering inside the patches, only in the filenames.
This is obviously also valid for PATCH 3/4 in your series.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/4 webkitgtk: Add patches which allow building for ARMv8-A
Hello,
Quoted 7 lines · Thomas Petazzoni
Quoted 6 lines · Adrian Perez de Castro
The two added patches allow building WebKitGTK+ when the compiler scpecifically targets ARMv8-A, and reports as such be pre-defining
__ARCH_ARM_8A__instead of just__ARCH_ARM_8__. Both patches were pulled from the corresponding upstream bug reports and edited to remove the conflicting parts which edit the ChangeLog files.
Quoted 7 lines
Quoted 7 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- ...ailure-to-build-when-the-compiler-specifica.patch | 20 ++++++++++++++++++++ ...re-to-build-when-the-compiler-specifically-.patch | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch create mode 100644 package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
This patch is not needed anymore. The changes are already included in the WebKitGTK+ 2.16.6 release.
Quoted 4 lines
Since the webkitgtk project is maintained upstream under Git, can we get Git formatted patches instead? Please use "git format-patch -N" to generate them, as we don't want patch numbering inside the patches, only in the filenames.
I will take this into account for the next time, thanks.
(Technically upstream is Subversion, but most of the developers use the Git mirror... dunno how that would affect the preferred patch format ? personally I prefer to use Git, too!)
Cheers,
--
Adri?n ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170728/2a693e7d/attachment.asc>
PATCH 2/4 webkitgtk: Add patches which allow building for ARMv8-A
Quoted 19 lines · Adrian Perez de Castro
Hello,
Quoted 7 lines · Thomas Petazzoni
Quoted 6 lines · Adrian Perez de Castro
The two added patches allow building WebKitGTK+ when the compiler scpecifically targets ARMv8-A, and reports as such be pre-defining
__ARCH_ARM_8A__instead of just__ARCH_ARM_8__. Both patches were pulled from the corresponding upstream bug reports and edited to remove the conflicting parts which edit the ChangeLog files.Quoted 7 lines
Quoted 7 lines
Signed-off-by Adrian Perez de Castro <[email protected]>--- ...ailure-to-build-when-the-compiler-specifica.patch | 20 ++++++++++++++++++++ ...re-to-build-when-the-compiler-specifically-.patch | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch create mode 100644 package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
Quoted 2 lines
This patch is not needed anymore. The changes are already included in the WebKitGTK+ 2.16.6 release.
Actually, it is still needed. I was looking at the 2.17.5 development release when I wrote my previous e-mail. I'll re-submit it with the patches properly formatted using ?git format-patch -N?.
Sorry about the confusion :-\
--
Adri?n ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170729/51269661/attachment.asc>
PATCH 3/4 webkitgtk: Add patch to allow Wayland-only builds
In reply to Adrian Perez de CastroThe added patch allows building WebKitGTK+ with Wayland support enabled, and with X11/X.org support disabled. Without this the code includes the X11 headers, which are not available in this case. The patch has to be adapted from the one attached in the corresponding upstream bug report, as it would not apply on top of the 2.16.5 sources.
--- .../webkitgtk/0003-angle-egl-wayland-support.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/webkitgtk/0003-angle-egl-wayland-support.patch
package/webkitgtk/0003-angle-egl-wayland-support.patch new file +45 -0
@@ -0,0 +1,45 @@ +eglplatform.h does not support Wayland + +Upstream, adapted from https://bugs.webkit.org/show_bug.cgi?id=163482 + +Signed-off-by: Adrian Perez de Castro <[email protected]> + +--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h 2017-07-12 13:26:36.222193809 +0300 ++++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h 2017-07-12 13:30:04.071741009 +0300 +@@ -89,6 +89,12 @@ typedef int EGLNativeDisplayType; + typedef void *EGLNativeWindowType; + typedef void *EGLNativePixmapType; + ++#elif defined(WL_EGL_PLATFORM) ++ ++typedef struct wl_display *EGLNativeDisplayType; ++typedef struct wl_egl_pixmap *EGLNativePixmapType; ++typedef struct wl_egl_window *EGLNativeWindowType; ++ + #elif defined(__ANDROID__) || defined(ANDROID) + + #include <android/native_window.h> +@@ -107,6 +113,8 @@ typedef intptr_t EGLNativePixmapType; + + #elif defined(__unix__) + ++#if defined(ANGLE_USE_X11) ++ + /* X11 (tentative) */ + #include <X11/Xlib.h> + #include <X11/Xutil.h> +@@ -115,6 +123,14 @@ typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + ++#else ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#endif /* ANGLE_USE_X11 */ ++ + #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + + #if defined(__OBJC__)
Signature · 1 line
2.13.2
PATCH 3/4 webkitgtk: Add patch to allow Wayland-only builds
Hi all,
Quoted 65 lines · Adrian Perez de Castro
The added patch allows building WebKitGTK+ with Wayland support enabled, and with X11/X.org support disabled. Without this the code includes the X11 headers, which are not available in this case. The patch has to be adapted from the one attached in the corresponding upstream bug report, as it would not apply on top of the 2.16.5 sources.
Signed-off-by Adrian Perez de Castro <[email protected]>--- .../webkitgtk/0003-angle-egl-wayland-support.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/webkitgtk/0003-angle-egl-wayland-support.patchpackage/webkitgtk/0003-angle-egl-wayland-support.patch new file +45
-0@@ -0,0 +1,45 @@ +eglplatform.h does not support Wayland + +Upstream, adapted from https://bugs.webkit.org/show_bug.cgi?id=163482 + +Signed-off-by: Adrian Perez de Castro <[email protected]> + +--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h 2017-07-12 13:26:36.222193809 +0300 ++++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h 2017-07-12 13:30:04.071741009 +0300 +@@ -89,6 +89,12 @@ typedef int EGLNativeDisplayType; + typedef void *EGLNativeWindowType; + typedef void *EGLNativePixmapType; + ++#elif defined(WL_EGL_PLATFORM) ++ ++typedef struct wl_display *EGLNativeDisplayType; ++typedef struct wl_egl_pixmap *EGLNativePixmapType; ++typedef struct wl_egl_window *EGLNativeWindowType; ++ + #elif defined(__ANDROID__) || defined(ANDROID) + + #include <android/native_window.h> +@@ -107,6 +113,8 @@ typedef intptr_t EGLNativePixmapType; + + #elif defined(__unix__) + ++#if defined(ANGLE_USE_X11) ++ + /* X11 (tentative) */ + #include <X11/Xlib.h> + #include <X11/Xutil.h> +@@ -115,6 +123,14 @@ typedef Display *EGLNativeDisplayType; + typedef Pixmap EGLNativePixmapType; + typedef Window EGLNativeWindowType; + ++#else ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#endif /* ANGLE_USE_X11 */ ++ + #elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) + + #if defined(__OBJC__)Signature · 1 line
2.13.2
After updating to WebKitGTK+ 2.16.6, this patch is not needed anymore.
Cheers,
--
Adri?n ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170728/0f05d11c/attachment.asc>
PATCH 4/4 webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
In reply to Adrian Perez de CastroDefining MESA_EGL_NO_X11_HEADERS avoids the situation in which the Mesa headers try to include the X11 headers as they may not be present when building for Wayland.
--- package/webkitgtk/webkitgtk.mk | 3 +++ 1 file changed, 3 insertions(+)
package/webkitgtk/webkitgtk.mk +3 -0
@@ -84,6 +84,9 @@ endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON endif +WEBKITGTK_CONF_OPTS += \ + -DCMAKE_C_FLAGS='$(TARGET_CFLAGS) -DMESA_EGL_NO_X11_HEADERS' \ + -DCMAKE_CXX_FLAGS='$(TARGET_CXXFLAGS) -DMESA_EGL_NO_X11_HEADERS' endif $(eval $(cmake-package))
Signature · 1 line
2.13.2
PATCH 4/4 webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
Hello,
package/webkitgtk/webkitgtk.mk endif · line 89
Quoted 11 lines · Adrian Perez de Castro
package/webkitgtk/webkitgtk.mk +3
-0@@ -84,6 +84,9 @@ endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON endif +WEBKITGTK_CONF_OPTS += \ + -DCMAKE_C_FLAGS='$(TARGET_CFLAGS) -DMESA_EGL_NO_X11_HEADERS' \ + -DCMAKE_CXX_FLAGS='$(TARGET_CXXFLAGS) -DMESA_EGL_NO_X11_HEADERS'
I am not happy with this: such CFLAGS should be provided by the OpenGL provider, through its pkg-config file, and consumers of the OpenGL implementation should get those flags using pkg-config.
If we don't do this, then we need to add -DMESA_EGL_NO_X11_HEADERS everywhere in all OpenGL consumers, which isn't nice.
We already have a few OpenGL providers that define these flags in their .pc file:
package/mali-t76x/egl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/mali-t76x/glesv2.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/nvidia-driver/gl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERSpackage/odroid-mali/odroid-mali.mk: $(SED) "s/Cflags: /Cflags: -DMESA_EGL_NO_X11_HEADERS /" \
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 4/4 webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
Hello,
Quoted 22 lines · Thomas Petazzoni
package/webkitgtk/webkitgtk.mk endif · line 89
Quoted 11 lines · Adrian Perez de Castro
package/webkitgtk/webkitgtk.mk +3
-0@@ -84,6 +84,9 @@ endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON endif +WEBKITGTK_CONF_OPTS += \ + -DCMAKE_C_FLAGS='$(TARGET_CFLAGS) -DMESA_EGL_NO_X11_HEADERS' \ + -DCMAKE_CXX_FLAGS='$(TARGET_CXXFLAGS) -DMESA_EGL_NO_X11_HEADERS'I am not happy with this: such CFLAGS should be provided by the OpenGL provider, through its pkg-config file, and consumers of the OpenGL implementation should get those flags using pkg-config.
If we don't do this, then we need to add -DMESA_EGL_NO_X11_HEADERS everywhere in all OpenGL consumers, which isn't nice.
Quoted 7 lines
We already have a few OpenGL providers that define these flags in their .pc file:
package/mali-t76x/egl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/mali-t76x/glesv2.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/nvidia-driver/gl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS
package/odroid-mali/odroid-mali.mk: $(SED) "s/Cflags: /Cflags: -DMESA_EGL_NO_X11_HEADERS /" \
Good point. I will make instead a patch for having Mesa's ?egl.pc? include the ?-DMESA_EGL_NO_X11_HEADERS? when X11 support is disabled.
Cheers,
--
Adri?n ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170727/8b32cbfb/attachment.asc>
PATCH 4/4 webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
Hi all,
Quoted 26 lines · Adrian Perez de Castro
Quoted 25 lines · Thomas Petazzoni
package/webkitgtk/webkitgtk.mk endif · line 89
Quoted 11 lines · Adrian Perez de Castro
package/webkitgtk/webkitgtk.mk +3
-0@@ -84,6 +84,9 @@ endif ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON endif +WEBKITGTK_CONF_OPTS += \ + -DCMAKE_C_FLAGS='$(TARGET_CFLAGS) -DMESA_EGL_NO_X11_HEADERS' \ + -DCMAKE_CXX_FLAGS='$(TARGET_CXXFLAGS) -DMESA_EGL_NO_X11_HEADERS'I am not happy with this: such CFLAGS should be provided by the OpenGL provider, through its pkg-config file, and consumers of the OpenGL implementation should get those flags using pkg-config.
If we don't do this, then we need to add -DMESA_EGL_NO_X11_HEADERS everywhere in all OpenGL consumers, which isn't nice.
We already have a few OpenGL providers that define these flags in their .pc file:
Quoted 7 lines
Quoted 4 lines
package/mali-t76x/egl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/mali-t76x/glesv2.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS package/nvidia-driver/gl.pc:Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS
package/odroid-mali/odroid-mali.mk: $(SED) "s/Cflags: /Cflags: -DMESA_EGL_NO_X11_HEADERS /" \Good point. I will make instead a patch for having Mesa's ?egl.pc? include the ?-DMESA_EGL_NO_X11_HEADERS? when X11 support is disabled.
Well, it turns out that the Mesa build system is smart enough to figure out by itself that the X11 support has been disabled:
buildroot % grep Cflags output/staging/lib/pkgconfig/egl.pc
Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS
buildroot %It seems that the WebKitGTK+ CMake files are not picking the ?Cflags? value from the ?.pc? file. I'll try to fix this in WebKit, and that way it will not be needed to pass this from ?webkitgtk.mk? in Buildroot.
Cheers,
--
Adri?n ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170731/53e40d30/attachment.asc>