n64-toolkit updates and maintenance

This commit is contained in:
Connor Olding 2021-09-14 17:17:10 -07:00
parent a8b3c70dbf
commit 9762ced5ee
6 changed files with 117 additions and 78 deletions

View File

@ -19,7 +19,7 @@ patches tbox to compile/run with MSYS2.
builds a cross-compiler for N64 homebrew. builds a cross-compiler for N64 homebrew.
works on both Arch and MSYS2. works on both Arch and MSYS2.
installs to `/opt/mips64-elf-ultra64`, so add that to your PATH as needed. installs to `/opt/mips-ultra64-elf`, so add that to your PATH as needed.
### xml2 ### xml2

View File

@ -1,23 +1,27 @@
_target=mips64 _target=mips
_tuple=$_target-elf-ultra64 _triplet="$_target-ultra64-elf"
_prefix=/opt/$_tuple _prefix="/opt/$_triplet"
pkgname=$_tuple-binutils _sysroot="$_prefix/sysroot"
pkgver=2.31.1
pkgname="$_triplet-binutils"
pkgver=2.37
pkgrel=1 pkgrel=1
_binutils="binutils-$pkgver" _binutils="binutils-$pkgver"
pkgdesc="A set of programs to assemble and manipulate binary and object files ($_target)" pkgdesc="A set of programs to assemble and manipulate binary and object files ($_triplet)"
arch=('any') arch=('any')
license=('GPL') license=('GPL')
url='http://www.gnu.org/software/binutils/' url='http://www.gnu.org/software/binutils/'
depends=('zlib') depends=('zlib')
source=("ftp://gcc.gnu.org/pub/binutils/releases/$_binutils.tar.bz2") source=("ftp://gcc.gnu.org/pub/binutils/releases/$_binutils.tar.bz2")
md5sums=('84edf97113788f106d6ee027f10b046a') sha256sums=('67fc1a4030d08ee877a4867d3dcab35828148f87e1fd05da6db585ed5a166bd4')
options=('!emptydirs' '!strip') options=('!emptydirs' '!strip')
prepare() { prepare() {
cd "$srcdir/$_binutils" cd "$srcdir/$_binutils"
# Hack - see native package for details # Hack - see native package for details
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
# annoying oversight:
sed -i 's/\<uint\>/unsigned int/g' libiberty/rust-demangle.c
} }
build() { build() {
@ -28,8 +32,7 @@ build() {
export CPPFLAGS="" export CPPFLAGS=""
export LDFLAGS="" export LDFLAGS=""
export CFLAGS_FOR_TARGET="-O2 -G0 \ export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
cd "$srcdir" cd "$srcdir"
@ -41,13 +44,25 @@ build() {
_build="--build=$MINGW_CHOST --host=$MINGW_CHOST" _build="--build=$MINGW_CHOST --host=$MINGW_CHOST"
fi fi
"../$_binutils/configure" $_build --target=$_target --prefix="$_prefix" \ "../$_binutils/configure" $_build \
--enable-static \ --target=$_target \
--prefix="$_prefix" \
\
--disable-gold \ --disable-gold \
--disable-libquadmath \
--disable-libquadmath-support \
--disable-multilib \ --disable-multilib \
--disable-nls \ --disable-nls \
--disable-shared \ --disable-shared \
--disable-werror \ --disable-werror \
--enable-deterministic-archives \
--enable-lto \
--enable-static \
--with-gcc \
--with-gnu-as \
--with-gnu-ld \
--with-sysroot="$_sysroot" \
--without-included-gettext \
make all make all
} }

View File

@ -1,30 +1,32 @@
_target=mips64 _target=mips
_tuple=$_target-elf-ultra64 _triplet="$_target-ultra64-elf"
_prefix=/opt/$_tuple _prefix="/opt/$_triplet"
pkgname=$_tuple-bootstrap _sysroot="$_prefix/sysroot"
pkgver=8.2.0
pkgname="$_triplet-bootstrap"
pkgver=11.2.0
pkgrel=1 pkgrel=1
_gcc=gcc-$pkgver _gcc="gcc-$pkgver"
_mpfr=mpfr-4.0.1 _mpfr=mpfr-4.1.0
_gmp=gmp-6.1.2 _gmp=gmp-6.2.1
_mpc=mpc-1.1.0 _mpc=mpc-1.2.1
_isl=isl-0.18 _isl=isl-0.18
pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building ($_target)" pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building ($_triplet)"
arch=('any') arch=('any')
license=('GPL' 'LGPL' 'FDL') license=('GPL' 'LGPL' 'FDL')
url='http://www.gnu.org/software/gcc/' url='http://www.gnu.org/software/gcc/'
depends=('zlib' "$_tuple-binutils") depends=('zlib' "$_triplet-binutils")
makedepends=('gmp' 'mpfr') makedepends=('gmp' 'mpfr')
source=("ftp://gcc.gnu.org/pub/gcc/releases/$_gcc/$_gcc.tar.gz" source=("ftp://gcc.gnu.org/pub/gcc/releases/$_gcc/$_gcc.tar.gz"
"ftp://ftp.gnu.org/gnu/mpfr/$_mpfr.tar.bz2" "ftp://ftp.gnu.org/gnu/mpfr/$_mpfr.tar.bz2"
"ftp://ftp.gnu.org/gnu/gmp/$_gmp.tar.bz2" "ftp://ftp.gnu.org/gnu/gmp/$_gmp.tar.bz2"
"ftp://ftp.gnu.org/gnu/mpc/$_mpc.tar.gz" "ftp://ftp.gnu.org/gnu/mpc/$_mpc.tar.gz"
"ftp://gcc.gnu.org/pub/gcc/infrastructure/$_isl.tar.bz2") "ftp://gcc.gnu.org/pub/gcc/infrastructure/$_isl.tar.bz2")
md5sums=('ee04f0c22a941f5f17d93809387f2729' sha256sums=('f0837f1bf8244a5cc23bd96ff6366712a791cfae01df8e25b137698aca26efc1'
'8c21d8ac7460493b2b9f3ef3cc610454' 'feced2d430dd5a97805fa289fed3fc8ff2b094c02d05287fd6133e7f1f0ec926'
'8ddbb26dc3bd4e2302984debba1406a5' 'eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c'
'4125404e41e482ec68282a2e687f6c73' '17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459'
'11436d6b205e516635b666090b94ab32') '6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b')
options=('!emptydirs' '!strip') options=('!emptydirs' '!strip')
prepare() { prepare() {
@ -50,8 +52,7 @@ build() {
export CPPFLAGS="" export CPPFLAGS=""
export LDFLAGS="" export LDFLAGS=""
export CFLAGS_FOR_TARGET="-O2 -G0 \ export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
cd "$srcdir" cd "$srcdir"
@ -63,7 +64,11 @@ build() {
_build="--build=$MINGW_CHOST --host=$MINGW_CHOST" _build="--build=$MINGW_CHOST --host=$MINGW_CHOST"
fi fi
"../$_gcc/configure" $_build --target=$_target --prefix="$_prefix" \ "../$_gcc/configure" $_build \
--target=$_target \
--prefix="$_prefix" \
--with-sysroot="$_sysroot" \
\
--disable-__cxa_atexit \ --disable-__cxa_atexit \
--disable-decimal-float \ --disable-decimal-float \
--disable-gold \ --disable-gold \
@ -88,10 +93,13 @@ build() {
--disable-tls \ --disable-tls \
--disable-werror \ --disable-werror \
--enable-languages=c,c++,lto \ --enable-languages=c,c++,lto \
--enable-lto \
--enable-static \ --enable-static \
--enable-target-optspace \ --enable-target-optspace \
--with-abi=32 \ --with-abi=32 \
--with-arch=vr4300 \ --with-arch=vr4300 \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \ --with-newlib \
--with-tune=vr4300 \ --with-tune=vr4300 \
--without-headers \ --without-headers \

View File

@ -1,33 +1,35 @@
_target=mips64 _target=mips
_tuple=$_target-elf-ultra64 _triplet="$_target-ultra64-elf"
_prefix=/opt/$_tuple _prefix="/opt/$_triplet"
pkgname=$_tuple-gcc _sysroot="$_prefix/sysroot"
pkgver=8.2.0
pkgname="$_triplet-gcc"
pkgver=11.2.0
pkgrel=1 pkgrel=1
_gcc=gcc-$pkgver _gcc="gcc-$pkgver"
_mpfr=mpfr-4.0.1 _mpfr=mpfr-4.1.0
_gmp=gmp-6.1.2 _gmp=gmp-6.2.1
_mpc=mpc-1.1.0 _mpc=mpc-1.2.1
_isl=isl-0.18 _isl=isl-0.18
pkgdesc="The GNU Compiler Collection ($_target)" pkgdesc="The GNU Compiler Collection ($_triplet)"
arch=('any') arch=('any')
license=('GPL' 'LGPL' 'FDL') license=('GPL' 'LGPL' 'FDL')
url='http://www.gnu.org/software/gcc/' url='http://www.gnu.org/software/gcc/'
depends=('zlib' "$_tuple-binutils" "$_tuple-newlib") depends=('zlib' "$_triplet-binutils" "$_triplet-newlib")
makedepends=('gmp' 'mpfr') makedepends=('gmp' 'mpfr')
conflicts=("$_tuple-bootstrap") conflicts=("$_triplet-bootstrap")
provides=("$_tuple-bootstrap") provides=("$_triplet-bootstrap")
replaces=("$_tuple-bootstrap") replaces=("$_triplet-bootstrap")
source=("ftp://gcc.gnu.org/pub/gcc/releases/$_gcc/$_gcc.tar.gz" source=("ftp://gcc.gnu.org/pub/gcc/releases/$_gcc/$_gcc.tar.gz"
"ftp://ftp.gnu.org/gnu/mpfr/$_mpfr.tar.bz2" "ftp://ftp.gnu.org/gnu/mpfr/$_mpfr.tar.bz2"
"ftp://ftp.gnu.org/gnu/gmp/$_gmp.tar.bz2" "ftp://ftp.gnu.org/gnu/gmp/$_gmp.tar.bz2"
"ftp://ftp.gnu.org/gnu/mpc/$_mpc.tar.gz" "ftp://ftp.gnu.org/gnu/mpc/$_mpc.tar.gz"
"ftp://gcc.gnu.org/pub/gcc/infrastructure/$_isl.tar.bz2") "ftp://gcc.gnu.org/pub/gcc/infrastructure/$_isl.tar.bz2")
md5sums=('ee04f0c22a941f5f17d93809387f2729' sha256sums=('f0837f1bf8244a5cc23bd96ff6366712a791cfae01df8e25b137698aca26efc1'
'8c21d8ac7460493b2b9f3ef3cc610454' 'feced2d430dd5a97805fa289fed3fc8ff2b094c02d05287fd6133e7f1f0ec926'
'8ddbb26dc3bd4e2302984debba1406a5' 'eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c'
'4125404e41e482ec68282a2e687f6c73' '17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459'
'11436d6b205e516635b666090b94ab32') '6b8b0fd7f81d0a957beb3679c81bbb34ccc7568d5682844d8924424a0dadcb1b')
options=('!emptydirs' '!strip') options=('!emptydirs' '!strip')
prepare() { prepare() {
@ -53,8 +55,7 @@ build() {
export CPPFLAGS="" export CPPFLAGS=""
export LDFLAGS="" export LDFLAGS=""
export CFLAGS_FOR_TARGET="-O2 -G0 \ export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
cd "$srcdir" cd "$srcdir"
@ -66,7 +67,11 @@ build() {
_build="--build=$MINGW_CHOST --host=$MINGW_CHOST" _build="--build=$MINGW_CHOST --host=$MINGW_CHOST"
fi fi
"../$_gcc/configure" $_build --target=$_target --prefix="$_prefix" \ "../$_gcc/configure" $_build \
--target=$_target \
--prefix="$_prefix" \
--with-sysroot="$_sysroot" \
\
--disable-__cxa_atexit \ --disable-__cxa_atexit \
--disable-decimal-float \ --disable-decimal-float \
--disable-gold \ --disable-gold \
@ -91,10 +96,13 @@ build() {
--disable-tls \ --disable-tls \
--disable-werror \ --disable-werror \
--enable-languages=c,c++,lto \ --enable-languages=c,c++,lto \
--enable-lto \
--enable-static \ --enable-static \
--enable-target-optspace \ --enable-target-optspace \
--with-abi=32 \ --with-abi=32 \
--with-arch=vr4300 \ --with-arch=vr4300 \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \ --with-newlib \
--with-tune=vr4300 \ --with-tune=vr4300 \
--without-headers \ --without-headers \

View File

@ -1,17 +1,19 @@
_target=mips64 _target=mips
_tuple=$_target-elf-ultra64 _triplet="$_target-ultra64-elf"
_prefix=/opt/$_tuple _prefix="/opt/$_triplet"
pkgname=$_tuple-newlib _sysroot="$_prefix/sysroot"
pkgver=3.1.0.20181231
pkgname="$_triplet-newlib"
pkgver=4.1.0
pkgrel=1 pkgrel=1
_newlib="newlib-$pkgver" _newlib="newlib-$pkgver"
pkgdesc="A C library intended for use on embedded systems ($_target)" pkgdesc="A C library intended for use on embedded systems ($_triplet)"
arch=('any') arch=('any')
license=('BSD') license=('BSD')
url='http://sourceware.org/newlib/' url='http://sourceware.org/newlib/'
makedepends=("$_tuple-bootstrap") makedepends=("$_triplet-bootstrap")
source=("ftp://sourceware.org/pub/newlib/$_newlib.tar.gz") source=("ftp://sourceware.org/pub/newlib/$_newlib.tar.gz")
md5sums=('d25fd33b39147d79741faece37dd33a8') sha256sums=('f296e372f51324224d387cc116dc37a6bd397198756746f93a2b02e9a5d40154')
options=('!emptydirs' '!strip') options=('!emptydirs' '!strip')
build() { build() {
@ -24,8 +26,7 @@ build() {
export CPPFLAGS="" export CPPFLAGS=""
export LDFLAGS="" export LDFLAGS=""
export CFLAGS_FOR_TARGET="-O2 -G0 \ export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
cd "$srcdir" cd "$srcdir"
@ -37,20 +38,25 @@ build() {
_build="--build=$MINGW_CHOST --host=$MINGW_CHOST" _build="--build=$MINGW_CHOST --host=$MINGW_CHOST"
fi fi
"../$_newlib/configure" $_build --target=$_target --prefix="$_prefix" \ "../$_newlib/configure" $_build \
--with-newlib \ --target=$_target \
--enable-lto \ --prefix="$_prefix" \
--enable-target-optspace \ \
--enable-lite-exit \ --disable-libssp \
--enable-newlib-global-atexit \
--enable-newlib-nano-malloc \
--disable-shared \
--disable-threads \
--disable-newlib-atexit-dynamic-alloc \ --disable-newlib-atexit-dynamic-alloc \
--disable-newlib-fvwrite-in-streamio \ --disable-newlib-fvwrite-in-streamio \
--disable-newlib-wide-orient \
--disable-newlib-unbuf-stream-opt \
--disable-newlib-supplied-syscalls \ --disable-newlib-supplied-syscalls \
--disable-newlib-unbuf-stream-opt \
--disable-newlib-wide-orient \
--disable-nls \
--disable-shared \
--disable-threads \
--enable-lite-exit \
--enable-lto \
--enable-newlib-global-atexit \
--enable-newlib-nano-malloc \
--enable-target-optspace \
--with-newlib \
#--enable-newlib-nano-formatted-io #--enable-newlib-nano-formatted-io
make make

View File

@ -13,10 +13,12 @@ maybe_sudo() {
set -e set -e
maybe_sudo -u "$USER" makepkg -fp PKGBUILD.binutils maybe_sudo -u "$USER" makepkg -fp PKGBUILD.binutils
maybe_sudo pacman -U *.xz(om[1]) maybe_sudo pacman -U --noconfirm *.zst(om[1])
maybe_sudo -u "$USER" makepkg -fp PKGBUILD.bootstrap maybe_sudo -u "$USER" makepkg -fp PKGBUILD.bootstrap
maybe_sudo pacman -U *.xz(om[1]) maybe_sudo pacman -U --noconfirm *.zst(om[1])
# due to issues with a symlink, we must attempt to extract newlib twice.
maybe_sudo -u "$USER" makepkg -op PKGBUILD.newlib || true
maybe_sudo -u "$USER" makepkg -fp PKGBUILD.newlib maybe_sudo -u "$USER" makepkg -fp PKGBUILD.newlib
maybe_sudo pacman -U *.xz(om[1]) maybe_sudo pacman -U --noconfirm *.zst(om[1])
maybe_sudo -u "$USER" makepkg -efp PKGBUILD.gcc maybe_sudo -u "$USER" makepkg -efp PKGBUILD.gcc
maybe_sudo pacman -U *.xz(om[1]) maybe_sudo pacman -U --noconfirm *.zst(om[1])