summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/libgudev
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-01-16 13:42:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-21 12:27:12 +0000
commit7fb77bfae18fd997cec6bca7fa5c6f5ddc52c09f (patch)
tree4300338723e0089dc56478da63b9cb12f8ee13fa /meta/recipes-gnome/libgudev
parent7af374c90c349af2c7ae9cf7d4fa14eeeb23b108 (diff)
downloadpoky-7fb77bfae18fd997cec6bca7fa5c6f5ddc52c09f.tar.gz
libgudev: Pass export-dynamic to linker directly.
New clang 18+ errors out on this while older clang does not (From OE-Core rev: 31c639469e3e0aa4274ec891bef83cdce746e9a5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/libgudev')
-rw-r--r--meta/recipes-gnome/libgudev/libgudev/0001-meson-Pass-export-dynamic-option-to-linker.patch38
-rw-r--r--meta/recipes-gnome/libgudev/libgudev_238.bb2
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-gnome/libgudev/libgudev/0001-meson-Pass-export-dynamic-option-to-linker.patch b/meta/recipes-gnome/libgudev/libgudev/0001-meson-Pass-export-dynamic-option-to-linker.patch
new file mode 100644
index 0000000000..8a06d244e4
--- /dev/null
+++ b/meta/recipes-gnome/libgudev/libgudev/0001-meson-Pass-export-dynamic-option-to-linker.patch
@@ -0,0 +1,38 @@
1From dc4fcfb1e1e2326a412b252314af3e9424a31457 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 16 Jan 2024 12:02:46 -0800
4Subject: [PATCH] meson: Pass --export-dynamic option to linker
5
6Bypass the compiler driver trying to comprehend and translate it for
7linker, since its not clear what the right behavior should be, gcc seems
8to translate it into --export-dynamic but clang 18+ rejects it
9
10| x86_64-yoe-linux-clang: error: unknown argument: '-export-dynamic'
11
12also see [1]
13
14This makes it work as intended across gcc and clang
15
16Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/30]
17[1] https://discourse.llvm.org/t/clang-option-export-dynamic-parse-to-e-xport-dynamic-error/72454
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 gudev/meson.build | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/gudev/meson.build b/gudev/meson.build
24index e904203..3ed580b 100644
25--- a/gudev/meson.build
26+++ b/gudev/meson.build
27@@ -33,7 +33,7 @@ libgudev_c_args = [
28 ]
29
30 libgudev_link_args = [
31- '-export-dynamic',
32+ '-Wl,--export-dynamic',
33 '-Wl,--version-script,@0@/libgudev-1.0.sym'.format(top_srcdir),
34 ]
35
36--
372.43.0
38
diff --git a/meta/recipes-gnome/libgudev/libgudev_238.bb b/meta/recipes-gnome/libgudev/libgudev_238.bb
index 5923544eca..f197f6421d 100644
--- a/meta/recipes-gnome/libgudev/libgudev_238.bb
+++ b/meta/recipes-gnome/libgudev/libgudev_238.bb
@@ -16,6 +16,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
16 16
17inherit gnomebase gobject-introspection gtk-doc 17inherit gnomebase gobject-introspection gtk-doc
18 18
19SRC_URI += "file://0001-meson-Pass-export-dynamic-option-to-linker.patch"
20
19GIR_MESON_ENABLE_FLAG = 'enabled' 21GIR_MESON_ENABLE_FLAG = 'enabled'
20GIR_MESON_DISABLE_FLAG = 'disabled' 22GIR_MESON_DISABLE_FLAG = 'disabled'
21 23