From b041bd9eaba79a8d9a9a5cb74bafac0c1b2be2f9 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Mon, 1 Apr 2024 17:24:39 +0200 Subject: webkitgtk: update 2.42.5 -> 2.44.0 - add a PACKAGECONFIG for libbacktrace to avoid: | -- Could NOT find LibBacktrace (missing: LIBBACKTRACE_INCLUDE_DIR LIBBACKTRACE_LIBRARY) | CMake Error at Source/cmake/OptionsGTK.cmake:425 (message): | libbacktrace is required for USE_LIBBACKTRACE - while at it also add a PACKAGECONFIG for gamepad - remove submitted patch. Issue seems to be fixed. Not entirely sure about that, but there has been rework: [https://bugs.webkit.org/show_bug.cgi?id=267349] I also did a test build with oe-core/poky for qemuarm. It completed without error - There is an issue with creating the json files if CMAKE_EXPORT_COMPILE_COMMANDS is enabled. Disable this for now to fix the build: FAILED: CMakeFiles/RewriteCompileCommands DeveloperTools/compile_commands.json /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build/CMakeFiles/RewriteCompileCommands /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build/DeveloperTools/compile_commands.json cd /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build && /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/recipe-sysroot-native/usr/bin/python3-native/python3 /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/webkitgtk-2.44.0/Tools/Scripts/rewrite-compile-commands /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build/compile_commands.json /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build/DeveloperTools/compile_commands.json /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/webkitgtk-2.44.0 /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/build /home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/recipe-sysroot-native/usr/bin/python3-native/python3: can't open file '/home/flk/poky/build-hypr/tmp/work/corei7-64-poky-linux/webkitgtk/2.44.0/webkitgtk-2.44.0/Tools/Scripts/rewrite-compile-commands': [Errno 2] No such file or directory - Add a patch to fix webassembly for riscv64 - Add a backport patch to fix the build for 32bit architectures ================ WebKitGTK 2.44.0 ================ What's new in WebKitGTK 2.44.0? - Fix connection of UI and web process accessibility tree in GTK4. - Add BubblewrapLauncher sandbox directory for the gstreamer user registry cache directory. - Fix bug causing preferred language to not be passed to NetworkProcess if set in WebContext before creating WebView. - Do not use real time priority for the display link thread. - Use a shorter web process cache lifetime. - Fix several crashes and rendering issues. - Translation updates: German, Polish, Swedish, Turkish. ================ WebKitGTK 2.43.4 ================ What's new in WebKitGTK 2.43.4? - Remove key event reinjection in GTK4 to make keyboard shortcuts work in web sites. - Use the new GTK API to create a GdkTexture from a DMA-BUF buffer when available. - Fix rendering when GTK is using the vulkan renderer. - Fix gamepads detection by correctly handling focused window in GTK4. - Fix rendering after history navigation. - Write bwrapinfo.json to disk for xdg-desktop-portal. - Fixed several memory leaks in media backend. - Fix several crashes and rendering issues. ================ WebKitGTK 2.43.3 ================ What's new in WebKitGTK 2.43.3? - Show vblank monitor information in webkit://gpu. - Fallback to timer based vblank monitor if drmWaitVBlank fails. - Fix several memory leaks in media backend. - Fix several crashes and rendering issues. ================ WebKitGTK 2.43.2 ================ What's new in WebKitGTK 2.43.2? - Remove the X11 and WPE renderers. - Release unused buffers when the view is hidden. - Fix flickering while playing videos with DMA-BUF sink. - Do not special case the "sans" font family name. - Fix webkit_web_context_allow_tls_certificate_for_host() for IPv6 URIs produced by SoupURI. - Fix several crashes and rendering issues. ================ WebKitGTK 2.43.1 ================ What's new in WebKitGTK 2.43.1? - Improve vblank synchronization when rendering. - Improve DMA-BUF buffers handling for video frames. - Use the buffer format preferred by the driver in DMA-BUF renderer. - Do not block the compositing thread waiting for rendering threads. - Improve performance when scaling images in a canvas. - Fix several crashes and rendering (From OE-Core rev: 7b96a7e433eb6b85c35dd6a36a12ad55d2e6a108) Signed-off-by: Markus Volk Signed-off-by: Richard Purdie --- .../0d3344e17d258106617b0e6d783d073b188a2548.patch | 310 --------------------- .../2922af379dc70b4b1a63b01d67179eb431f03ac4.patch | 38 +++ .../30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch | 67 +++++ meta/recipes-sato/webkit/webkitgtk_2.42.5.bb | 184 ------------ meta/recipes-sato/webkit/webkitgtk_2.44.0.bb | 187 +++++++++++++ 5 files changed, 292 insertions(+), 494 deletions(-) delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0d3344e17d258106617b0e6d783d073b188a2548.patch create mode 100644 meta/recipes-sato/webkit/webkitgtk/2922af379dc70b4b1a63b01d67179eb431f03ac4.patch create mode 100644 meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk_2.42.5.bb create mode 100644 meta/recipes-sato/webkit/webkitgtk_2.44.0.bb (limited to 'meta/recipes-sato/webkit') diff --git a/meta/recipes-sato/webkit/webkitgtk/0d3344e17d258106617b0e6d783d073b188a2548.patch b/meta/recipes-sato/webkit/webkitgtk/0d3344e17d258106617b0e6d783d073b188a2548.patch deleted file mode 100644 index a4ef565db0..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0d3344e17d258106617b0e6d783d073b188a2548.patch +++ /dev/null @@ -1,310 +0,0 @@ -From a180f6821f81c65e320be0cebac72b4dcf86342e Mon Sep 17 00:00:00 2001 -From: Adrian Perez de Castro -Date: Thu, 2 Jun 2022 11:19:06 +0300 -Subject: [PATCH] FELightningNEON.cpp fails to build, NEON fast path seems - unused https://bugs.webkit.org/show_bug.cgi?id=241182 - -Reviewed by NOBODY (OOPS!). - -Move the NEON fast path for the SVG lighting filter effects into -FELightingSoftwareApplier, and arrange to actually use them by -forwarding calls to applyPlatformGeneric() into applyPlatformNeon(). - -Some changes were needed to adapt platformApplyNeon() to the current -state of filters after r286140. This was not detected because the code -bitrotted due to it being guarded with CPU(ARM_TRADITIONAL), which does -not get used much these days: CPU(ARM_THUMB2) is more common. It should -be possible to use the NEON fast paths also in Thumb mode, but that is -left for a follow-up fix. - -* Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp: -(WebCore::FELightingSoftwareApplier::platformApplyNeonWorker): -(WebCore::FELightingSoftwareApplier::getPowerCoefficients): -(WebCore::FELighting::platformApplyNeonWorker): Deleted. -(WebCore::FELighting::getPowerCoefficients): Deleted. -* Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h: -(WebCore::FELightingSoftwareApplier::applyPlatformNeon): -(WebCore::FELighting::platformApplyNeon): Deleted. -* Source/WebCore/platform/graphics/filters/DistantLightSource.h: -* Source/WebCore/platform/graphics/filters/FELighting.h: -* Source/WebCore/platform/graphics/filters/PointLightSource.h: -* Source/WebCore/platform/graphics/filters/SpotLightSource.h: -* Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h: - -Upstream-Status: Submitted [https://github.com/WebKit/WebKit/pull/1233] -Signed-off-by: Khem Raj ---- - .../cpu/arm/filters/FELightingNEON.cpp | 4 +- - .../graphics/cpu/arm/filters/FELightingNEON.h | 52 +++++++++---------- - .../graphics/filters/DistantLightSource.h | 4 ++ - .../platform/graphics/filters/FELighting.h | 7 --- - .../graphics/filters/PointLightSource.h | 4 ++ - .../graphics/filters/SpotLightSource.h | 4 ++ - .../software/FELightingSoftwareApplier.h | 16 ++++++ - 7 files changed, 56 insertions(+), 35 deletions(-) - -diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp -index f6ff8c20..42a97ffc 100644 ---- a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp -+++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp -@@ -49,7 +49,7 @@ short* feLightingConstantsForNeon() - return s_FELightingConstantsForNeon; - } - --void FELighting::platformApplyNeonWorker(FELightingPaintingDataForNeon* parameters) -+void FELightingSoftwareApplier::platformApplyNeonWorker(FELightingPaintingDataForNeon* parameters) - { - neonDrawLighting(parameters); - } -@@ -464,7 +464,7 @@ TOSTRING(neonDrawLighting) ":" NL - "b .lightStrengthCalculated" NL - ); // NOLINT - --int FELighting::getPowerCoefficients(float exponent) -+int FELightingSoftwareApplier::getPowerCoefficients(float exponent) - { - // Calling a powf function from the assembly code would require to save - // and reload a lot of NEON registers. Since the base is in range [0..1] -diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h -index b17c603d..e4629cda 100644 ---- a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h -+++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h -@@ -24,14 +24,15 @@ - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - --#ifndef FELightingNEON_h --#define FELightingNEON_h -+#pragma once - - #if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE) - --#include "FELighting.h" -+#include "FELightingSoftwareApplier.h" -+#include "ImageBuffer.h" - #include "PointLightSource.h" - #include "SpotLightSource.h" -+#include - #include - - namespace WebCore { -@@ -93,14 +94,14 @@ extern "C" { - void neonDrawLighting(FELightingPaintingDataForNeon*); - } - --inline void FELighting::platformApplyNeon(const LightingData& data, const LightSource::PaintingData& paintingData) -+inline void FELightingSoftwareApplier::applyPlatformNeon(const FELightingSoftwareApplier::LightingData& data, const LightSource::PaintingData& paintingData) - { -- alignas(16) FELightingFloatArgumentsForNeon floatArguments; -- FELightingPaintingDataForNeon neonData = { -+ WebCore::FELightingFloatArgumentsForNeon alignas(16) floatArguments; -+ WebCore::FELightingPaintingDataForNeon neonData = { - data.pixels->data(), - 1, -- data.widthDecreasedByOne - 1, -- data.heightDecreasedByOne - 1, -+ data.width - 2, -+ data.height - 2, - 0, - 0, - 0, -@@ -111,23 +112,23 @@ inline void FELighting::platformApplyNeon(const LightingData& data, const LightS - // Set light source arguments. - floatArguments.constOne = 1; - -- auto color = m_lightingColor.toColorTypeLossy>().resolved(); -+ auto color = data.lightingColor.toColorTypeLossy>().resolved(); - - floatArguments.colorRed = color.red; - floatArguments.colorGreen = color.green; - floatArguments.colorBlue = color.blue; - floatArguments.padding4 = 0; - -- if (m_lightSource->type() == LS_POINT) { -+ if (data.lightSource->type() == LS_POINT) { - neonData.flags |= FLAG_POINT_LIGHT; -- PointLightSource& pointLightSource = static_cast(m_lightSource.get()); -+ const auto& pointLightSource = *static_cast(data.lightSource); - floatArguments.lightX = pointLightSource.position().x(); - floatArguments.lightY = pointLightSource.position().y(); - floatArguments.lightZ = pointLightSource.position().z(); - floatArguments.padding2 = 0; -- } else if (m_lightSource->type() == LS_SPOT) { -+ } else if (data.lightSource->type() == LS_SPOT) { - neonData.flags |= FLAG_SPOT_LIGHT; -- SpotLightSource& spotLightSource = static_cast(m_lightSource.get()); -+ const auto& spotLightSource = *static_cast(data.lightSource); - floatArguments.lightX = spotLightSource.position().x(); - floatArguments.lightY = spotLightSource.position().y(); - floatArguments.lightZ = spotLightSource.position().z(); -@@ -145,7 +146,7 @@ inline void FELighting::platformApplyNeon(const LightingData& data, const LightS - if (spotLightSource.specularExponent() == 1) - neonData.flags |= FLAG_CONE_EXPONENT_IS_1; - } else { -- ASSERT(m_lightSource->type() == LS_DISTANT); -+ ASSERT(data.lightSource->type() == LS_DISTANT); - floatArguments.lightX = paintingData.initialLightingData.lightVector.x(); - floatArguments.lightY = paintingData.initialLightingData.lightVector.y(); - floatArguments.lightZ = paintingData.initialLightingData.lightVector.z(); -@@ -155,38 +156,39 @@ inline void FELighting::platformApplyNeon(const LightingData& data, const LightS - // Set lighting arguments. - floatArguments.surfaceScale = data.surfaceScale; - floatArguments.minusSurfaceScaleDividedByFour = -data.surfaceScale / 4; -- if (m_lightingType == FELighting::DiffuseLighting) -- floatArguments.diffuseConstant = m_diffuseConstant; -+ if (data.filterType == FilterEffect::Type::FEDiffuseLighting) -+ floatArguments.diffuseConstant = data.diffuseConstant; - else { - neonData.flags |= FLAG_SPECULAR_LIGHT; -- floatArguments.diffuseConstant = m_specularConstant; -- neonData.specularExponent = getPowerCoefficients(m_specularExponent); -- if (m_specularExponent == 1) -+ floatArguments.diffuseConstant = data.specularConstant; -+ neonData.specularExponent = getPowerCoefficients(data.specularExponent); -+ if (data.specularExponent == 1) - neonData.flags |= FLAG_SPECULAR_EXPONENT_IS_1; - } - if (floatArguments.diffuseConstant == 1) - neonData.flags |= FLAG_DIFFUSE_CONST_IS_1; - -- int optimalThreadNumber = ((data.widthDecreasedByOne - 1) * (data.heightDecreasedByOne - 1)) / s_minimalRectDimension; -+ static constexpr int minimalRectDimension = 100 * 100; // Empirical data limit for parallel jobs -+ int optimalThreadNumber = ((data.width - 2) * (data.height - 2)) / minimalRectDimension; - if (optimalThreadNumber > 1) { - // Initialize parallel jobs -- ParallelJobs parallelJobs(&WebCore::FELighting::platformApplyNeonWorker, optimalThreadNumber); -+ ParallelJobs parallelJobs(&FELightingSoftwareApplier::platformApplyNeonWorker, optimalThreadNumber); - - // Fill the parameter array - int job = parallelJobs.numberOfJobs(); - if (job > 1) { - int yStart = 1; -- int yStep = (data.heightDecreasedByOne - 1) / job; -+ int yStep = (data.height - 2) / job; - for (--job; job >= 0; --job) { - FELightingPaintingDataForNeon& params = parallelJobs.parameter(job); - params = neonData; - params.yStart = yStart; -- params.pixels += (yStart - 1) * (data.widthDecreasedByOne + 1) * 4; -+ params.pixels += (yStart - 1) * data.width * 4; - if (job > 0) { - params.absoluteHeight = yStep; - yStart += yStep; - } else -- params.absoluteHeight = data.heightDecreasedByOne - yStart; -+ params.absoluteHeight = (data.height - 1) - yStart; - } - parallelJobs.execute(); - return; -@@ -199,5 +201,3 @@ inline void FELighting::platformApplyNeon(const LightingData& data, const LightS - } // namespace WebCore - - #endif // CPU(ARM_NEON) && COMPILER(GCC_COMPATIBLE) -- --#endif // FELightingNEON_h -diff --git a/Source/WebCore/platform/graphics/filters/DistantLightSource.h b/Source/WebCore/platform/graphics/filters/DistantLightSource.h -index 70f583b3..7d5d27e5 100644 ---- a/Source/WebCore/platform/graphics/filters/DistantLightSource.h -+++ b/Source/WebCore/platform/graphics/filters/DistantLightSource.h -@@ -26,6 +26,10 @@ - #include - #include - -+namespace WTF { -+class TextStream; -+} // namespace WTF -+ - namespace WebCore { - - class DistantLightSource : public LightSource { -diff --git a/Source/WebCore/platform/graphics/filters/FELighting.h b/Source/WebCore/platform/graphics/filters/FELighting.h -index 179edf6d..694d712d 100644 ---- a/Source/WebCore/platform/graphics/filters/FELighting.h -+++ b/Source/WebCore/platform/graphics/filters/FELighting.h -@@ -35,8 +35,6 @@ - - namespace WebCore { - --struct FELightingPaintingDataForNeon; -- - class FELighting : public FilterEffect { - public: - bool operator==(const FELighting&) const; -@@ -68,11 +66,6 @@ protected: - - std::unique_ptr createSoftwareApplier() const override; - --#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE) -- static int getPowerCoefficients(float exponent); -- inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&); --#endif -- - Color m_lightingColor; - float m_surfaceScale; - float m_diffuseConstant; -diff --git a/Source/WebCore/platform/graphics/filters/PointLightSource.h b/Source/WebCore/platform/graphics/filters/PointLightSource.h -index a8cfdab8..34f867bb 100644 ---- a/Source/WebCore/platform/graphics/filters/PointLightSource.h -+++ b/Source/WebCore/platform/graphics/filters/PointLightSource.h -@@ -26,6 +26,10 @@ - #include "LightSource.h" - #include - -+namespace WTF { -+class TextStream; -+} // namespace WTF -+ - namespace WebCore { - - class PointLightSource : public LightSource { -diff --git a/Source/WebCore/platform/graphics/filters/SpotLightSource.h b/Source/WebCore/platform/graphics/filters/SpotLightSource.h -index 6404467a..5cac38f2 100644 ---- a/Source/WebCore/platform/graphics/filters/SpotLightSource.h -+++ b/Source/WebCore/platform/graphics/filters/SpotLightSource.h -@@ -26,6 +26,10 @@ - #include "LightSource.h" - #include - -+namespace WTF { -+class TextStream; -+} // namespace WTF -+ - namespace WebCore { - - class SpotLightSource : public LightSource { -diff --git a/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h b/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h -index c974d921..e2896660 100644 ---- a/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h -+++ b/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h -@@ -36,6 +36,7 @@ - namespace WebCore { - - class FELighting; -+struct FELightingPaintingDataForNeon; - - class FELightingSoftwareApplier final : public FilterEffectConcreteApplier { - WTF_MAKE_FAST_ALLOCATED; -@@ -132,8 +133,23 @@ private: - - static void applyPlatformGenericPaint(const LightingData&, const LightSource::PaintingData&, int startY, int endY); - static void applyPlatformGenericWorker(ApplyParameters*); -+ -+#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE) -+ static int getPowerCoefficients(float exponent); -+ static void platformApplyNeonWorker(FELightingPaintingDataForNeon*); -+ inline static void applyPlatformNeon(const LightingData&, const LightSource::PaintingData&); -+ -+ inline static void applyPlatformGeneric(const LightingData& data, const LightSource::PaintingData& paintingData) -+ { -+ applyPlatformNeon(data, paintingData); -+ } -+#else - static void applyPlatformGeneric(const LightingData&, const LightSource::PaintingData&); -+#endif -+ - static void applyPlatform(const LightingData&); - }; - - } // namespace WebCore -+ -+#include "FELightingNEON.h" diff --git a/meta/recipes-sato/webkit/webkitgtk/2922af379dc70b4b1a63b01d67179eb431f03ac4.patch b/meta/recipes-sato/webkit/webkitgtk/2922af379dc70b4b1a63b01d67179eb431f03ac4.patch new file mode 100644 index 0000000000..3067500447 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/2922af379dc70b4b1a63b01d67179eb431f03ac4.patch @@ -0,0 +1,38 @@ +From 2922af379dc70b4b1a63b01d67179eb431f03ac4 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Mon, 18 Mar 2024 11:14:54 -0700 +Subject: [PATCH] REGRESSION(274077@main): failure to build on i586 (and likely + other 32bit arches): static assertion failed: Timer should stay small + https://bugs.webkit.org/show_bug.cgi?id=271108 + +Unreviewed build fix. This changes SameSizeOfTimer to ensure it matches +the size of Timer on 32-bit platforms. + +* Source/WebCore/platform/Timer.cpp: + +Canonical link: https://commits.webkit.org/276282@main + +Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/2922af379dc70b4b1a63b01d67179eb431f03ac4] + +Signed-off-by: Markus Volk +--- + Source/WebCore/platform/Timer.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Source/WebCore/platform/Timer.cpp b/Source/WebCore/platform/Timer.cpp +index 4f7c0f5c39ca9..0f3734cca2474 100644 +--- a/Source/WebCore/platform/Timer.cpp ++++ b/Source/WebCore/platform/Timer.cpp +@@ -263,7 +263,11 @@ struct SameSizeAsTimer { + + WeakPtr timerAlignment; + double times[2]; +- void* pointers[3]; ++ void* pointers[2]; ++#if CPU(ADDRESS32) ++ uint8_t bitfields; ++#endif ++ void* pointer; + }; + + static_assert(sizeof(Timer) == sizeof(SameSizeAsTimer), "Timer should stay small"); diff --git a/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch b/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch new file mode 100644 index 0000000000..76bcb3df99 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch @@ -0,0 +1,67 @@ +From 1523e00a2a76e285262c8aa3721b5d99f3f2d612 Mon Sep 17 00:00:00 2001 +From: Thomas Devoogdt +Date: Mon, 16 Jan 2023 17:03:30 +0100 +Subject: [PATCH] REGRESSION(257865@main): B3Validate.cpp: fix + + !ENABLE(WEBASSEMBLY_B3JIT) + +https://bugs.webkit.org/show_bug.cgi?id=250681 + +Reviewed by NOBODY (OOPS!). + +WasmTypeDefinition.h isn't included if not ENABLE(WEBASSEMBLY_B3JIT). +Also, toB3Type and simdScalarType are not defined if it is included. + +Signed-off-by: Thomas Devoogdt + +Upstream-Status: Inappropriate [https://bugs.launchpad.net/ubuntu/+source/webkit2gtk/+bug/2008798] + +Signed-off-by: Markus Volk +--- + Source/JavaScriptCore/b3/B3Validate.cpp | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/Source/JavaScriptCore/b3/B3Validate.cpp b/Source/JavaScriptCore/b3/B3Validate.cpp +index eaaa3749..1d089783 100644 +--- a/Source/JavaScriptCore/b3/B3Validate.cpp ++++ b/Source/JavaScriptCore/b3/B3Validate.cpp +@@ -47,6 +47,12 @@ + #include + #include + ++#if ENABLE(WEBASSEMBLY) && ENABLE(WEBASSEMBLY_B3JIT) ++#define simdScalarTypeToB3Type(type) toB3Type(Wasm::simdScalarType(type)) ++#else ++#define simdScalarTypeToB3Type(type) B3::Type() ++#endif ++ + namespace JSC { namespace B3 { + + namespace { +@@ -454,7 +460,7 @@ public: + case VectorExtractLane: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); + VALIDATE(value->numChildren() == 1, ("At ", *value)); +- VALIDATE(value->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + VALIDATE(value->child(0)->type() == V128, ("At ", *value)); + break; + case VectorReplaceLane: +@@ -462,7 +468,7 @@ public: + VALIDATE(value->numChildren() == 2, ("At ", *value)); + VALIDATE(value->type() == V128, ("At ", *value)); + VALIDATE(value->child(0)->type() == V128, ("At ", *value)); +- VALIDATE(value->child(1)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->child(1)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + break; + case VectorDupElement: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); +@@ -484,7 +490,7 @@ public: + VALIDATE(!value->kind().hasExtraBits(), ("At ", *value)); + VALIDATE(value->numChildren() == 1, ("At ", *value)); + VALIDATE(value->type() == V128, ("At ", *value)); +- VALIDATE(value->child(0)->type() == toB3Type(Wasm::simdScalarType(value->asSIMDValue()->simdLane())), ("At ", *value)); ++ VALIDATE(value->child(0)->type() == simdScalarTypeToB3Type(value->asSIMDValue()->simdLane()), ("At ", *value)); + break; + + case VectorPopcnt: diff --git a/meta/recipes-sato/webkit/webkitgtk_2.42.5.bb b/meta/recipes-sato/webkit/webkitgtk_2.42.5.bb deleted file mode 100644 index 6790814958..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk_2.42.5.bb +++ /dev/null @@ -1,184 +0,0 @@ -SUMMARY = "WebKit web rendering engine for the GTK+ platform" -HOMEPAGE = "https://www.webkitgtk.org/" -BUGTRACKER = "https://bugs.webkit.org/" - -LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ - file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ - file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ - file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ - " - -SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ - file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ - file://reproducibility.patch \ - file://0d3344e17d258106617b0e6d783d073b188a2548.patch \ - file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \ - file://no-musttail-arm.patch \ - file://t6-not-declared.patch \ - " -SRC_URI[sha256sum] = "b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749" - -inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "opengl" - -CVE_PRODUCT = "webkitgtk webkitgtk\+" - -DEPENDS += " \ - ruby-native \ - gperf-native \ - unifdef-native \ - cairo \ - harfbuzz \ - jpeg \ - atk \ - libwebp \ - gtk4 \ - libxslt \ - libtasn1 \ - libnotify \ - gstreamer1.0 \ - gstreamer1.0-plugins-base \ - glib-2.0-native \ - gettext-native \ - " - -PACKAGECONFIG_SOUP ?= "soup3" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ - enchant \ - libsecret \ - ${PACKAGECONFIG_SOUP} \ - " - -PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" -PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" -PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" -PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" -PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" -PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" -PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/egl" -PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" -PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" -PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" -PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" -PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" -PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" -PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" -PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," -PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" -PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" -PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" -PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" -PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif" -PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" -PACKAGECONFIG[jpegxl] = "-DUSE_JPEGXL=ON,-DUSE_JPEGXL=OFF,libjxl" - -EXTRA_OECMAKE = " \ - -DPORT=GTK \ - ${@oe.utils.vartrue('GI_DATA_ENABLED', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ - ${@oe.utils.vartrue('GIDOCGEN_ENABLED', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ - ${@oe.utils.vartrue('DEBUG_BUILD', '-DWEBKIT_NO_INLINE_HINTS=ON', '-DWEBKIT_NO_INLINE_HINTS=OFFF', d)} \ - -DENABLE_MINIBROWSER=ON \ - -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ - -DENABLE_GAMEPAD=OFF \ - -DUSE_GTK4=ON \ - " - -# Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the -# debug symbols (4.3GB to 700M at time of writing) -DEBUG_FLAGS:append = "${@oe.utils.vartrue('DEBUG_BUILD', '', ' -g1', d)}" - -# Javascript JIT is not supported on ARC -EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " -# By default 25-bit "medium" calls are used on ARC -# which is not enough for binaries larger than 32 MiB -CFLAGS:append:arc = " -mlong-calls" -CXXFLAGS:append:arc = " -mlong-calls" - -# Needed for non-mesa graphics stacks when x11 is disabled -CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" - -# Javascript JIT is not supported on powerpc -EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " - -# ARM JIT code does not build on ARMv4/5/6 anymore -EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " - -# And for armv7* don't enable it for softfp, because after: -# https://github.com/WebKit/WebKit/commit/a2ec4ef1997d6fafa6ffc607bffb54e76168a918 -# https://bugs.webkit.org/show_bug.cgi?id=242172 -# softfp armv7* fails because WEBASSEMBLY is left enabled by default and JIT gets -# explicitly disabled causing: -# http://errors.yoctoproject.org/Errors/Details/734587/ -# PR was sent upstream, but the end result is the same both JIT and WEBASSEMBLY disabled -# https://github.com/WebKit/WebKit/pull/17447 -EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" -EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" -EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" - -EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " -EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " - -# JIT and gold linker does not work on RISCV -EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" -EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF" - -# JIT not supported on MIPS either -EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " - -# JIT not supported on X32 -# An attempt was made to upstream JIT support for x32 in -# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as -# unresolved due to limited X32 adoption. -EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " - -SECURITY_CFLAGS:remove:aarch64 = "-fpie" -SECURITY_CFLAGS:append:aarch64 = " -fPIE" - -FILES:${PN} += "${libdir}/webkitgtk-*/injected-bundle/*.so" - -RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" - -# http://errors.yoctoproject.org/Errors/Details/20370/ -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv6 = "arm" - -# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 -# https://bugs.webkit.org/show_bug.cgi?id=159880 -# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. -# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). -ARM_INSTRUCTION_SET:armv7a = "thumb" -ARM_INSTRUCTION_SET:armv7r = "thumb" -ARM_INSTRUCTION_SET:armv7ve = "thumb" - -# ANGLE requires SSE support as of webkit 2.40.x on 32 bit x86 -COMPATIBLE_HOST:x86 = "${@bb.utils.contains_any('TUNE_FEATURES', 'core2 corei7', '.*', 'null', d)}" - -# introspection inside qemu-arm hangs forever on musl/arm builds -# therefore disable GI_DATA -GI_DATA_ENABLED:libc-musl:armv7a = "False" -GI_DATA_ENABLED:libc-musl:armv7ve = "False" - -# Can't be built with ccache -CCACHE_DISABLE = "1" - -PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" -src_package_preprocess () { - # Trim build paths from comments in generated sources to ensure reproducibility - sed -i -e "s,${WORKDIR},,g" \ - ${B}/JavaScriptCore/DerivedSources/*.h \ - ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ - ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ - ${B}/WebCore/DerivedSources/*.cpp \ - ${B}/WebKitGTK/DerivedSources/webkit/*.cpp -} - diff --git a/meta/recipes-sato/webkit/webkitgtk_2.44.0.bb b/meta/recipes-sato/webkit/webkitgtk_2.44.0.bb new file mode 100644 index 0000000000..0819f6de0d --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk_2.44.0.bb @@ -0,0 +1,187 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "https://www.webkitgtk.org/" +BUGTRACKER = "https://bugs.webkit.org/" + +LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ + file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ + file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ + file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ + " + +SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ + file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ + file://reproducibility.patch \ + file://0001-CMake-Add-a-variable-to-control-macro-__PAS_ALWAYS_I.patch \ + file://no-musttail-arm.patch \ + file://t6-not-declared.patch \ + file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \ + file://2922af379dc70b4b1a63b01d67179eb431f03ac4.patch \ + " +SRC_URI[sha256sum] = "c66530e41ba59b1edba4ee89ef20b2188e273bed0497e95084729e3cfbe30c87" + +inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "opengl" + +CVE_PRODUCT = "webkitgtk webkitgtk\+" + +DEPENDS += " \ + ruby-native \ + gperf-native \ + unifdef-native \ + cairo \ + harfbuzz \ + jpeg \ + atk \ + libwebp \ + gtk4 \ + libxslt \ + libtasn1 \ + libnotify \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + glib-2.0-native \ + gettext-native \ + " + +PACKAGECONFIG_SOUP ?= "soup3" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ + enchant \ + libsecret \ + ${PACKAGECONFIG_SOUP} \ + " + +PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" +PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" +PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" +PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" +PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" +PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" +PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/egl" +PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" +PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" +PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" +PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" +PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" +PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" +PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" +PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," +PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" +PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" +PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" +PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" +PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif" +PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" +PACKAGECONFIG[jpegxl] = "-DUSE_JPEGXL=ON,-DUSE_JPEGXL=OFF,libjxl" +PACKAGECONFIG[backtrace] = "-DUSE_LIBBACKTRACE=ON,-DUSE_LIBBACKTRACE=OFF,libbacktrace" +PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" + +EXTRA_OECMAKE = " \ + -DPORT=GTK \ + ${@oe.utils.vartrue('GI_DATA_ENABLED', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ + ${@oe.utils.vartrue('GIDOCGEN_ENABLED', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ + ${@oe.utils.vartrue('DEBUG_BUILD', '-DWEBKIT_NO_INLINE_HINTS=ON', '-DWEBKIT_NO_INLINE_HINTS=OFFF', d)} \ + -DENABLE_MINIBROWSER=ON \ + -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ + -DUSE_GTK4=ON \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF \ + " + +# Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the +# debug symbols (4.3GB to 700M at time of writing) +DEBUG_FLAGS:append = "${@oe.utils.vartrue('DEBUG_BUILD', '', ' -g1', d)}" + +# Javascript JIT is not supported on ARC +EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " +# By default 25-bit "medium" calls are used on ARC +# which is not enough for binaries larger than 32 MiB +CFLAGS:append:arc = " -mlong-calls" +CXXFLAGS:append:arc = " -mlong-calls" + +# Needed for non-mesa graphics stacks when x11 is disabled +CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" + +# Javascript JIT is not supported on powerpc +EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " + +# ARM JIT code does not build on ARMv4/5/6 anymore +EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " + +# And for armv7* don't enable it for softfp, because after: +# https://github.com/WebKit/WebKit/commit/a2ec4ef1997d6fafa6ffc607bffb54e76168a918 +# https://bugs.webkit.org/show_bug.cgi?id=242172 +# softfp armv7* fails because WEBASSEMBLY is left enabled by default and JIT gets +# explicitly disabled causing: +# http://errors.yoctoproject.org/Errors/Details/734587/ +# PR was sent upstream, but the end result is the same both JIT and WEBASSEMBLY disabled +# https://github.com/WebKit/WebKit/pull/17447 +EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" +EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" +EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" + +EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " +EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " + +# JIT and gold linker does not work on RISCV +EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" +EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF" + +# JIT not supported on MIPS either +EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " + +# JIT not supported on X32 +# An attempt was made to upstream JIT support for x32 in +# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as +# unresolved due to limited X32 adoption. +EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " + +SECURITY_CFLAGS:remove:aarch64 = "-fpie" +SECURITY_CFLAGS:append:aarch64 = " -fPIE" + +FILES:${PN} += "${libdir}/webkitgtk-*/injected-bundle/*.so" + +RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" + +# http://errors.yoctoproject.org/Errors/Details/20370/ +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" + +# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 +# https://bugs.webkit.org/show_bug.cgi?id=159880 +# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. +# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). +ARM_INSTRUCTION_SET:armv7a = "thumb" +ARM_INSTRUCTION_SET:armv7r = "thumb" +ARM_INSTRUCTION_SET:armv7ve = "thumb" + +# ANGLE requires SSE support as of webkit 2.40.x on 32 bit x86 +COMPATIBLE_HOST:x86 = "${@bb.utils.contains_any('TUNE_FEATURES', 'core2 corei7', '.*', 'null', d)}" + +# introspection inside qemu-arm hangs forever on musl/arm builds +# therefore disable GI_DATA +GI_DATA_ENABLED:libc-musl:armv7a = "False" +GI_DATA_ENABLED:libc-musl:armv7ve = "False" + +# Can't be built with ccache +CCACHE_DISABLE = "1" + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${WORKDIR},,g" \ + ${B}/JavaScriptCore/DerivedSources/*.h \ + ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ + ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ + ${B}/WebCore/DerivedSources/*.cpp \ + ${B}/WebKitGTK/DerivedSources/webkit/*.cpp +} + -- cgit v1.2.3-54-g00ecf