From 738a95bcb884d0d006ede8689c5b4a88f172d4cd Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 25 Mar 2018 05:45:52 +0200 Subject: [PATCH] update n64-toolkit names --- README.md | 5 ++--- n64-toolkit/PKGBUILD.binutils | 13 +++++++------ n64-toolkit/PKGBUILD.bootstrap | 22 +++++++++++----------- n64-toolkit/PKGBUILD.gcc | 26 ++++++++++++++------------ n64-toolkit/PKGBUILD.newlib | 13 +++++++------ 5 files changed, 41 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index b171ab0..9a8118b 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,10 @@ patches tbox to compile/run with MSYS2. ### n64-toolkit -compiles a cross-compiler for N64 homebrew. +builds a cross-compiler for N64 homebrew. works on both Arch and MSYS2. -i need to rename this package at some point. -currently, it doesn't follow any guidelines. +installs to `/opt/mips64-elf-ultra64`, so add that to your PATH as needed. ### xml2 diff --git a/n64-toolkit/PKGBUILD.binutils b/n64-toolkit/PKGBUILD.binutils index 9f24be7..117a1ea 100644 --- a/n64-toolkit/PKGBUILD.binutils +++ b/n64-toolkit/PKGBUILD.binutils @@ -1,13 +1,14 @@ _target=mips64 -_prefix="/opt/n64-toolchain-slim" -pkgname=n64-toolkit-binutils +_tuple=$_target-elf-ultra64 +_prefix=/opt/$_tuple +pkgname=$_tuple-binutils pkgver=2.30 pkgrel=1 _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 ($_target)" arch=('any') license=('GPL') -url="http://www.gnu.org/software/binutils/" +url='http://www.gnu.org/software/binutils/' depends=('zlib') source=("ftp://gcc.gnu.org/pub/binutils/releases/$_binutils.tar.bz2") md5sums=('cc47a2f256b4a593206b4d7e62a60b32') @@ -27,7 +28,7 @@ build() { export CPPFLAGS="" export LDFLAGS="" - export CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections \ + export CFLAGS_FOR_TARGET="-O2 -G0 -ffunction-sections -fdata-sections \ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" @@ -40,7 +41,7 @@ build() { _build="--build=$MINGW_CHOST --host=$MINGW_CHOST" fi - "../$_binutils/configure" $_build --target=${_target} --prefix="$_prefix" \ + "../$_binutils/configure" $_build --target=$_target --prefix="$_prefix" \ --enable-static \ --disable-gold \ --disable-multilib \ diff --git a/n64-toolkit/PKGBUILD.bootstrap b/n64-toolkit/PKGBUILD.bootstrap index d0832e7..911f814 100644 --- a/n64-toolkit/PKGBUILD.bootstrap +++ b/n64-toolkit/PKGBUILD.bootstrap @@ -1,20 +1,20 @@ _target=mips64 -_prefix="/opt/n64-toolchain-slim" +_tuple=$_target-elf-ultra64 +_prefix=/opt/$_tuple +pkgname=$_tuple-bootstrap +pkgver=7.3.0 +pkgrel=1 +_gcc=gcc-$pkgver _mpfr=mpfr-4.0.1 _gmp=gmp-6.1.2 _mpc=mpc-1.1.0 _isl=isl-0.18 -pkgname=n64-toolkit-bootstrap -pkgver=7.3.0 -pkgrel=1 -_gcc="gcc-$pkgver" -pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building (${_target})" +pkgdesc="The GNU Compiler Collection. Stage 1 for toolchain building ($_target)" arch=('any') license=('GPL' 'LGPL' 'FDL') url='http://www.gnu.org/software/gcc/' -depends=('zlib' 'n64-toolkit-binutils') # 'libmpc' +depends=('zlib' "$_tuple-binutils") makedepends=('gmp' 'mpfr') -provides=('n64-toolkit-gcc') 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/gmp/$_gmp.tar.bz2" @@ -50,7 +50,7 @@ build() { export CPPFLAGS="" export LDFLAGS="" - export CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections \ + export CFLAGS_FOR_TARGET="-O2 -G0 -ffunction-sections -fdata-sections \ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" @@ -63,7 +63,7 @@ build() { _build="--build=$MINGW_CHOST --host=$MINGW_CHOST" fi - "../$_gcc/configure" $_build --target=${_target} --prefix="$_prefix" \ + "../$_gcc/configure" $_build --target=$_target --prefix="$_prefix" \ --disable-__cxa_atexit \ --disable-decimal-float \ --disable-gold \ @@ -94,8 +94,8 @@ build() { --with-arch=vr4300 \ --with-newlib \ --with-tune=vr4300 \ - --without-included-gettext \ --without-headers \ + --without-included-gettext \ make all-gcc } diff --git a/n64-toolkit/PKGBUILD.gcc b/n64-toolkit/PKGBUILD.gcc index 8a1776d..5d3fe2d 100644 --- a/n64-toolkit/PKGBUILD.gcc +++ b/n64-toolkit/PKGBUILD.gcc @@ -1,22 +1,23 @@ _target=mips64 -_prefix="/opt/n64-toolchain-slim" +_tuple=$_target-elf-ultra64 +_prefix=/opt/$_tuple +pkgname=$_tuple-gcc +pkgver=7.3.0 +pkgrel=1 +_gcc=gcc-$pkgver _mpfr=mpfr-4.0.1 _gmp=gmp-6.1.2 _mpc=mpc-1.1.0 _isl=isl-0.18 -pkgname=n64-toolkit-gcc -pkgver=7.3.0 -pkgrel=1 -_gcc="gcc-$pkgver" -pkgdesc="The GNU Compiler Collection (${_target})" +pkgdesc="The GNU Compiler Collection ($_target)" arch=('any') license=('GPL' 'LGPL' 'FDL') url='http://www.gnu.org/software/gcc/' -depends=('zlib' "n64-toolkit-binutils" "n64-toolkit-newlib") # 'libmpc' +depends=('zlib' "$_tuple-binutils" "$_tuple-newlib") makedepends=('gmp' 'mpfr') -conflicts=('n64-toolkit-bootstrap') -provides=('n64-toolkit-bootstrap') -replaces=('n64-toolkit-bootstrap') +conflicts=("$_tuple-bootstrap") +provides=("$_tuple-bootstrap") +replaces=("$_tuple-bootstrap") 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/gmp/$_gmp.tar.bz2" @@ -52,7 +53,7 @@ build() { export CPPFLAGS="" export LDFLAGS="" - export CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections \ + export CFLAGS_FOR_TARGET="-O2 -G0 -ffunction-sections -fdata-sections \ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" @@ -65,7 +66,7 @@ build() { _build="--build=$MINGW_CHOST --host=$MINGW_CHOST" fi - "../$_gcc/configure" $_build --target=${_target} --prefix="$_prefix" \ + "../$_gcc/configure" $_build --target=$_target --prefix="$_prefix" \ --disable-__cxa_atexit \ --disable-decimal-float \ --disable-gold \ @@ -96,6 +97,7 @@ build() { --with-arch=vr4300 \ --with-newlib \ --with-tune=vr4300 \ + --without-headers \ --without-included-gettext \ make all diff --git a/n64-toolkit/PKGBUILD.newlib b/n64-toolkit/PKGBUILD.newlib index e4f081d..f5e5a80 100644 --- a/n64-toolkit/PKGBUILD.newlib +++ b/n64-toolkit/PKGBUILD.newlib @@ -1,14 +1,15 @@ _target=mips64 -_prefix="/opt/n64-toolchain-slim" -pkgname=n64-toolkit-newlib +_tuple=$_target-elf-ultra64 +_prefix=/opt/$_tuple +pkgname=$_tuple-newlib pkgver=2.5.0.20171222 pkgrel=1 _newlib="newlib-$pkgver" -pkgdesc="A C library intended for use on embedded systems (${_target})" +pkgdesc="A C library intended for use on embedded systems ($_target)" arch=('any') license=('BSD') url='http://sourceware.org/newlib/' -makedepends=('n64-toolkit-bootstrap') +makedepends=("$_tuple-bootstrap") source=("ftp://sourceware.org/pub/newlib/$_newlib.tar.gz") md5sums=('98215f83a542fdde946c11661a34ab3f') options=('!emptydirs' '!strip') @@ -23,7 +24,7 @@ build() { export CPPFLAGS="" export LDFLAGS="" - export CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections \ + export CFLAGS_FOR_TARGET="-O2 -G0 -ffunction-sections -fdata-sections \ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables" export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti" @@ -36,7 +37,7 @@ build() { _build="--build=$MINGW_CHOST --host=$MINGW_CHOST" fi - "../$_newlib/configure" $_build --target=${_target} --prefix="$_prefix" \ + "../$_newlib/configure" $_build --target=$_target --prefix="$_prefix" \ --with-newlib \ --enable-lto \ --enable-target-optspace \