All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds
@ 2017-07-12 23:55 Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version Adrian Perez de Castro
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-12 23:55 UTC (permalink / raw)
  To: buildroot

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

-- 
2.13.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version
  2017-07-12 23:55 [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds Adrian Perez de Castro
@ 2017-07-12 23:55 ` Adrian Perez de Castro
  2017-07-21  7:05   ` Thomas Petazzoni
  2017-07-12 23:55 ` [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A Adrian Perez de Castro
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-12 23:55 UTC (permalink / raw)
  To: buildroot

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 <aperez@igalia.com>
---
 package/webkitgtk/0001-fix-gcc6-builds.patch | 53 ----------------------------
 1 file changed, 53 deletions(-)
 delete mode 100644 package/webkitgtk/0001-fix-gcc6-builds.patch

diff --git a/package/webkitgtk/0001-fix-gcc6-builds.patch b/package/webkitgtk/0001-fix-gcc6-builds.patch
deleted file mode 100644
index 35487ad55a..0000000000
--- a/package/webkitgtk/0001-fix-gcc6-builds.patch
+++ /dev/null
@@ -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 <gustavo@zacarias.com.ar>
-
-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 ()
- 
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A
  2017-07-12 23:55 [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version Adrian Perez de Castro
@ 2017-07-12 23:55 ` Adrian Perez de Castro
  2017-07-21  7:06   ` Thomas Petazzoni
  2017-07-12 23:55 ` [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds Adrian Perez de Castro
  3 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-12 23:55 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 ...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

diff --git a/package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch b/package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch
new file mode 100644
index 0000000000..7d5f6c6b47
--- /dev/null
+++ b/package/webkitgtk/0001-bmalloc-Failure-to-build-when-the-compiler-specifica.patch
@@ -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 <aperez@igalia.com>
+
+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 */
diff --git a/package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch b/package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
new file mode 100644
index 0000000000..a1bf9738af
--- /dev/null
+++ b/package/webkitgtk/0002-WTF-Failure-to-build-when-the-compiler-specifically-.patch
@@ -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 <aperez@igalia.com>
+
+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 */
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds
  2017-07-12 23:55 [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A Adrian Perez de Castro
@ 2017-07-12 23:55 ` Adrian Perez de Castro
  2017-07-27 22:07   ` Adrian Perez de Castro
  2017-07-12 23:55 ` [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds Adrian Perez de Castro
  3 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-12 23:55 UTC (permalink / raw)
  To: buildroot

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 <aperez@igalia.com>
---
 .../webkitgtk/0003-angle-egl-wayland-support.patch | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/webkitgtk/0003-angle-egl-wayland-support.patch

diff --git a/package/webkitgtk/0003-angle-egl-wayland-support.patch b/package/webkitgtk/0003-angle-egl-wayland-support.patch
new file mode 100644
index 0000000000..4461e4390a
--- /dev/null
+++ b/package/webkitgtk/0003-angle-egl-wayland-support.patch
@@ -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 <aperez@igalia.com>
+
+--- 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__)
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
  2017-07-12 23:55 [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds Adrian Perez de Castro
                   ` (2 preceding siblings ...)
  2017-07-12 23:55 ` [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds Adrian Perez de Castro
@ 2017-07-12 23:55 ` Adrian Perez de Castro
  2017-07-21  7:09   ` Thomas Petazzoni
  3 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-12 23:55 UTC (permalink / raw)
  To: buildroot

Defining 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.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 package/webkitgtk/webkitgtk.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
index ef20839f92..09781c2318 100644
--- a/package/webkitgtk/webkitgtk.mk
+++ b/package/webkitgtk/webkitgtk.mk
@@ -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))
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version
  2017-07-12 23:55 ` [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version Adrian Perez de Castro
@ 2017-07-21  7:05   ` Thomas Petazzoni
  2017-07-25 22:03     ` Peter Korsgaard
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2017-07-21  7:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 13 Jul 2017 02:55:28 +0300, Adrian Perez de Castro wrote:
> 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 <aperez@igalia.com>
> ---
>  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A
  2017-07-12 23:55 ` [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A Adrian Perez de Castro
@ 2017-07-21  7:06   ` Thomas Petazzoni
  2017-07-27 22:12     ` Adrian Perez de Castro
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2017-07-21  7:06 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 13 Jul 2017 02:55:29 +0300, Adrian Perez de Castro wrote:
> 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.
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> ---
>  ...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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
  2017-07-12 23:55 ` [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds Adrian Perez de Castro
@ 2017-07-21  7:09   ` Thomas Petazzoni
  2017-07-27 16:45     ` Adrian Perez de Castro
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2017-07-21  7:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 13 Jul 2017 02:55:31 +0300, Adrian Perez de Castro wrote:

> diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> index ef20839f92..09781c2318 100644
> --- a/package/webkitgtk/webkitgtk.mk
> +++ b/package/webkitgtk/webkitgtk.mk
> @@ -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_HEADERS
package/odroid-mali/odroid-mali.mk:     $(SED) "s/Cflags: /Cflags: -DMESA_EGL_NO_X11_HEADERS /" \

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version
  2017-07-21  7:05   ` Thomas Petazzoni
@ 2017-07-25 22:03     ` Peter Korsgaard
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2017-07-25 22:03 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Thu, 13 Jul 2017 02:55:28 +0300, Adrian Perez de Castro wrote:
 >> 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 <aperez@igalia.com>

Committed to 2017.02.x and 2017.05.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
  2017-07-21  7:09   ` Thomas Petazzoni
@ 2017-07-27 16:45     ` Adrian Perez de Castro
  2017-07-31 13:21       ` Adrian Perez de Castro
  0 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-27 16:45 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 21 Jul 2017 09:09:47 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
>
> On Thu, 13 Jul 2017 02:55:31 +0300, Adrian Perez de Castro wrote:
> 
> > diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> > index ef20839f92..09781c2318 100644
> > --- a/package/webkitgtk/webkitgtk.mk
> > +++ b/package/webkitgtk/webkitgtk.mk
> > @@ -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_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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds
  2017-07-12 23:55 ` [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds Adrian Perez de Castro
@ 2017-07-27 22:07   ` Adrian Perez de Castro
  0 siblings, 0 replies; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-27 22:07 UTC (permalink / raw)
  To: buildroot

Hi all,

On Thu, 13 Jul 2017 02:55:30 +0300, Adrian Perez de Castro <aperez@igalia.com> wrote:
> 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 <aperez@igalia.com>
> ---
>  .../webkitgtk/0003-angle-egl-wayland-support.patch | 45 ++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 package/webkitgtk/0003-angle-egl-wayland-support.patch
> 
> diff --git a/package/webkitgtk/0003-angle-egl-wayland-support.patch b/package/webkitgtk/0003-angle-egl-wayland-support.patch
> new file mode 100644
> index 0000000000..4461e4390a
> --- /dev/null
> +++ b/package/webkitgtk/0003-angle-egl-wayland-support.patch
> @@ -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 <aperez@igalia.com>
> +
> +--- 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__)
> -- 
> 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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A
  2017-07-21  7:06   ` Thomas Petazzoni
@ 2017-07-27 22:12     ` Adrian Perez de Castro
  2017-07-29 12:52       ` Adrian Perez de Castro
  0 siblings, 1 reply; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-27 22:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 21 Jul 2017 09:06:54 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> On Thu, 13 Jul 2017 02:55:29 +0300, Adrian Perez de Castro wrote:
> > 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.
> > 
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > ---
> >  ...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.

> 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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A
  2017-07-27 22:12     ` Adrian Perez de Castro
@ 2017-07-29 12:52       ` Adrian Perez de Castro
  0 siblings, 0 replies; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-29 12:52 UTC (permalink / raw)
  To: buildroot

On Fri, 28 Jul 2017 01:12:03 +0300, Adrian Perez de Castro <aperez@igalia.com> wrote:
> Hello,
> 
> On Fri, 21 Jul 2017 09:06:54 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> 
> > On Thu, 13 Jul 2017 02:55:29 +0300, Adrian Perez de Castro wrote:
> > > 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.
> > > 
> > > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> > > ---
> > >  ...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.

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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds
  2017-07-27 16:45     ` Adrian Perez de Castro
@ 2017-07-31 13:21       ` Adrian Perez de Castro
  0 siblings, 0 replies; 14+ messages in thread
From: Adrian Perez de Castro @ 2017-07-31 13:21 UTC (permalink / raw)
  To: buildroot

Hi all,

On Thu, 27 Jul 2017 19:45:13 +0300, Adrian Perez de Castro <aperez@igalia.com> wrote:

> On Fri, 21 Jul 2017 09:09:47 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> >
> > On Thu, 13 Jul 2017 02:55:31 +0300, Adrian Perez de Castro wrote:
> > 
> > > diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> > > index ef20839f92..09781c2318 100644
> > > --- a/package/webkitgtk/webkitgtk.mk
> > > +++ b/package/webkitgtk/webkitgtk.mk
> > > @@ -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_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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-31 13:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 23:55 [Buildroot] [PATCH 0/4] Update patches applied to WebKitGTK+, fix Wayland-only builds Adrian Perez de Castro
2017-07-12 23:55 ` [Buildroot] [PATCH 1/4] webkitgtk: Remove patch uneeded for the current version Adrian Perez de Castro
2017-07-21  7:05   ` Thomas Petazzoni
2017-07-25 22:03     ` Peter Korsgaard
2017-07-12 23:55 ` [Buildroot] [PATCH 2/4] webkitgtk: Add patches which allow building for ARMv8-A Adrian Perez de Castro
2017-07-21  7:06   ` Thomas Petazzoni
2017-07-27 22:12     ` Adrian Perez de Castro
2017-07-29 12:52       ` Adrian Perez de Castro
2017-07-12 23:55 ` [Buildroot] [PATCH 3/4] webkitgtk: Add patch to allow Wayland-only builds Adrian Perez de Castro
2017-07-27 22:07   ` Adrian Perez de Castro
2017-07-12 23:55 ` [Buildroot] [PATCH 4/4] webkitgtk: Ensure that Mesa headers do not include X11 headers on Wayland builds Adrian Perez de Castro
2017-07-21  7:09   ` Thomas Petazzoni
2017-07-27 16:45     ` Adrian Perez de Castro
2017-07-31 13:21       ` Adrian Perez de Castro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.