Skip to content

Commit

Permalink
dev-embedded/u-boot-tools: avoid default gcc & pkg-config
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
vapier committed May 21, 2020
1 parent 72f17f0 commit e6f652c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions dev-embedded/u-boot-tools/u-boot-tools-2020.04-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit e6f652c

Please sign in to comment.