diff options
-rw-r--r-- | meta/recipes-gnome/libgudev/libgudev/0001-meson-Pass-export-dynamic-option-to-linker.patch | 38 | ||||
-rw-r--r-- | meta/recipes-gnome/libgudev/libgudev_238.bb | 2 |
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 @@ | |||
1 | From dc4fcfb1e1e2326a412b252314af3e9424a31457 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 16 Jan 2024 12:02:46 -0800 | ||
4 | Subject: [PATCH] meson: Pass --export-dynamic option to linker | ||
5 | |||
6 | Bypass the compiler driver trying to comprehend and translate it for | ||
7 | linker, since its not clear what the right behavior should be, gcc seems | ||
8 | to translate it into --export-dynamic but clang 18+ rejects it | ||
9 | |||
10 | | x86_64-yoe-linux-clang: error: unknown argument: '-export-dynamic' | ||
11 | |||
12 | also see [1] | ||
13 | |||
14 | This makes it work as intended across gcc and clang | ||
15 | |||
16 | Upstream-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 | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | gudev/meson.build | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/gudev/meson.build b/gudev/meson.build | ||
24 | index 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 | -- | ||
37 | 2.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 | ||
17 | inherit gnomebase gobject-introspection gtk-doc | 17 | inherit gnomebase gobject-introspection gtk-doc |
18 | 18 | ||
19 | SRC_URI += "file://0001-meson-Pass-export-dynamic-option-to-linker.patch" | ||
20 | |||
19 | GIR_MESON_ENABLE_FLAG = 'enabled' | 21 | GIR_MESON_ENABLE_FLAG = 'enabled' |
20 | GIR_MESON_DISABLE_FLAG = 'disabled' | 22 | GIR_MESON_DISABLE_FLAG = 'disabled' |
21 | 23 | ||