binutils: fix bootstrap on host without zstd and makeinfo

This commit is contained in:
Đoàn Trần Công Danh 2024-07-12 09:07:47 +07:00
parent 014ca1d1ac
commit 5704c8e560
1 changed files with 11 additions and 5 deletions

View File

@ -15,14 +15,16 @@ checksum=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450
build_options="all_targets"
desc_option_all_targets="Enable all supported targets"
subpackages="binutils-doc"
if [ "$CHROOT_READY" ]; then
hostmakedepends+=" flex perl texinfo"
makedepends+=" elfutils-devel"
checkdepends="bc"
depends="binutils-doc binutils-libs"
subpackages+=" libiberty-devel binutils-libs binutils-devel"
unset subpackages _makeinfo
else
_makeinfo=MAKEINFO=/bin/true
# Set to space force no subpackages
subpackages=" "
fi
_get_triplet() {
@ -43,6 +45,10 @@ do_configure() {
conf+=" --with-debuginfod --enable-shared --enable-install-libiberty"
else
conf+=" --without-debuginfod --disable-shared --disable-install-libbfd"
sed -i "
s;zlibinc=\$;&-I${XBPS_MASTERDIR}/usr/include;
s;zlibdir=\$;&-L${XBPS_MASTERDIR}/usr/lib;
" */configure
fi
if [ "$CROSS_BUILD" ]; then
# we don't want --with-sysroot=${XBPS_CROSS_BASE} like gnu-configure
@ -114,7 +120,7 @@ do_configure() {
}
do_build() {
cd ${wrksrc}/build && make ${makejobs}
cd ${wrksrc}/build && make ${makejobs} ${_makeinfo}
}
# there is a testsuite now, but e.g. ifunc tests all fail on musl and
@ -129,7 +135,7 @@ do_install() {
cd ${wrksrc}/build
local _triplet=$(_get_triplet)
make DESTDIR=${DESTDIR} tooldir=/usr install
make DESTDIR=${DESTDIR} tooldir=/usr install ${_makeinfo}
cd ..