aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2024-04-27 08:53:31 -0500
committerBen Kohler <bkohler@gentoo.org>2024-04-27 08:53:31 -0500
commit529576b64de23b81d34f5b820893bdeb30ee1caf (patch)
tree2ed1becaaeafc0bbc97b91769ed70a73c4f0040d /gkbuilds
parentrelease 4.3.12 (diff)
downloadgenkernel-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>
Diffstat (limited to 'gkbuilds')
-rw-r--r--gkbuilds/busybox.gkbuild30
1 files changed, 21 insertions, 9 deletions
diff --git a/gkbuilds/busybox.gkbuild b/gkbuilds/busybox.gkbuild
index ac09363e..cf1e4bce 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() {