diff options
author | Mike Frysinger <vapier@chromium.org> | 2020-05-21 13:21:50 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2020-05-21 13:23:49 -0400 |
commit | e6f652c1fd198fb98d807fec2d0aad21ab018252 (patch) | |
tree | 823766809162ebb460536e26b036e1d0288460c4 /dev-embedded | |
parent | dev-embedded/u-boot-tools: switch build-only tools to BDEPEND (diff) | |
download | gentoo-e6f652c1fd198fb98d807fec2d0aad21ab018252.tar.gz gentoo-e6f652c1fd198fb98d807fec2d0aad21ab018252.tar.bz2 gentoo-e6f652c1fd198fb98d807fec2d0aad21ab018252.zip |
dev-embedded/u-boot-tools: avoid default gcc & pkg-config
This doesn't fully fix cross-compiling, but gets us closer.
Upstream does not support it, so our hackery cuts deep.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r-- | dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild | 18 |
1 files changed, 16 insertions, 2 deletions
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 index 480bbd0f2a4c..32ca29504b4b 100644 --- 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 @@ -22,13 +22,26 @@ BDEPEND=" S=${WORKDIR}/${MY_P} +src_prepare() { + default + sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \ + scripts/kconfig/lxdialog/check-lxdialog.sh \ + scripts/kconfig/Makefile \ + tools/Makefile || die +} + +src_configure() { + tc-export CC PKG_CONFIG +} + src_compile() { # Unset a few KBUILD variables. Bug #540476 unset KBUILD_OUTPUT KBUILD_SRC emake \ V=1 \ - HOSTCC="$(tc-getCC)" \ + CC="${CC}" \ + HOSTCC="${CC}" \ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \ HOSTLDFLAGS="${LDFLAGS}" \ tools-only_defconfig @@ -38,7 +51,8 @@ src_compile() { NO_SDL=1 \ HOSTSTRIP=: \ STRIP=: \ - HOSTCC="$(tc-getCC)" \ + CC="${CC}" \ + HOSTCC="${CC}" \ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \ HOSTLDFLAGS="${LDFLAGS}" \ CONFIG_ENV_OVERWRITE=y \ |