1 |
commit: 7b4b36a420335b233dfa119dab91e536880d69c2 |
2 |
Author: Yang Yang <geraint0923 <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Nov 13 19:36:46 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 22 05:56:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b4b36a4 |
7 |
|
8 |
sys-auth/elogind: add patch to enable clang-13 compilation |
9 |
|
10 |
The patch is extracted from upstream: |
11 |
https://github.com/elogind/elogind/commit/cd5390335303da11f3aeaa5431dd7a88c5a9b3e9 |
12 |
|
13 |
Bug: https://github.com/elogind/elogind/issues/215 |
14 |
Signed-off-by: Yang Yang <geraint0923 <AT> gmail.com> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/22938 |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
sys-auth/elogind/elogind-246.10-r2.ebuild | 1 + |
19 |
.../elogind-246.10-clang-undefined-symbol.patch | 20 ++++++++++++++++++++ |
20 |
2 files changed, 21 insertions(+) |
21 |
|
22 |
diff --git a/sys-auth/elogind/elogind-246.10-r2.ebuild b/sys-auth/elogind/elogind-246.10-r2.ebuild |
23 |
index d4aa96426afb..e571a7a18750 100644 |
24 |
--- a/sys-auth/elogind/elogind-246.10-r2.ebuild |
25 |
+++ b/sys-auth/elogind/elogind-246.10-r2.ebuild |
26 |
@@ -52,6 +52,7 @@ PATCHES=( |
27 |
"${FILESDIR}/${PN}-243.7-nodocs.patch" |
28 |
"${FILESDIR}/${PN}-241.4-broken-test.patch" # bug 699116 |
29 |
"${FILESDIR}/${P}-revert-polkit-automagic.patch" |
30 |
+ "${FILESDIR}/${P}-clang-undefined-symbol.patch" |
31 |
) |
32 |
|
33 |
pkg_setup() { |
34 |
|
35 |
diff --git a/sys-auth/elogind/files/elogind-246.10-clang-undefined-symbol.patch b/sys-auth/elogind/files/elogind-246.10-clang-undefined-symbol.patch |
36 |
new file mode 100644 |
37 |
index 000000000000..3a157615884e |
38 |
--- /dev/null |
39 |
+++ b/sys-auth/elogind/files/elogind-246.10-clang-undefined-symbol.patch |
40 |
@@ -0,0 +1,20 @@ |
41 |
+--- a/src/libelogind/sd-bus/bus-error.h |
42 |
++++ b/src/libelogind/sd-bus/bus-error.h |
43 |
+@@ -28,11 +28,17 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_lis |
44 |
+ * the bus error table, and BUS_ERROR_MAP_ELF_USE has to be used at |
45 |
+ * least once per compilation unit (i.e. per library), to ensure that |
46 |
+ * the error map is really added to the final binary. |
47 |
++ * |
48 |
++ * In addition, set the retain attribute so that the section cannot be |
49 |
++ * discarded by ld --gc-sections -z start-stop-gc. Older compilers would |
50 |
++ * warn for the unknown attribute, so just disable -Wattributes. |
51 |
+ */ |
52 |
+ |
53 |
+ #define BUS_ERROR_MAP_ELF_REGISTER \ |
54 |
++ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \ |
55 |
+ _section_("SYSTEMD_BUS_ERROR_MAP") \ |
56 |
+ _used_ \ |
57 |
++ __attribute__((retain)) \ |
58 |
+ _alignptr_ \ |
59 |
+ _variable_no_sanitize_address_ |
60 |
+ |