diff options
author | 2024-04-27 08:53:31 -0500 | |
---|---|---|
committer | 2024-04-27 08:53:31 -0500 | |
commit | 529576b64de23b81d34f5b820893bdeb30ee1caf (patch) | |
tree | 2ed1becaaeafc0bbc97b91769ed70a73c4f0040d | |
parent | release 4.3.12 (diff) | |
download | genkernel-529576b64de23b81d34f5b820893bdeb30ee1caf.tar.gz genkernel-529576b64de23b81d34f5b820893bdeb30ee1caf.tar.bz2 genkernel-529576b64de23b81d34f5b820893bdeb30ee1caf.zip |
gkbuilds/busybox: rework toolchain handling
Thanks to Mike Gilbert, code changes borrowed from gentoo.git commit
25e0a98682b9ab600cb3a6ea3fc3834ce1cce8f6
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
-rw-r--r-- | gkbuilds/busybox.gkbuild | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/gkbuilds/busybox.gkbuild b/gkbuilds/busybox.gkbuild index ac09363..cf1e4bc 100644 --- a/gkbuilds/busybox.gkbuild +++ b/gkbuilds/busybox.gkbuild @@ -10,14 +10,6 @@ src_prepare() { Makefile.flags || gen_die sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - -e "/^HOSTCXX/s:=.*:= $(tc-getBUILD_CXX):" \ - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ - Makefile || gen_die - - sed -i \ -e 's:-static-libgcc::' \ Makefile.flags || die @@ -28,8 +20,28 @@ src_prepare() { || die "Failed top copy '${TEMP}/busybox-config' to '${S}/.config.gk_orig'!" } +bbmake() { + local args=( + V=1 + CROSS_COMPILE="${CHOST}-" + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS}" + PKG_CONFIG="${PKG_CONFIG}" + ) + make "${args[@]}" "$@" +} + src_configure() { - gkexec "yes '' | ${MAKE} V=1 oldconfig" 1 + tc-export AR CC BUILD_CC PKG_CONFIG + BUILD_CFLAGS=${CFLAGS} + BUILD_CFLAGS+=" -D_FILE_OFFSET_BITS=64" + gkexec "yes '' | bbmake V=1 oldconfig" 1 +} + +src_compile() { + bbmake busybox } src_install() { |