mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
binutils: guess triplet correctly when bootstrapping
This commit is contained in:
parent
28aa2b34a4
commit
58320c41a9
1 changed files with 15 additions and 5 deletions
|
@ -14,11 +14,20 @@ if [ "$CHROOT_READY" ]; then
|
||||||
hostmakedepends="flex perl texinfo"
|
hostmakedepends="flex perl texinfo"
|
||||||
checkdepends="bc"
|
checkdepends="bc"
|
||||||
depends="binutils-doc"
|
depends="binutils-doc"
|
||||||
else
|
|
||||||
XBPS_TRIPLET=x86_64-unknown-linux-gnu
|
|
||||||
fi
|
fi
|
||||||
makedepends+=" zlib-devel"
|
makedepends+=" zlib-devel"
|
||||||
|
|
||||||
|
_get_triplet() {
|
||||||
|
if [ -z "$XBPS_TRIPLET" ]; then
|
||||||
|
echo $(
|
||||||
|
source "${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh"
|
||||||
|
echo "$XBPS_TRIPLET"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo "$XBPS_TRIPLET"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||||
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
|
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
|
||||||
|
@ -36,7 +45,7 @@ do_configure() {
|
||||||
elif [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
|
elif [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
|
||||||
CONFIGFLAG+=" --enable-64-bit-bfd --enable-targets=x86_64-linux-gnu,x86_64-pep"
|
CONFIGFLAG+=" --enable-64-bit-bfd --enable-targets=x86_64-linux-gnu,x86_64-pep"
|
||||||
fi
|
fi
|
||||||
./configure --build=$XBPS_TRIPLET --prefix=/usr --enable-threads \
|
./configure --build=$(_get_triplet) --prefix=/usr --enable-threads \
|
||||||
--enable-plugins --enable-secureplt --with-mmap \
|
--enable-plugins --enable-secureplt --with-mmap \
|
||||||
--disable-shared --enable-gold --disable-werror \
|
--disable-shared --enable-gold --disable-werror \
|
||||||
--enable-deterministic-archives --enable-ld=default \
|
--enable-deterministic-archives --enable-ld=default \
|
||||||
|
@ -66,11 +75,12 @@ do_build() {
|
||||||
# if you enable this later, keep it off for [ -z "$CHROOT_READY" ]
|
# if you enable this later, keep it off for [ -z "$CHROOT_READY" ]
|
||||||
do_check() {
|
do_check() {
|
||||||
# Seems like upstream forgot to include their new
|
# Seems like upstream forgot to include their new
|
||||||
# test-driver executable in their tarball...
|
# test-driver executable in their tarball...
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
local _triplet=$(_get_triplet)
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||||
mkdir -p ${DESTDIR}/usr/lib
|
mkdir -p ${DESTDIR}/usr/lib
|
||||||
cd ${DESTDIR}/usr
|
cd ${DESTDIR}/usr
|
||||||
|
@ -108,7 +118,7 @@ do_install() {
|
||||||
done
|
done
|
||||||
# Create triplet symlinks
|
# Create triplet symlinks
|
||||||
for f in ${DESTDIR}/usr/bin/*; do
|
for f in ${DESTDIR}/usr/bin/*; do
|
||||||
ln -s ${f##*/} ${DESTDIR}/usr/bin/${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}-${f##*/}
|
ln -s ${f##*/} ${DESTDIR}/usr/bin/${XBPS_CROSS_TRIPLET:-${_triplet}}-${f##*/}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue