1 |
commit: e6f652c1fd198fb98d807fec2d0aad21ab018252 |
2 |
Author: Mike Frysinger <vapier <AT> chromium <DOT> org> |
3 |
AuthorDate: Thu May 21 17:21:50 2020 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 21 17:23:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6f652c1 |
7 |
|
8 |
dev-embedded/u-boot-tools: avoid default gcc & pkg-config |
9 |
|
10 |
This doesn't fully fix cross-compiling, but gets us closer. |
11 |
Upstream does not support it, so our hackery cuts deep. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
.../u-boot-tools/u-boot-tools-2020.04-r1.ebuild | 18 ++++++++++++++++-- |
16 |
1 file changed, 16 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild |
19 |
index 480bbd0f2a4..32ca29504b4 100644 |
20 |
--- a/dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild |
21 |
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild |
22 |
@@ -22,13 +22,26 @@ BDEPEND=" |
23 |
|
24 |
S=${WORKDIR}/${MY_P} |
25 |
|
26 |
+src_prepare() { |
27 |
+ default |
28 |
+ sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ |
29 |
+ scripts/kconfig/lxdialog/check-lxdialog.sh \ |
30 |
+ scripts/kconfig/Makefile \ |
31 |
+ tools/Makefile || die |
32 |
+} |
33 |
+ |
34 |
+src_configure() { |
35 |
+ tc-export CC PKG_CONFIG |
36 |
+} |
37 |
+ |
38 |
src_compile() { |
39 |
# Unset a few KBUILD variables. Bug #540476 |
40 |
unset KBUILD_OUTPUT KBUILD_SRC |
41 |
|
42 |
emake \ |
43 |
V=1 \ |
44 |
- HOSTCC="$(tc-getCC)" \ |
45 |
+ CC="${CC}" \ |
46 |
+ HOSTCC="${CC}" \ |
47 |
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \ |
48 |
HOSTLDFLAGS="${LDFLAGS}" \ |
49 |
tools-only_defconfig |
50 |
@@ -38,7 +51,8 @@ src_compile() { |
51 |
NO_SDL=1 \ |
52 |
HOSTSTRIP=: \ |
53 |
STRIP=: \ |
54 |
- HOSTCC="$(tc-getCC)" \ |
55 |
+ CC="${CC}" \ |
56 |
+ HOSTCC="${CC}" \ |
57 |
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \ |
58 |
HOSTLDFLAGS="${LDFLAGS}" \ |
59 |
CONFIG_ENV_OVERWRITE=y \ |