From 502e8f944c2c6eabce64ed5d149c0a23020433c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20S=C3=A1nchez=20Mu=C3=B1oz?= Date: Fri, 18 Jul 2025 14:28:30 +0200 Subject: [PATCH] Define "TARGET" variable to avoid hardcoding "i386-unknown-linux-musl" everywhere --- parts.rst | 2 +- steps/SHA256SUMS.pkgs | 2 +- steps/autogen-5.18.16/pass1.sh | 2 +- steps/bash-5.2.15/pass1.sh | 2 +- steps/bc-1.08.1/pass1.sh | 2 +- steps/binutils-2.30/pass1.sh | 8 ++++---- steps/binutils-2.41/pass1.sh | 8 ++++---- steps/binutils-2.41/pass2.sh | 8 ++++---- steps/coreutils-9.4/pass1.sh | 2 +- steps/curl-8.12.1/pass1.sh | 2 +- steps/curl-8.12.1/pass2.sh | 2 +- steps/ed-1.4/pass1.sh | 2 +- steps/findutils-4.2.33/pass1.sh | 2 +- steps/gcc-10.5.0/pass1.sh | 6 +++--- steps/gcc-13.3.0/pass1.sh | 6 +++--- steps/gcc-4.0.4/pass1.sh | 16 ++++++++-------- steps/gcc-4.0.4/pass2.sh | 12 ++++++------ steps/gcc-4.7.4/pass1.sh | 18 +++++++++--------- steps/gmp-6.2.1/pass1.sh | 2 +- steps/guile-3.0.9/pass1.sh | 2 +- .../improve/{musl_libdir.sh => musl_target.sh} | 4 +++- steps/libffi-3.3/pass1.sh | 2 +- steps/make-3.82/pass2.sh | 2 +- steps/make-4.2.1/pass1.sh | 2 +- steps/manifest | 2 +- steps/musl-1.2.5/pass1.sh | 2 +- steps/musl-1.2.5/pass3.sh | 2 +- steps/pkg-config-0.29.2/pass1.sh | 2 +- steps/python-2.5.6/pass1.sh | 4 ++-- steps/python-3.1.5/pass1.sh | 4 ++-- steps/python-3.1.5/pass2.sh | 4 ++-- steps/python-3.11.1/pass1.sh | 4 ++-- steps/python-3.3.7/pass1.sh | 4 ++-- steps/python-3.4.10/pass1.sh | 4 ++-- steps/python-3.8.16/pass1.sh | 4 ++-- steps/util-linux-2.19.1/pass1.sh | 6 +++--- steps/xz-5.6.4/pass1.sh | 2 +- 37 files changed, 81 insertions(+), 79 deletions(-) rename steps/improve/{musl_libdir.sh => musl_target.sh} (65%) diff --git a/parts.rst b/parts.rst index d094eee2..e3a02101 100644 --- a/parts.rst +++ b/parts.rst @@ -394,7 +394,7 @@ tcc 0.9.27 (patched) We recompile ``tcc`` with some patches needed to build musl. -musl 1.1.24 and musl_libdir +musl 1.1.24 and musl_target =========================== ``musl`` is a C standard library that is lightweight, fast, simple, diff --git a/steps/SHA256SUMS.pkgs b/steps/SHA256SUMS.pkgs index 97d72c30..e2a071aa 100644 --- a/steps/SHA256SUMS.pkgs +++ b/steps/SHA256SUMS.pkgs @@ -35,7 +35,7 @@ fd65c11422588984bc3a440b1fd9d022307a200de182cfedfe3387a09cbece98 ca-certificate 982a3496ce3277c562acc896ba796939fe55a37432b2c76ab16b76e051a045a2 coreutils-5.0_0.tar.bz2 27f283c42e2728d0d0682d56ada44b11ff11d07843e595c133a43f4c6aef53d0 coreutils-6.10_0.tar.bz2 22d4dcf97bc9caf36f2abc4fbfc2f40d13a0be2db2efce913b09a00461db7a06 coreutils-9.4_0.tar.bz2 -c0ab68a12ff82cb2b65b9c480281b70441ee14ef9bfe93605d1d5852379dbbaf curl-8.12.1_0.tar.bz2 +55435a61930f799a1a02f0a359081580b292c526f071aff3532170b3d9e37227 curl-8.12.1_0.tar.bz2 ea841c92382860d3618368b86510514ed7d717c64625740e70baba2508e182c4 curl-8.12.1_1.tar.bz2 fedf6ffbd37b14e9a0c94cd3063c6ac5d38f13be8a3399093ec112f9cd9d0816 dhcpcd-10.0.1_0.tar.bz2 0462b6a04899a98d60c33f9d16fa00e2e6b7c21cc80ccebc8358fc08105467a2 diffutils-2.7_0.tar.bz2 diff --git a/steps/autogen-5.18.16/pass1.sh b/steps/autogen-5.18.16/pass1.sh index f53a1b60..b4eabc9b 100755 --- a/steps/autogen-5.18.16/pass1.sh +++ b/steps/autogen-5.18.16/pass1.sh @@ -43,7 +43,7 @@ src_compile() { # Specify timeout to avoid non-reproducibility CPPFLAGS=-D_LARGEFILE64_SOURCE=1 ./configure \ --prefix="${FINALPREFIX}" \ - --libdir="${FINALPREFIX}/lib/i386-unknown-linux-musl" \ + --libdir="${FINALPREFIX}/lib/${TARGET}" \ --disable-shared \ --enable-timeout=15 touch doc/agdoc.texi # build later diff --git a/steps/bash-5.2.15/pass1.sh b/steps/bash-5.2.15/pass1.sh index c7a9338e..c29db2ab 100755 --- a/steps/bash-5.2.15/pass1.sh +++ b/steps/bash-5.2.15/pass1.sh @@ -41,7 +41,7 @@ src_configure() { ./configure --prefix="${PREFIX}" \ --without-bash-malloc \ --disable-nls \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --enable-static-link \ bash_cv_dev_stdin=absent \ bash_cv_dev_fd=whacky diff --git a/steps/bc-1.08.1/pass1.sh b/steps/bc-1.08.1/pass1.sh index f3bb242d..111d1f07 100755 --- a/steps/bc-1.08.1/pass1.sh +++ b/steps/bc-1.08.1/pass1.sh @@ -20,7 +20,7 @@ src_prepare() { src_configure() { ./configure --prefix="${PREFIX}" \ - --build=i386-unknown-linux-musl + --build="${TARGET}" } src_compile() { diff --git a/steps/binutils-2.30/pass1.sh b/steps/binutils-2.30/pass1.sh index 96aaf635..ced7aa0d 100755 --- a/steps/binutils-2.30/pass1.sh +++ b/steps/binutils-2.30/pass1.sh @@ -121,9 +121,9 @@ src_configure() { --disable-nls \ --enable-deterministic-archives \ --enable-64-bit-bfd \ - --build=i386-unknown-linux-gnu \ - --host=i386-unknown-linux-gnu \ - --target=i386-unknown-linux-gnu \ + --build="${TARGET/-musl/-gnu}" \ + --host="${TARGET/-musl/-gnu}" \ + --target="${TARGET/-musl/-gnu}" \ --program-prefix="" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ @@ -150,6 +150,6 @@ src_install() { # Create triplet symlinks cd "${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 } diff --git a/steps/binutils-2.41/pass1.sh b/steps/binutils-2.41/pass1.sh index e8f77246..0d2f8bf2 100755 --- a/steps/binutils-2.41/pass1.sh +++ b/steps/binutils-2.41/pass1.sh @@ -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 diff --git a/steps/binutils-2.41/pass2.sh b/steps/binutils-2.41/pass2.sh index 1902ad6f..62433234 100755 --- a/steps/binutils-2.41/pass2.sh +++ b/steps/binutils-2.41/pass2.sh @@ -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 diff --git a/steps/coreutils-9.4/pass1.sh b/steps/coreutils-9.4/pass1.sh index dbd7d994..a3dd5e20 100755 --- a/steps/coreutils-9.4/pass1.sh +++ b/steps/coreutils-9.4/pass1.sh @@ -47,7 +47,7 @@ src_configure() { # Also, tell coreutils we don't have perl, which disables help2man FORCE_UNSAFE_CONFIGURE=1 ./configure CFLAGS="-static" \ --prefix="${PREFIX}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ gl_cv_func_getcwd_path_max="no, but it is partly working" \ gl_cv_prog_perl="no" } diff --git a/steps/curl-8.12.1/pass1.sh b/steps/curl-8.12.1/pass1.sh index e6f2942e..8cd7b825 100755 --- a/steps/curl-8.12.1/pass1.sh +++ b/steps/curl-8.12.1/pass1.sh @@ -31,7 +31,7 @@ src_configure() { LDFLAGS="-static" ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-gnu \ + --build="${TARGET}" \ --enable-ipv6 \ --without-ssl \ --without-libpsl \ diff --git a/steps/curl-8.12.1/pass2.sh b/steps/curl-8.12.1/pass2.sh index 22e30519..1a29092e 100755 --- a/steps/curl-8.12.1/pass2.sh +++ b/steps/curl-8.12.1/pass2.sh @@ -23,7 +23,7 @@ src_configure() { LDFLAGS="-static" ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --enable-ipv6 \ --with-openssl \ --without-libpsl \ diff --git a/steps/ed-1.4/pass1.sh b/steps/ed-1.4/pass1.sh index ba460713..c4f9df6d 100755 --- a/steps/ed-1.4/pass1.sh +++ b/steps/ed-1.4/pass1.sh @@ -8,7 +8,7 @@ src_prepare() { src_configure() { ./configure --prefix="${PREFIX}" \ - --build=i386-unknown-linux-musl + --build="${TARGET}" } src_install() { diff --git a/steps/findutils-4.2.33/pass1.sh b/steps/findutils-4.2.33/pass1.sh index b8dafe0a..a67dbd34 100755 --- a/steps/findutils-4.2.33/pass1.sh +++ b/steps/findutils-4.2.33/pass1.sh @@ -21,7 +21,7 @@ src_configure() { # Musl is not recognized, pretend to be uClibc # Must use --host for config.charset reproducibility CC=tcc ./configure --prefix="${PREFIX}" \ - --host=i386-unknown-linux-gnu \ + --host="${TARGET/-musl/-gnu}" \ CPPFLAGS="-D__UCLIBC__" } diff --git a/steps/gcc-10.5.0/pass1.sh b/steps/gcc-10.5.0/pass1.sh index f8596a12..95a20f73 100755 --- a/steps/gcc-10.5.0/pass1.sh +++ b/steps/gcc-10.5.0/pass1.sh @@ -177,9 +177,9 @@ src_configure() { ../configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --target=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --target="${TARGET}" \ + --host="${TARGET}" \ --disable-bootstrap \ --enable-static \ --program-transform-name= \ diff --git a/steps/gcc-13.3.0/pass1.sh b/steps/gcc-13.3.0/pass1.sh index 90e62903..e43890df 100755 --- a/steps/gcc-13.3.0/pass1.sh +++ b/steps/gcc-13.3.0/pass1.sh @@ -208,9 +208,9 @@ src_configure() { ../configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --target=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --target="${TARGET}" \ + --host="${TARGET}" \ --enable-bootstrap \ --enable-static \ --disable-plugins \ diff --git a/steps/gcc-4.0.4/pass1.sh b/steps/gcc-4.0.4/pass1.sh index ac9c2153..1d2ecbe3 100755 --- a/steps/gcc-4.0.4/pass1.sh +++ b/steps/gcc-4.0.4/pass1.sh @@ -82,9 +82,9 @@ src_configure() { CC=tcc CFLAGS="-D HAVE_ALLOCA_H" ../../$dir/configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --target=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --target="${TARGET}" \ + --host="${TARGET}" \ --disable-shared \ --program-transform-name= cd .. @@ -96,7 +96,7 @@ src_configure() { } src_compile() { - ln -s . build/build-i386-unknown-linux-musl + ln -s . "build/build-${TARGET}" mkdir build/gcc/include ln -s ../../../gcc/gsyslimits.h build/gcc/include/syslimits.h make -j1 -C build/gcc gengtype-yacc.c @@ -106,9 +106,9 @@ src_compile() { } src_install() { - mkdir -p "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/install-tools/include" + mkdir -p "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/install-tools/include" make -C build/gcc install STMP_FIXINC= DESTDIR="${DESTDIR}" - mkdir -p "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include" - rm "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include/syslimits.h" - cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include/syslimits.h" + mkdir -p "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include" + rm "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include/syslimits.h" + cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include/syslimits.h" } diff --git a/steps/gcc-4.0.4/pass2.sh b/steps/gcc-4.0.4/pass2.sh index 3e740ffc..03b07f62 100755 --- a/steps/gcc-4.0.4/pass2.sh +++ b/steps/gcc-4.0.4/pass2.sh @@ -83,9 +83,9 @@ src_configure() { ../../$dir/configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --target=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --target="${TARGET}" \ + --host="${TARGET}" \ --disable-shared \ --program-transform-name= cd .. @@ -94,14 +94,14 @@ src_configure() { } src_compile() { - ln -s . build/build-i386-unknown-linux-musl + ln -s . "build/build-${TARGET}" for dir in libiberty libcpp gcc; do make "${MAKEJOBS}" -C build/$dir LIBGCC2_INCLUDES=-I"${PREFIX}/include" STMP_FIXINC= done } src_install() { - mkdir -p "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/install-tools/include" + mkdir -p "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/install-tools/include" make -C build/gcc install STMP_FIXINC= DESTDIR="${DESTDIR}" - cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include/syslimits.h" + cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include/syslimits.h" } diff --git a/steps/gcc-4.7.4/pass1.sh b/steps/gcc-4.7.4/pass1.sh index 44664043..d817bf33 100755 --- a/steps/gcc-4.7.4/pass1.sh +++ b/steps/gcc-4.7.4/pass1.sh @@ -181,9 +181,9 @@ src_configure() { ../../$dir/configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --target=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --target="${TARGET}" \ + --host="${TARGET}" \ --disable-shared \ --program-transform-name= \ --enable-languages=c,c++ \ @@ -195,7 +195,7 @@ src_configure() { } src_compile() { - ln -s . build/build-i386-unknown-linux-musl + ln -s . "build/build-${TARGET}" for dir in libiberty libcpp libdecnumber gcc; do # We have makeinfo now but it is not happy with gcc .info files, so skip it make "${MAKEJOBS}" -C build/$dir LIBGCC2_INCLUDES=-I"${PREFIX}/include" \ @@ -215,11 +215,11 @@ src_install() { make -C build/libgcc install DESTDIR="${DESTDIR}" host_subdir=build make -C build/libstdc++-v3 install DESTDIR="${DESTDIR}" ln -s gcc "${DESTDIR}${PREFIX}/bin/cc" - cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.7.4/include/syslimits.h" + cp gcc/gsyslimits.h "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.7.4/include/syslimits.h" # Very strange mis-versoning error - mkdir -p "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.7.4/include/" - mv "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include/"* "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.7.4/include/" - rmdir "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/include" - mv "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.0.4/"* "${DESTDIR}${LIBDIR}/gcc/i386-unknown-linux-musl/4.7.4/" + mkdir -p "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.7.4/include/" + mv "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include/"* "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.7.4/include/" + rmdir "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/include" + mv "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.0.4/"* "${DESTDIR}${LIBDIR}/gcc/${TARGET}/4.7.4/" } diff --git a/steps/gmp-6.2.1/pass1.sh b/steps/gmp-6.2.1/pass1.sh index 885ce210..ffac16f8 100755 --- a/steps/gmp-6.2.1/pass1.sh +++ b/steps/gmp-6.2.1/pass1.sh @@ -23,7 +23,7 @@ src_configure() { ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --disable-shared } diff --git a/steps/guile-3.0.9/pass1.sh b/steps/guile-3.0.9/pass1.sh index 205af11a..d7a03b73 100755 --- a/steps/guile-3.0.9/pass1.sh +++ b/steps/guile-3.0.9/pass1.sh @@ -55,7 +55,7 @@ src_configure() { PKG_CONFIG_PATH="${LIBDIR}/pkgconfig" ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --disable-shared \ --disable-jit popd diff --git a/steps/improve/musl_libdir.sh b/steps/improve/musl_target.sh similarity index 65% rename from steps/improve/musl_libdir.sh rename to steps/improve/musl_target.sh index e80580ef..976e561c 100755 --- a/steps/improve/musl_libdir.sh +++ b/steps/improve/musl_target.sh @@ -5,5 +5,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later sed -i "/^LIBDIR/d" /steps/env -LIBDIR=${PREFIX}/lib/i386-unknown-linux-musl +TARGET=i386-unknown-linux-musl +LIBDIR=${PREFIX}/lib/${TARGET} echo "LIBDIR=${LIBDIR}" >> /steps/env +echo "TARGET=${TARGET}" >> /steps/env diff --git a/steps/libffi-3.3/pass1.sh b/steps/libffi-3.3/pass1.sh index 685e4827..400aa3f5 100755 --- a/steps/libffi-3.3/pass1.sh +++ b/steps/libffi-3.3/pass1.sh @@ -12,7 +12,7 @@ src_configure() { ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --disable-shared \ --with-gcc-arch=generic \ --enable-pax_emutramp diff --git a/steps/make-3.82/pass2.sh b/steps/make-3.82/pass2.sh index f40a836d..5545c672 100755 --- a/steps/make-3.82/pass2.sh +++ b/steps/make-3.82/pass2.sh @@ -16,7 +16,7 @@ src_prepare() { src_configure() { ./configure \ --prefix="${PREFIX}" \ - --build=i386-unknown-linux-gnu \ + --build="${TARGET/-musl/-gnu}" \ --disable-nls } diff --git a/steps/make-4.2.1/pass1.sh b/steps/make-4.2.1/pass1.sh index 0cbd0b0f..aacf6ee2 100755 --- a/steps/make-4.2.1/pass1.sh +++ b/steps/make-4.2.1/pass1.sh @@ -15,7 +15,7 @@ src_prepare() { src_configure() { ./configure \ --prefix="${PREFIX}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --disable-nls } diff --git a/steps/manifest b/steps/manifest index 79938e7d..828314c3 100644 --- a/steps/manifest +++ b/steps/manifest @@ -59,7 +59,7 @@ improve: populate_device_nodes define: CONSOLES = ( INTERACTIVE == True && CHROOT == False ) improve: open_console ( CONSOLES == True ) build: tcc-0.9.27 -improve: musl_libdir +improve: musl_target build: musl-1.1.24 build: tcc-0.9.27 build: musl-1.1.24 diff --git a/steps/musl-1.2.5/pass1.sh b/steps/musl-1.2.5/pass1.sh index d6de474a..1c6bd145 100755 --- a/steps/musl-1.2.5/pass1.sh +++ b/steps/musl-1.2.5/pass1.sh @@ -15,7 +15,7 @@ src_get() { src_configure() { CC=gcc ./configure \ - --host=i386-unknown-linux-musl \ + --host="${TARGET}" \ --disable-shared \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ diff --git a/steps/musl-1.2.5/pass3.sh b/steps/musl-1.2.5/pass3.sh index b3e42263..369f4bb5 100755 --- a/steps/musl-1.2.5/pass3.sh +++ b/steps/musl-1.2.5/pass3.sh @@ -6,7 +6,7 @@ src_configure() { ./configure \ - --host=i386-unknown-linux-musl \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --includedir="${PREFIX}/include/" diff --git a/steps/pkg-config-0.29.2/pass1.sh b/steps/pkg-config-0.29.2/pass1.sh index 30717c65..8dbee6ff 100755 --- a/steps/pkg-config-0.29.2/pass1.sh +++ b/steps/pkg-config-0.29.2/pass1.sh @@ -21,6 +21,6 @@ src_configure() { # pkg-config and other software (python/meson) that we do not have. ./configure \ --prefix="${PREFIX}" \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --with-internal-glib } diff --git a/steps/python-2.5.6/pass1.sh b/steps/python-2.5.6/pass1.sh index 4ab190bf..8d8ff55a 100755 --- a/steps/python-2.5.6/pass1.sh +++ b/steps/python-2.5.6/pass1.sh @@ -46,8 +46,8 @@ src_configure() { CFLAGS="-U__DATE__ -U__TIME__" \ LDFLAGS="-L${LIBDIR}" \ ./configure \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --with-system-ffi \ diff --git a/steps/python-3.1.5/pass1.sh b/steps/python-3.1.5/pass1.sh index ac67e453..a5136e22 100755 --- a/steps/python-3.1.5/pass1.sh +++ b/steps/python-3.1.5/pass1.sh @@ -41,8 +41,8 @@ src_configure() { ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --with-pydebug \ --with-system-ffi \ --enable-ipv6 diff --git a/steps/python-3.1.5/pass2.sh b/steps/python-3.1.5/pass2.sh index 3873176b..bf9b74e0 100755 --- a/steps/python-3.1.5/pass2.sh +++ b/steps/python-3.1.5/pass2.sh @@ -46,8 +46,8 @@ src_configure() { ./configure \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --with-pydebug \ --with-system-ffi \ --enable-ipv6 diff --git a/steps/python-3.11.1/pass1.sh b/steps/python-3.11.1/pass1.sh index 885d64d3..318deb5b 100755 --- a/steps/python-3.11.1/pass1.sh +++ b/steps/python-3.11.1/pass1.sh @@ -55,8 +55,8 @@ src_configure() { CPPFLAGS="-U__DATE__ -U__TIME__" \ PKG_CONFIG_PATH="${LIBDIR}/pkgconfig/" \ ./configure \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --with-system-ffi diff --git a/steps/python-3.3.7/pass1.sh b/steps/python-3.3.7/pass1.sh index b20b65cb..8c707e98 100755 --- a/steps/python-3.3.7/pass1.sh +++ b/steps/python-3.3.7/pass1.sh @@ -46,8 +46,8 @@ src_configure() { CFLAGS="-U__DATE__ -U__TIME__" \ LDFLAGS="-L${LIBDIR}" \ ./configure \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --with-system-ffi diff --git a/steps/python-3.4.10/pass1.sh b/steps/python-3.4.10/pass1.sh index 5b6050f0..68670398 100755 --- a/steps/python-3.4.10/pass1.sh +++ b/steps/python-3.4.10/pass1.sh @@ -49,8 +49,8 @@ src_configure() { CFLAGS="-U__DATE__ -U__TIME__" \ LDFLAGS="-L${LIBDIR}" \ ./configure \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --with-system-ffi diff --git a/steps/python-3.8.16/pass1.sh b/steps/python-3.8.16/pass1.sh index de197707..a7b9d130 100755 --- a/steps/python-3.8.16/pass1.sh +++ b/steps/python-3.8.16/pass1.sh @@ -44,8 +44,8 @@ src_configure() { LDFLAGS="-L${LIBDIR}" \ PYTHON_FOR_BUILD="python -B" \ ./configure \ - --build=i386-unknown-linux-musl \ - --host=i386-unknown-linux-musl \ + --build="${TARGET}" \ + --host="${TARGET}" \ --prefix="${PREFIX}" \ --libdir="${LIBDIR}" \ --with-system-ffi diff --git a/steps/util-linux-2.19.1/pass1.sh b/steps/util-linux-2.19.1/pass1.sh index 47941582..7943327a 100755 --- a/steps/util-linux-2.19.1/pass1.sh +++ b/steps/util-linux-2.19.1/pass1.sh @@ -24,7 +24,7 @@ src_configure() { --bindir="${PREFIX}/bin" \ --sbindir="${PREFIX}/bin" \ --libdir="${LIBDIR}" \ - --build=i386-unknown-linux-gnu \ + --build="${TARGET/-musl/-gnu}" \ --disable-cramfs \ --without-ncurses \ --enable-static \ @@ -38,6 +38,6 @@ src_install() { default # A weird behaviour I can't find the source of - mv "${DESTDIR}${PREFIX}/i386-unknown-linux-musl/"* "${DESTDIR}${LIBDIR}/" - rmdir "${DESTDIR}${PREFIX}/i386-unknown-linux-musl/" + mv "${DESTDIR}${PREFIX}/${TARGET}/"* "${DESTDIR}${LIBDIR}/" + rmdir "${DESTDIR}${PREFIX}/${TARGET}/" } diff --git a/steps/xz-5.6.4/pass1.sh b/steps/xz-5.6.4/pass1.sh index 57ee4f56..df045e07 100755 --- a/steps/xz-5.6.4/pass1.sh +++ b/steps/xz-5.6.4/pass1.sh @@ -53,6 +53,6 @@ src_configure() { --prefix="${PREFIX}" \ --disable-shared \ --disable-nls \ - --build=i386-unknown-linux-musl \ + --build="${TARGET}" \ --libdir="${LIBDIR}" }