summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2023-09-05 10:02:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-09-06 17:52:45 +0100
commit5ea20893d6ef0414c8578ca8390aea86ce9dc924 (patch)
tree3accd7934ead9eb9828f4cd16d78926ddbd2e1e1 /meta/recipes-sato
parent0dd973297d9c260e7bb82a09159a5056f1de87de (diff)
downloadpoky-5ea20893d6ef0414c8578ca8390aea86ce9dc924.tar.gz
webkitgtk: fix build failure with DEBUG_BUILD enabled
It fails to compile webkitgtk when debug build enabled: | /path_to/tmp/work/core2-64-poky-linux/webkitgtk/2.40.5/webkitgtk-2.40.5/Source/bmalloc/libpas/src/libpas/pas_allocation_result.h:76:1: error: inlining failed in call to 'always_inline' 'pas_allocation_result pas_allocation_result_identity(pas_allocation_result)': function not considered for inlining | 76 | pas_allocation_result_identity(pas_allocation_result result) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a cmake variable WEBKIT_NO_INLINE_HINTS to disable gcc function attribute `always_inline` when debug build is enabled. And adjust indent as well. (From OE-Core rev: 8a33cd60f89685eeda7c5b3513540561df06160d) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch76
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.40.5.bb18
2 files changed, 86 insertions, 8 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch
new file mode 100644
index 0000000000..4266d11e9e
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch
@@ -0,0 +1,76 @@
1From 73efe0ea75c3ac4cb088f300acc3de44d5dd3344 Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com>
3Date: Fri, 11 Aug 2023 14:20:48 +0800
4Subject: [PATCH] [CMake] Add a variable to control macro
5 __PAS_ALWAYS_INLINE_BUT_NOT_INLINE
6 https://bugs.webkit.org/show_bug.cgi?id=260065
7
8Reviewed by NOBODY (OOPS!).
9
10It fails to compile webkitgtk with option `-Og` of gcc/g++:
11
12| In file included from Source/bmalloc/libpas/src/libpas/pas_heap_page_provider.h:30,
13| from Source/bmalloc/libpas/src/libpas/pas_bootstrap_heap_page_provider.h:29,
14| from Source/bmalloc/libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.h:29,
15| from Source/bmalloc/libpas/src/libpas/pas_basic_heap_page_caches.h:29,
16| from Source/bmalloc/libpas/src/libpas/pas_heap_config_utils.h:32,
17| from Source/bmalloc/libpas/src/libpas/bmalloc_heap_config.h:34,
18| from Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:34,
19| from Source/bmalloc/bmalloc/bmalloc.h:39,
20| from Source/bmalloc/bmalloc/bmalloc.cpp:26:
21| In function 'pas_allocation_result pas_local_allocator_try_allocate(pas_local_allocator*, size_t, size_t, pas_heap_config, pas_allocator_counts*, pas_allocation_result_filter)',
22| inlined from 'pas_allocation_result pas_try_allocate_common_impl_fast(pas_heap_config, pas_allocator_counts*, pas_allocation_result_filter, pas_local_allocator*, size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_try_allocate_common.h:85:46,
23| inlined from 'pas_allocation_result bmalloc_try_allocate_with_alignment_impl_impl_fast(pas_local_allocator*, size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:59:1,
24| inlined from 'pas_allocation_result pas_try_allocate_intrinsic_impl_casual_case(__pas_heap*, size_t, size_t, pas_intrinsic_heap_support*, pas_heap_config, pas_try_allocate_common_fast, pas_try_allocate_common_slow, pas_intrinsic_heap_designation_mode)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_try_allocate_intrinsic.h:167:44,
25| inlined from 'pas_allocation_result bmalloc_try_allocate_with_alignment_impl_casual_case(size_t, size_t)' at webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/bmalloc_heap_inlines.h:59:1:
26| webkitgtk-2.40.2/Source/bmalloc/libpas/src/libpas/pas_allocation_result.h:76:1: error: inlining failed in call to 'always_inline' 'pas_allocation_result pas_allocation_result_identity(pas_allocation_result)': function not considered for inlining
27| 76 | pas_allocation_result_identity(pas_allocation_result result)
28| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
30Add an variable `WEBKIT_NO_INLINE_HINTS` to control macro
31__PAS_ALWAYS_INLINE_BUT_NOT_INLINE whether includes function attribute
32`always_inline`. It could set the variable to make compilation pass when
33gcc option `-Og` is used.
34
35* Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h:
36* Source/cmake/WebKitCompilerFlags.cmake:
37
38Upstream-Status: Submitted [https://github.com/WebKit/WebKit/pull/16601]
39
40Signed-off-by: Kai Kang <kai.kang@windriver.com>
41---
42 Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h | 2 +-
43 Source/cmake/WebKitCompilerFlags.cmake | 7 +++++++
44 2 files changed, 8 insertions(+), 1 deletion(-)
45
46diff --git a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
47index 5d5fb38cddbd..a554f70064eb 100644
48--- a/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
49+++ b/Source/bmalloc/libpas/src/libpas/pas_utils_prefix.h
50@@ -44,7 +44,7 @@ __PAS_BEGIN_EXTERN_C;
51 #define __SUSPICIOUS__
52 #define __BROKEN__
53
54-#ifdef __OPTIMIZE__
55+#if defined(__OPTIMIZE__) && !defined(WEBKIT_NO_INLINE_HINTS)
56 #define __PAS_ALWAYS_INLINE_BUT_NOT_INLINE __attribute__((__always_inline__))
57 #else
58 #define __PAS_ALWAYS_INLINE_BUT_NOT_INLINE
59diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake
60index 9b2fecf9a0d3..7cdc2b6afbe0 100644
61--- a/Source/cmake/WebKitCompilerFlags.cmake
62+++ b/Source/cmake/WebKitCompilerFlags.cmake
63@@ -453,3 +453,10 @@ endif ()
64
65 # FIXME: Enable pre-compiled headers for all ports <https://webkit.org/b/139438>
66 set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
67+
68+# It fails to compile with `gcc -Og`
69+set(WEBKIT_NO_INLINE_HINTS OFF CACHE BOOL "Disable funtion attribute always_inline for WebKit")
70+
71+if (WEBKIT_NO_INLINE_HINTS)
72+ add_definitions(-DWEBKIT_NO_INLINE_HINTS)
73+endif ()
74--
752.34.1
76
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.40.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.40.5.bb
index 39bb6a476f..c97dcfad1f 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.40.5.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.40.5.bb
@@ -14,6 +14,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
14 file://reproducibility.patch \ 14 file://reproducibility.patch \
15 file://0d3344e17d258106617b0e6d783d073b188a2548.patch \ 15 file://0d3344e17d258106617b0e6d783d073b188a2548.patch \
16 file://check-GST_GL_HAVE_PLATFORM_GLX.patch \ 16 file://check-GST_GL_HAVE_PLATFORM_GLX.patch \
17 file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \
17 " 18 "
18SRC_URI[sha256sum] = "7de051a263668621d91a61a5eb1c3771d1a7cec900043d4afef06c326c16037f" 19SRC_URI[sha256sum] = "7de051a263668621d91a61a5eb1c3771d1a7cec900043d4afef06c326c16037f"
19 20
@@ -76,14 +77,15 @@ PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif"
76PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" 77PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad"
77 78
78EXTRA_OECMAKE = " \ 79EXTRA_OECMAKE = " \
79 -DPORT=GTK \ 80 -DPORT=GTK \
80 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ 81 ${@oe.utils.vartrue('GI_DATA_ENABLED', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
81 ${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ 82 ${@oe.utils.vartrue('GIDOCGEN_ENABLED', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \
82 -DENABLE_MINIBROWSER=ON \ 83 ${@oe.utils.vartrue('DEBUG_BUILD', '-DWEBKIT_NO_INLINE_HINTS=ON', '-DWEBKIT_NO_INLINE_HINTS=OFFF', d)} \
83 -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ 84 -DENABLE_MINIBROWSER=ON \
84 -DENABLE_GAMEPAD=OFF \ 85 -DENABLE_BUBBLEWRAP_SANDBOX=OFF \
85 -DUSE_GTK4=ON \ 86 -DENABLE_GAMEPAD=OFF \
86 " 87 -DUSE_GTK4=ON \
88 "
87 89
88# Javascript JIT is not supported on ARC 90# Javascript JIT is not supported on ARC
89EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " 91EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF "