Define "TARGET" variable to avoid hardcoding "i386-unknown-linux-musl" everywhere

This commit is contained in:
Eduardo Sánchez Muñoz 2025-07-18 14:28:30 +02:00
parent a7397d5caa
commit 502e8f944c
37 changed files with 81 additions and 79 deletions

View file

@ -120,9 +120,9 @@ src_configure() {
--enable-install-libiberty \
--enable-deterministic-archives \
--with-system-zlib \
--build=i386-unknown-linux-musl \
--host=i386-unknown-linux-musl \
--target=i386-unknown-linux-musl \
--build="${TARGET}" \
--host="${TARGET}" \
--target="${TARGET}" \
--program-prefix="" \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
@ -147,7 +147,7 @@ src_install() {
# Create triplet symlinks
pushd "${DESTDIR}${PREFIX}/bin"
for f in *; do
ln -s "${PREFIX}/bin/${f}" "i386-unknown-linux-musl-${f}"
ln -s "${PREFIX}/bin/${f}" "${TARGET}-${f}"
done
popd

View file

@ -131,9 +131,9 @@ src_configure() {
../configure \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--build=i386-unknown-linux-musl \
--host=i386-unknown-linux-musl \
--target=i386-unknown-linux-musl \
--build="${TARGET}" \
--host="${TARGET}" \
--target="${TARGET}" \
--enable-static \
--disable-nls \
--disable-multilib \
@ -157,7 +157,7 @@ src_install() {
# Create triplet symlinks
pushd "${DESTDIR}${PREFIX}/bin"
for f in *; do
ln -s "${PREFIX}/bin/${f}" "i386-unknown-linux-musl-${f}"
ln -s "${PREFIX}/bin/${f}" "${TARGET}-${f}"
done
popd