1 |
commit: 1d8718303b00e24d21ce70a6891a096e89c96f1d |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 7 03:56:24 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 7 04:00:57 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d871830 |
7 |
|
8 |
sys-libs/libucontext: respect CFLAGS without overriding upstream define |
9 |
|
10 |
Fixes musl runtime as the right symbols get defined now (unprefixed). |
11 |
|
12 |
Bug: https://github.com/rui314/mold/issues/281 |
13 |
Bug: https://bugs.gentoo.org/832700 |
14 |
Closes: https://bugs.gentoo.org/832677 |
15 |
Thanks-to: Andrew Athalye <andrewathalye <AT> outlook.com> |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
.../libucontext/files/libucontext-1.1-respect-CFLAGS.patch | 13 +++++++++++++ |
19 |
.../{libucontext-1.1.ebuild => libucontext-1.1-r1.ebuild} | 10 +++++++--- |
20 |
2 files changed, 20 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch b/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch |
23 |
new file mode 100644 |
24 |
index 000000000000..49dd872690d5 |
25 |
--- /dev/null |
26 |
+++ b/sys-libs/libucontext/files/libucontext-1.1-respect-CFLAGS.patch |
27 |
@@ -0,0 +1,13 @@ |
28 |
+https://bugs.gentoo.org/832677 |
29 |
+https://github.com/kaniini/libucontext/issues/39 |
30 |
+--- a/Makefile |
31 |
++++ b/Makefile |
32 |
+@@ -17,7 +17,7 @@ endif |
33 |
+ LIBDIR := /lib |
34 |
+ INCLUDEDIR := /usr/include |
35 |
+ PKGCONFIGDIR := /usr/lib/pkgconfig |
36 |
+-CFLAGS := -ggdb3 -O2 -Wall |
37 |
++CFLAGS ?= -ggdb3 -O2 -Wall |
38 |
+ CPPFLAGS := -Iinclude -Iarch/${ARCH} -Iarch/common |
39 |
+ EXPORT_UNPREFIXED := yes |
40 |
+ FREESTANDING := no |
41 |
|
42 |
diff --git a/sys-libs/libucontext/libucontext-1.1.ebuild b/sys-libs/libucontext/libucontext-1.1-r1.ebuild |
43 |
similarity index 82% |
44 |
rename from sys-libs/libucontext/libucontext-1.1.ebuild |
45 |
rename to sys-libs/libucontext/libucontext-1.1-r1.ebuild |
46 |
index f637a693a337..cf76cfa1a756 100644 |
47 |
--- a/sys-libs/libucontext/libucontext-1.1.ebuild |
48 |
+++ b/sys-libs/libucontext/libucontext-1.1-r1.ebuild |
49 |
@@ -1,4 +1,4 @@ |
50 |
-# Copyright 1999-2021 Gentoo Authors |
51 |
+# Copyright 1999-2022 Gentoo Authors |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
|
54 |
EAPI=8 |
55 |
@@ -20,6 +20,10 @@ BDEPEND="man? ( app-text/scdoc )" |
56 |
# segfault needs investigation |
57 |
RESTRICT="test" |
58 |
|
59 |
+PATCHES=( |
60 |
+ "${FILESDIR}"/${PN}-1.1-respect-CFLAGS.patch |
61 |
+) |
62 |
+ |
63 |
src_compile() { |
64 |
tc-export AR CC |
65 |
|
66 |
@@ -39,11 +43,11 @@ src_compile() { |
67 |
arch="$(uname -m)" |
68 |
fi |
69 |
|
70 |
- emake ARCH="${arch}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs') |
71 |
+ emake ARCH="${arch}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs') |
72 |
} |
73 |
|
74 |
src_test() { |
75 |
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" check |
76 |
+ emake LDFLAGS="${LDFLAGS}" check |
77 |
} |
78 |
|
79 |
src_install() { |