diff mbox series

[v2,14/44] libwpe: upgrade 1.12.0 -> 1.12.2

Message ID 20220808064237.3975347-14-alex@linutronix.de
State Accepted, archived
Commit 03b7bfb0f011ba812808fa353611178cd5618e81
Headers show
Series [v2,01/44] rpm: update 4.17.0 -> 4.17.1 | expand

Commit Message

Alexander Kanavin Aug. 8, 2022, 6:42 a.m. UTC
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...ure-due-to-libc-using-libc-functions.patch | 42 +++++++++++++++++++
 .../{libwpe_1.12.0.bb => libwpe_1.12.2.bb}    |  6 ++-
 2 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
 rename meta/recipes-sato/webkit/{libwpe_1.12.0.bb => libwpe_1.12.2.bb} (72%)

Comments

Khem Raj Aug. 8, 2022, 5:10 p.m. UTC | #1
On 8/7/22 11:42 PM, Alexander Kanavin wrote:
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>   ...ure-due-to-libc-using-libc-functions.patch | 42 +++++++++++++++++++
>   .../{libwpe_1.12.0.bb => libwpe_1.12.2.bb}    |  6 ++-
>   2 files changed, 46 insertions(+), 2 deletions(-)
>   create mode 100644 meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
>   rename meta/recipes-sato/webkit/{libwpe_1.12.0.bb => libwpe_1.12.2.bb} (72%)
> 
> diff --git a/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
> new file mode 100644
> index 0000000000..6d27b4835d
> --- /dev/null
> +++ b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
> @@ -0,0 +1,42 @@
> +From ccf8a58c3536ca0e62748e0ea477514e14d821bc Mon Sep 17 00:00:00 2001
> +From: Adrian Perez de Castro <aperez@igalia.com>
> +Date: Thu, 4 Aug 2022 12:19:05 +0300
> +Subject: [PATCH] Fix build failure due to libc++ using libc functions
> +
> +Include the "alloc-private.h" header after the C++ standard library
> +headers. This sidesteps build failures caused by implementations of
> +std::map and std::string which use libc memory allocation functions
> +in expanded templates after they have been marked with the "poison"
> +pragma.
> +
> +Fixes #115
> +
> +Upstream-Status: Backport

Link to PR or upstream commit would be handy here.

> +Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> +---
> + src/pasteboard-generic.cpp | 9 ++++++---
> + 1 file changed, 6 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/pasteboard-generic.cpp b/src/pasteboard-generic.cpp
> +index 86fe4ee..a357027 100644
> +--- a/src/pasteboard-generic.cpp
> ++++ b/src/pasteboard-generic.cpp
> +@@ -26,12 +26,15 @@
> +
> + #include "pasteboard-private.h"
> +
> +-#include "alloc-private.h"
> +-#include <cstdlib>
> +-#include <cstring>
> + #include <map>
> + #include <string>
> +
> ++// We need to include this header last, in order to avoid template expansions
> ++// from the C++ standard library happening after it forbids usage of the libc
> ++// memory functions.
> ++#include "alloc-private.h"
> ++#include <cstring>
> ++
> + namespace Generic {
> + using Pasteboard = std::map<std::string, std::string>;
> + }
> diff --git a/meta/recipes-sato/webkit/libwpe_1.12.0.bb b/meta/recipes-sato/webkit/libwpe_1.12.2.bb
> similarity index 72%
> rename from meta/recipes-sato/webkit/libwpe_1.12.0.bb
> rename to meta/recipes-sato/webkit/libwpe_1.12.2.bb
> index ac4ee3eb23..e23a9ac32d 100644
> --- a/meta/recipes-sato/webkit/libwpe_1.12.0.bb
> +++ b/meta/recipes-sato/webkit/libwpe_1.12.2.bb
> @@ -10,8 +10,10 @@ inherit cmake features_check pkgconfig
>   
>   REQUIRED_DISTRO_FEATURES = "opengl"
>   
> -SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz"
> -SRC_URI[sha256sum] = "e8eeca228a6b4c36294cfb63f7d3ba9ada47a430904a5a973b3c99c96a44c18c"
> +SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz \
> +           file://0001-Fix-build-failure-due-to-libc-using-libc-functions.patch \
> +           "
> +SRC_URI[sha256sum] = "4ac4fd0a8b562b721bffd0f46ae9f06c2b5a3114407581978be875a9d651642a"
>   
>   # This is a tweak of upstream-version-is-even needed because
>   # ipstream directory contains tarballs for other components as well.
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#169039): https://lists.openembedded.org/g/openembedded-core/message/169039
> Mute This Topic: https://lists.openembedded.org/mt/92887010/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
new file mode 100644
index 0000000000..6d27b4835d
--- /dev/null
+++ b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
@@ -0,0 +1,42 @@ 
+From ccf8a58c3536ca0e62748e0ea477514e14d821bc Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Thu, 4 Aug 2022 12:19:05 +0300
+Subject: [PATCH] Fix build failure due to libc++ using libc functions
+
+Include the "alloc-private.h" header after the C++ standard library
+headers. This sidesteps build failures caused by implementations of
+std::map and std::string which use libc memory allocation functions
+in expanded templates after they have been marked with the "poison"
+pragma.
+
+Fixes #115
+
+Upstream-Status: Backport
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/pasteboard-generic.cpp | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/pasteboard-generic.cpp b/src/pasteboard-generic.cpp
+index 86fe4ee..a357027 100644
+--- a/src/pasteboard-generic.cpp
++++ b/src/pasteboard-generic.cpp
+@@ -26,12 +26,15 @@
+ 
+ #include "pasteboard-private.h"
+ 
+-#include "alloc-private.h"
+-#include <cstdlib>
+-#include <cstring>
+ #include <map>
+ #include <string>
+ 
++// We need to include this header last, in order to avoid template expansions
++// from the C++ standard library happening after it forbids usage of the libc
++// memory functions.
++#include "alloc-private.h"
++#include <cstring>
++
+ namespace Generic {
+ using Pasteboard = std::map<std::string, std::string>;
+ }
diff --git a/meta/recipes-sato/webkit/libwpe_1.12.0.bb b/meta/recipes-sato/webkit/libwpe_1.12.2.bb
similarity index 72%
rename from meta/recipes-sato/webkit/libwpe_1.12.0.bb
rename to meta/recipes-sato/webkit/libwpe_1.12.2.bb
index ac4ee3eb23..e23a9ac32d 100644
--- a/meta/recipes-sato/webkit/libwpe_1.12.0.bb
+++ b/meta/recipes-sato/webkit/libwpe_1.12.2.bb
@@ -10,8 +10,10 @@  inherit cmake features_check pkgconfig
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "e8eeca228a6b4c36294cfb63f7d3ba9ada47a430904a5a973b3c99c96a44c18c"
+SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz \
+           file://0001-Fix-build-failure-due-to-libc-using-libc-functions.patch \
+           "
+SRC_URI[sha256sum] = "4ac4fd0a8b562b721bffd0f46ae9f06c2b5a3114407581978be875a9d651642a"
 
 # This is a tweak of upstream-version-is-even needed because
 # ipstream directory contains tarballs for other components as well.