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"
|
||||
checkdepends="bc"
|
||||
depends="binutils-doc"
|
||||
else
|
||||
XBPS_TRIPLET=x86_64-unknown-linux-gnu
|
||||
fi
|
||||
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() {
|
||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||
CONFIGFLAG="--enable-64-bit-bfd --enable-multilib"
|
||||
|
@ -36,7 +45,7 @@ do_configure() {
|
|||
elif [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
|
||||
CONFIGFLAG+=" --enable-64-bit-bfd --enable-targets=x86_64-linux-gnu,x86_64-pep"
|
||||
fi
|
||||
./configure --build=$XBPS_TRIPLET --prefix=/usr --enable-threads \
|
||||
./configure --build=$(_get_triplet) --prefix=/usr --enable-threads \
|
||||
--enable-plugins --enable-secureplt --with-mmap \
|
||||
--disable-shared --enable-gold --disable-werror \
|
||||
--enable-deterministic-archives --enable-ld=default \
|
||||
|
@ -66,11 +75,12 @@ do_build() {
|
|||
# if you enable this later, keep it off for [ -z "$CHROOT_READY" ]
|
||||
do_check() {
|
||||
# Seems like upstream forgot to include their new
|
||||
# test-driver executable in their tarball...
|
||||
# test-driver executable in their tarball...
|
||||
:
|
||||
}
|
||||
|
||||
do_install() {
|
||||
local _triplet=$(_get_triplet)
|
||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||
mkdir -p ${DESTDIR}/usr/lib
|
||||
cd ${DESTDIR}/usr
|
||||
|
@ -108,7 +118,7 @@ do_install() {
|
|||
done
|
||||
# Create triplet symlinks
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue