summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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