From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5F01D1581E7 for ; Fri, 26 Apr 2024 18:07:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53D37E29D5; Fri, 26 Apr 2024 18:07:55 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 223E2E29D5 for ; Fri, 26 Apr 2024 18:07:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B1C3A343076 for ; Fri, 26 Apr 2024 18:07:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1B7FD173B for ; Fri, 26 Apr 2024 18:07:52 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1714154815.25e0a98682b9ab600cb3a6ea3fc3834ce1cce8f6.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/busybox/busybox-1.36.1-r1.ebuild sys-apps/busybox/busybox-1.36.1-r2.ebuild sys-apps/busybox/busybox-9999.ebuild X-VCS-Directories: sys-apps/busybox/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 25e0a98682b9ab600cb3a6ea3fc3834ce1cce8f6 X-VCS-Branch: master Date: Fri, 26 Apr 2024 18:07:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5092d4b7-6892-453d-957b-ccb4302a01aa X-Archives-Hash: 017a296acdb54c068c684b4853d09b6d commit: 25e0a98682b9ab600cb3a6ea3fc3834ce1cce8f6 Author: Mike Gilbert gentoo org> AuthorDate: Fri Apr 26 18:04:46 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Fri Apr 26 18:06:55 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25e0a986 sys-apps/busybox: rework toolchain handling Pass toolchain vars as arguments to make to avoid using sed on Makefile. Unsilence make so we can see what is actually being executed in src_configure. Append -D_FILE_OFFSET_BITS=64 to BUILD_CFLAGS and pass this as HOSTCFLAGS to resolve LFS issue on 32-bit archs. Closes: https://bugs.gentoo.org/930513 Signed-off-by: Mike Gilbert gentoo.org> sys-apps/busybox/busybox-1.36.1-r1.ebuild | 45 +++++++++++++++++++------------ sys-apps/busybox/busybox-1.36.1-r2.ebuild | 45 +++++++++++++++++++------------ sys-apps/busybox/busybox-9999.ebuild | 45 +++++++++++++++++++------------ 3 files changed, 84 insertions(+), 51 deletions(-) diff --git a/sys-apps/busybox/busybox-1.36.1-r1.ebuild b/sys-apps/busybox/busybox-1.36.1-r1.ebuild index 78c429beefc9..98369ddbf32e 100644 --- a/sys-apps/busybox/busybox-1.36.1-r1.ebuild +++ b/sys-apps/busybox/busybox-1.36.1-r1.ebuild @@ -87,9 +87,6 @@ PATCHES=( src_prepare() { default - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - use ppc64 && append-flags -mminimal-toc #130943 cp "${FILESDIR}"/ginit.c init/ || die @@ -97,13 +94,6 @@ src_prepare() { sed -i -r \ -e 's:[[:space:]]?-(Werror|Os|Oz|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ Makefile.flags || die - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ - Makefile || die sed -i \ -e 's:-static-libgcc::' \ Makefile.flags || die @@ -112,13 +102,34 @@ src_prepare() { sed -i -e 's:debug=false:debug=true:' scripts/trylink || die } +bbmake() { + local args=( + V=1 + CROSS_COMPILE="${CHOST}-" + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS}" + PKG_CONFIG="${PKG_CONFIG}" + ) + emake "${args[@]}" "$@" +} + src_configure() { + tc-export AR CC BUILD_CC PKG_CONFIG + + tc-is-cross-compiler || BUILD_CFLAGS=${CFLAGS} + BUILD_CFLAGS+=" -D_FILE_OFFSET_BITS=64" #930513 + + append-flags -fno-strict-aliasing #310413 + use ppc64 && append-flags -mminimal-toc #130943 + # check for a busybox config before making one of our own. # if one exist lets return and use it. restore_config .config if [ -f .config ]; then - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | bbmake -j1 oldconfig return 0 else ewarn "Could not locate user configfile, so we will save a default one" @@ -127,11 +138,11 @@ src_configure() { # setting SKIP_SELINUX skips searching for selinux at this stage. We don't # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + bbmake -j1 allyesconfig SKIP_SELINUX=$(usex selinux n y) #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + yes "" | bbmake -j1 oldconfig SKIP_SELINUX=$(usex selinux n y) #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -221,17 +232,17 @@ src_configure() { busybox_config_option n ${opt} done - emake -j1 oldconfig > /dev/null + bbmake -j1 oldconfig } src_compile() { unset KBUILD_OUTPUT #88088 export SKIP_STRIP=y - emake V=1 busybox + bbmake busybox # bug #701512 - emake V=1 doc + bbmake doc } src_install() { @@ -304,7 +315,7 @@ src_install() { fi # bundle up the symlink files for use later - emake DESTDIR="${ED}" install + bbmake DESTDIR="${ED}" install # for compatibility, provide /usr/bin/env mkdir -p _install/usr/bin || die if [[ ! -e _install/usr/bin/env ]]; then diff --git a/sys-apps/busybox/busybox-1.36.1-r2.ebuild b/sys-apps/busybox/busybox-1.36.1-r2.ebuild index 74082ac77ae5..fc700c3b31e4 100644 --- a/sys-apps/busybox/busybox-1.36.1-r2.ebuild +++ b/sys-apps/busybox/busybox-1.36.1-r2.ebuild @@ -88,9 +88,6 @@ PATCHES=( src_prepare() { default - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - use ppc64 && append-flags -mminimal-toc #130943 cp "${FILESDIR}"/ginit.c init/ || die @@ -98,13 +95,6 @@ src_prepare() { sed -i -r \ -e 's:[[:space:]]?-(Werror|Os|Oz|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ Makefile.flags || die - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ - Makefile || die sed -i \ -e 's:-static-libgcc::' \ Makefile.flags || die @@ -113,13 +103,34 @@ src_prepare() { sed -i -e 's:debug=false:debug=true:' scripts/trylink || die } +bbmake() { + local args=( + V=1 + CROSS_COMPILE="${CHOST}-" + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS}" + PKG_CONFIG="${PKG_CONFIG}" + ) + emake "${args[@]}" "$@" +} + src_configure() { + tc-export AR CC BUILD_CC PKG_CONFIG + + tc-is-cross-compiler || BUILD_CFLAGS=${CFLAGS} + BUILD_CFLAGS+=" -D_FILE_OFFSET_BITS=64" #930513 + + append-flags -fno-strict-aliasing #310413 + use ppc64 && append-flags -mminimal-toc #130943 + # check for a busybox config before making one of our own. # if one exist lets return and use it. restore_config .config if [ -f .config ]; then - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | bbmake -j1 oldconfig return 0 else ewarn "Could not locate user configfile, so we will save a default one" @@ -128,11 +139,11 @@ src_configure() { # setting SKIP_SELINUX skips searching for selinux at this stage. We don't # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + bbmake -j1 allyesconfig SKIP_SELINUX=$(usex selinux n y) #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + yes "" | bbmake -j1 oldconfig SKIP_SELINUX=$(usex selinux n y) #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -222,17 +233,17 @@ src_configure() { busybox_config_option n ${opt} done - emake -j1 oldconfig > /dev/null + bbmake -j1 oldconfig } src_compile() { unset KBUILD_OUTPUT #88088 export SKIP_STRIP=y - emake V=1 busybox + bbmake busybox # bug #701512 - emake V=1 doc + bbmake doc } src_install() { @@ -305,7 +316,7 @@ src_install() { fi # bundle up the symlink files for use later - emake DESTDIR="${ED}" install + bbmake DESTDIR="${ED}" install # for compatibility, provide /usr/bin/env mkdir -p _install/usr/bin || die if [[ ! -e _install/usr/bin/env ]]; then diff --git a/sys-apps/busybox/busybox-9999.ebuild b/sys-apps/busybox/busybox-9999.ebuild index 74082ac77ae5..fc700c3b31e4 100644 --- a/sys-apps/busybox/busybox-9999.ebuild +++ b/sys-apps/busybox/busybox-9999.ebuild @@ -88,9 +88,6 @@ PATCHES=( src_prepare() { default - unset KBUILD_OUTPUT #88088 - append-flags -fno-strict-aliasing #310413 - use ppc64 && append-flags -mminimal-toc #130943 cp "${FILESDIR}"/ginit.c init/ || die @@ -98,13 +95,6 @@ src_prepare() { sed -i -r \ -e 's:[[:space:]]?-(Werror|Os|Oz|falign-(functions|jumps|loops|labels)=1|fomit-frame-pointer)\>::g' \ Makefile.flags || die - sed -i \ - -e "/^CROSS_COMPILE/s:=.*:= ${CHOST}-:" \ - -e "/^AR\>/s:=.*:= $(tc-getAR):" \ - -e "/^CC\>/s:=.*:= $(tc-getCC):" \ - -e "/^HOSTCC/s:=.*:= $(tc-getBUILD_CC):" \ - -e "/^PKG_CONFIG\>/s:=.*:= $(tc-getPKG_CONFIG):" \ - Makefile || die sed -i \ -e 's:-static-libgcc::' \ Makefile.flags || die @@ -113,13 +103,34 @@ src_prepare() { sed -i -e 's:debug=false:debug=true:' scripts/trylink || die } +bbmake() { + local args=( + V=1 + CROSS_COMPILE="${CHOST}-" + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS}" + PKG_CONFIG="${PKG_CONFIG}" + ) + emake "${args[@]}" "$@" +} + src_configure() { + tc-export AR CC BUILD_CC PKG_CONFIG + + tc-is-cross-compiler || BUILD_CFLAGS=${CFLAGS} + BUILD_CFLAGS+=" -D_FILE_OFFSET_BITS=64" #930513 + + append-flags -fno-strict-aliasing #310413 + use ppc64 && append-flags -mminimal-toc #130943 + # check for a busybox config before making one of our own. # if one exist lets return and use it. restore_config .config if [ -f .config ]; then - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | bbmake -j1 oldconfig return 0 else ewarn "Could not locate user configfile, so we will save a default one" @@ -128,11 +139,11 @@ src_configure() { # setting SKIP_SELINUX skips searching for selinux at this stage. We don't # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + bbmake -j1 allyesconfig SKIP_SELINUX=$(usex selinux n y) #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 + yes "" | bbmake -j1 oldconfig SKIP_SELINUX=$(usex selinux n y) #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC @@ -222,17 +233,17 @@ src_configure() { busybox_config_option n ${opt} done - emake -j1 oldconfig > /dev/null + bbmake -j1 oldconfig } src_compile() { unset KBUILD_OUTPUT #88088 export SKIP_STRIP=y - emake V=1 busybox + bbmake busybox # bug #701512 - emake V=1 doc + bbmake doc } src_install() { @@ -305,7 +316,7 @@ src_install() { fi # bundle up the symlink files for use later - emake DESTDIR="${ED}" install + bbmake DESTDIR="${ED}" install # for compatibility, provide /usr/bin/env mkdir -p _install/usr/bin || die if [[ ! -e _install/usr/bin/env ]]; then