more work on n64-toolkit

This commit is contained in:
Connor Olding 2021-09-14 22:49:36 -07:00
parent 9cdcc3fb52
commit e86e5f2e03
4 changed files with 28 additions and 24 deletions

View File

@ -5,7 +5,7 @@ _sysroot="$_prefix/sysroot"
pkgname="$_triplet-binutils"
pkgver=2.37
pkgrel=1
pkgrel=2
_binutils="binutils-$pkgver"
pkgdesc="A set of programs to assemble and manipulate binary and object files ($_triplet)"
arch=('any')
@ -74,5 +74,7 @@ package() {
make DESTDIR="$pkgdir" install -j1
# strip host binaries
find "$PREFIX/bin" -type f -and \( -executable \) -exec strip '{}' \;
find "$PREFIX" -type f -and \( -executable \) -exec strip '{}' \;
rm -r "$PREFIX/share"
}

View File

@ -5,7 +5,7 @@ _sysroot="$_prefix/sysroot"
pkgname="$_triplet-bootstrap"
pkgver=11.2.0
pkgrel=1
pkgrel=2
_gcc="gcc-$pkgver"
_mpfr=mpfr-4.1.0
_gmp=gmp-6.2.1
@ -52,8 +52,8 @@ build() {
export CPPFLAGS=""
export LDFLAGS=""
export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
export CFLAGS_FOR_TARGET="-Os -G0 -fcommon -ffunction-sections -fdata-sections"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET"
cd "$srcdir"
[ -d "build-bootstrap-gcc" ] || mkdir "build-bootstrap-gcc"
@ -92,12 +92,14 @@ build() {
--disable-threads \
--disable-tls \
--disable-werror \
--disable-win32-registry \
--enable-languages=c,c++,lto \
--enable-lto \
--enable-static \
--enable-target-optspace \
--with-abi=32 \
--with-arch=vr4300 \
--with-gcc \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \
@ -114,14 +116,10 @@ package() {
cd "$srcdir/build-bootstrap-gcc"
make DESTDIR="$pkgdir" install-gcc -j1
# strip target binaries
find "$PREFIX/lib" \( -name "*.a" -or -name "*.o" \) -exec $_target-objcopy \
-R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc \
'{}' \;
# strip host binaries
find "$PREFIX/bin" "$PREFIX/lib/gcc/$_target/${_gcc/gcc-/}" \
-type f -and \( -executable \) -exec strip '{}' \;
# "$PREFIX/bin"
# "$PREFIX/lib/gcc/$_target/$pkgver"
find "$PREFIX" -type f -and \( -executable \) -exec strip '{}' \;
rm -r "$PREFIX/share/info"
rm -r "$PREFIX/share"
}

View File

@ -5,7 +5,7 @@ _sysroot="$_prefix/sysroot"
pkgname="$_triplet-gcc"
pkgver=11.2.0
pkgrel=1
pkgrel=2
_gcc="gcc-$pkgver"
_mpfr=mpfr-4.1.0
_gmp=gmp-6.2.1
@ -55,8 +55,8 @@ build() {
export CPPFLAGS=""
export LDFLAGS=""
export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
export CFLAGS_FOR_TARGET="-Os -G0 -fcommon -ffunction-sections -fdata-sections"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET"
cd "$srcdir"
[ -d "build-gcc" ] || mkdir "build-gcc"
@ -95,12 +95,14 @@ build() {
--disable-threads \
--disable-tls \
--disable-werror \
--disable-win32-registry \
--enable-languages=c,c++,lto \
--enable-lto \
--enable-static \
--enable-target-optspace \
--with-abi=32 \
--with-arch=vr4300 \
--with-gcc \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \
@ -118,13 +120,17 @@ package() {
make DESTDIR="$pkgdir" install -j1
# strip target binaries
find "$PREFIX/$_target/lib" \( -name "*.a" -or -name "*.o" \) -exec $_target-objcopy \
find \
"$PREFIX/lib/gcc/$_target/$pkgver" \
"$PREFIX/$_target/lib" \
\( -name "*.a" -or -name "*.o" \) -exec $_target-objcopy \
-R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc \
'{}' \;
# strip host binaries
find "$PREFIX/bin" "$PREFIX/lib/gcc/$_target/${_gcc/gcc-/}" \
-type f -and \( -executable \) -exec strip '{}' \;
# "$PREFIX/bin"
# "$PREFIX/lib/gcc/$_target/$pkgver"
find "$PREFIX" -type f -and \( -executable \) -exec strip '{}' \;
rm -r "$PREFIX/share/info"
rm -r "$PREFIX/share"
}

View File

@ -5,7 +5,7 @@ _sysroot="$_prefix/sysroot"
pkgname="$_triplet-newlib"
pkgver=4.1.0
pkgrel=1
pkgrel=2
_newlib="newlib-$pkgver"
pkgdesc="A C library intended for use on embedded systems ($_triplet)"
arch=('any')
@ -26,8 +26,7 @@ build() {
export CPPFLAGS=""
export LDFLAGS=""
export CFLAGS_FOR_TARGET="-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables"
export CXXFLAGS_FOR_TARGET="$CFLAGS_FOR_TARGET -fno-rtti"
export CFLAGS_FOR_TARGET="-Os -G0 -fcommon -ffunction-sections -fdata-sections"
cd "$srcdir"
[ -d "build-newlib" ] || mkdir "build-newlib"
@ -58,7 +57,6 @@ build() {
--enable-target-optspace \
--with-newlib \
#--enable-newlib-nano-formatted-io
make
}