1 |
commit: 42665d35c9428894e0ba91ec92b3974f1b3866ca |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 4 19:39:05 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 4 19:39:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42665d35 |
7 |
|
8 |
sys-libs/libucontext: override arch detection for e.g. x86 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-libs/libucontext/libucontext-1.1.ebuild | 16 +++++++++++++++- |
13 |
1 file changed, 15 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/sys-libs/libucontext/libucontext-1.1.ebuild b/sys-libs/libucontext/libucontext-1.1.ebuild |
16 |
index 306709222308..0e825c18bc26 100644 |
17 |
--- a/sys-libs/libucontext/libucontext-1.1.ebuild |
18 |
+++ b/sys-libs/libucontext/libucontext-1.1.ebuild |
19 |
@@ -23,7 +23,21 @@ RESTRICT="test" |
20 |
src_compile() { |
21 |
tc-export AR CC |
22 |
|
23 |
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs') |
24 |
+ local arch |
25 |
+ |
26 |
+ # Override arch detection |
27 |
+ # https://github.com/kaniini/libucontext/blob/master/Makefile#L3 |
28 |
+ if use x86 ; then |
29 |
+ arch="x86" |
30 |
+ elif use arm ; then |
31 |
+ arch="arm" |
32 |
+ elif use arm64 ; then |
33 |
+ arch="aarch64" |
34 |
+ elif use ppc64 ; then |
35 |
+ arch="ppc64" |
36 |
+ fi |
37 |
+ |
38 |
+ emake ARCH="${arch}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all $(usev man 'docs') |
39 |
} |
40 |
|
41 |
src_test() { |