From 4c497228a97aa908f62bee9bc06c07b1ed4ad838 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 11 Mar 2021 21:58:18 +0100 Subject: [PATCH] Ports: Use SERENITY_ARCH in --target/--host Recent ports already do this, let's update the others as well. One step closer to multi-arch support for ports! :^) --- Ports/.port_include.sh | 2 +- Ports/binutils/package.sh | 2 +- Ports/gcc/package.sh | 4 ++-- Ports/git/package.sh | 2 +- Ports/jq/patches/diff.patch | 2 +- Ports/make/package.sh | 2 +- Ports/nano/package.sh | 2 +- Ports/rsync/package.sh | 2 +- Ports/tinycc/package.sh | 6 +++++- 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 863287a806..220c506a89 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -155,7 +155,7 @@ func_defined pre_configure || pre_configure() { } func_defined configure || configure() { chmod +x "${workdir}"/"$configscript" - run ./"$configscript" --host=i686-pc-serenity $configopts + run ./"$configscript" --host="${SERENITY_ARCH}-pc-serenity" $configopts } func_defined post_configure || post_configure() { : diff --git a/Ports/binutils/package.sh b/Ports/binutils/package.sh index 6ee42cced5..f9b30282dc 100755 --- a/Ports/binutils/package.sh +++ b/Ports/binutils/package.sh @@ -2,7 +2,7 @@ port=binutils version=2.32 useconfigure=true -configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --disable-werror --disable-gdb --disable-nls" +configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --disable-werror --disable-gdb --disable-nls" files="https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz.sig binutils-${version}.tar.xz.sig https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh index e48fb09d37..ded7dfda6c 100755 --- a/Ports/gcc/package.sh +++ b/Ports/gcc/package.sh @@ -2,7 +2,7 @@ port=gcc version=10.2.0 useconfigure=true -configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls --enable-shared --enable-default-pie --enable-host-shared" +configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --with-build-sysroot=${SERENITY_BUILD_DIR}/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls --enable-shared --enable-default-pie --enable-host-shared" files="https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz.sig gcc-${version}.tar.xz.sig https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" @@ -18,7 +18,7 @@ post_fetch() { build() { run make $makeopts - run find ./host-i686-pc-serenity/gcc/ -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo + run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo } install() { diff --git a/Ports/git/package.sh b/Ports/git/package.sh index 04b6c48973..55f7a25acc 100755 --- a/Ports/git/package.sh +++ b/Ports/git/package.sh @@ -3,7 +3,7 @@ port=git version=2.26.0 useconfigure="true" files="https://mirrors.edge.kernel.org/pub/software/scm/git/git-${version}.tar.xz git-${version}.tar.xz" -configopts="--target=i686-pc-serenity CFLAGS=-DNO_IPV6" +configopts="--target=${SERENITY_ARCH}-pc-serenity CFLAGS=-DNO_IPV6" depends="zlib" build() { diff --git a/Ports/jq/patches/diff.patch b/Ports/jq/patches/diff.patch index 69b51e83f9..a942c1db0d 100644 --- a/Ports/jq/patches/diff.patch +++ b/Ports/jq/patches/diff.patch @@ -16,7 +16,7 @@ index 7ffe373..3c8aae4 100755 basic_machine=we32k-att ;; + *serenity*) -+ basic_machine=i686-pc ++ basic_machine="${SERENITY_ARCH}-pc" + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) diff --git a/Ports/make/package.sh b/Ports/make/package.sh index 2c21e38306..f033162890 100755 --- a/Ports/make/package.sh +++ b/Ports/make/package.sh @@ -7,4 +7,4 @@ http://ftp.gnu.org/gnu/make/make-${version}.tar.gz.sig make-${version}.tar.gz.si https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" auth_type="sig" auth_opts="--keyring ./gnu-keyring.gpg make-${version}.tar.gz.sig" -configopts="--target=i686-pc-serenity --with-sysroot=/ --without-guile" +configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/ --without-guile" diff --git a/Ports/nano/package.sh b/Ports/nano/package.sh index aa54baf357..c7782ccdc9 100755 --- a/Ports/nano/package.sh +++ b/Ports/nano/package.sh @@ -4,7 +4,7 @@ version=4.5 useconfigure="true" files="https://www.nano-editor.org/dist/v4/nano-${version}.tar.xz nano-${version}.tar.xz https://www.nano-editor.org/dist/v4/nano-${version}.tar.xz.asc nano-${version}.tar.xz.asc" -configopts="--target=i686-pc-serenity --disable-browser --disable-utf8" +configopts="--target=${SERENITY_ARCH}-pc-serenity --disable-browser --disable-utf8" depends="ncurses" auth_type="sig" auth_import_key="BFD009061E535052AD0DF2150D28D4D2A0ACE884" diff --git a/Ports/rsync/package.sh b/Ports/rsync/package.sh index 942de7f775..32bd6cc202 100755 --- a/Ports/rsync/package.sh +++ b/Ports/rsync/package.sh @@ -4,4 +4,4 @@ version=3.1.3 useconfigure="true" files="https://download.samba.org/pub/rsync/src/rsync-${version}.tar.gz rsync-${version}.tar.gz https://download.samba.org/pub/rsync/src/rsync-${version}.tar.gz.asc rsync-${version}.tar.gz.asc" -configopts="--target=i686-pc-serenity" +configopts="--target=${SERENITY_ARCH}-pc-serenity" diff --git a/Ports/tinycc/package.sh b/Ports/tinycc/package.sh index ee9edb8460..dfccfada5d 100755 --- a/Ports/tinycc/package.sh +++ b/Ports/tinycc/package.sh @@ -6,7 +6,11 @@ useconfigure=true makeopts=tcc configure() { - run ./configure --cross-prefix=i686-pc-serenity- --cpu=i686 --triplet=i686-pc-serenity --crtprefix=/usr/lib + run ./configure \ + --cross-prefix="${SERENITY_ARCH}-pc-serenity-" \ + --cpu="${SERENITY_ARCH}" \ + --triplet="${SERENITY_ARCH}-pc-serenity" \ + --crtprefix=/usr/lib } export CONFIG_ldl=no