Created
July 12, 2020 17:14
-
-
Save jsdf/f562e4af20d809aed180fca705f9fa1a to your computer and use it in GitHub Desktop.
building libgcc for n64chain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/../n64chain/tools/build-posix64-toolchain.sh b/build-posix64-toolchain.sh | |
index 71d56af..a81f60f 100755 | |
--- a/../n64chain/tools/build-posix64-toolchain.sh | |
+++ b/build-posix64-toolchain.sh | |
@@ -1,5 +1,5 @@ | |
#!/bin/bash | |
-set -eu | |
+set -eux | |
# | |
# tools/build-linux64-toolchain.sh: Linux toolchain build script. | |
@@ -92,6 +92,7 @@ if [ ! -f stamps/gcc-configure ]; then | |
--prefix="${SCRIPT_DIR}" \ | |
--target=mips64-elf --with-arch=vr4300 \ | |
--enable-languages=c --without-headers --with-newlib \ | |
+ --with-libs \ | |
--with-gnu-as=${SCRIPT_DIR}/bin/mips64-elf-as \ | |
--with-gnu-ld=${SCRIPT_DIR}/bin/mips64-elf-ld \ | |
--enable-checking=release \ | |
@@ -120,11 +121,13 @@ if [ ! -f stamps/gcc-configure ]; then | |
--without-included-gettext | |
popd | |
+ echo "" > ./gcc-source/libgcc/config/mips/t-mips64 # clear this file | |
touch stamps/gcc-configure | |
-fi | |
+fi | |
if [ ! -f stamps/gcc-build ]; then | |
pushd gcc-build | |
+ | |
make all-gcc -j${numproc} | |
popd | |
@@ -142,6 +145,18 @@ if [ ! -f stamps/gcc-install ]; then | |
ln -sfv mips64-elf-{gcc,cc} | |
popd | |
+ | |
+ # pushd gcc-build/gcc | |
+ # make all | |
+ # make distclean | |
+ # popd | |
+ | |
+ | |
+ pushd gcc-build | |
+ make all-target-libgcc CC_FOR_TARGET=${SCRIPT_DIR}/bin/mips64-elf-gcc CFLAGS_FOR_TARGET="-D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 -mabi=32 -march=vr4300 -mtune=vr4300 -mfix4300" | |
+ # make quickstrap CC_FOR_TARGET=${SCRIPT_DIR}/bin/mips64-elf-gcc CFLAGS_FOR_TARGET="-D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 -mabi=32 -march=vr4300 -mtune=vr4300 -mfix4300" | |
+ popd | |
+ | |
touch stamps/gcc-install | |
fi | |
@@ -203,12 +218,12 @@ if [ ! -f stamps/mkfs-build ]; then | |
touch stamps/mkfs-build | |
fi | |
-if [ ! -f stamps/rspasm-build ]; then | |
- pushd "${SCRIPT_DIR}/../rspasm" | |
+# if [ ! -f stamps/rspasm-build ]; then | |
+# pushd "${SCRIPT_DIR}/../rspasm" | |
- make clean && make all -j${numproc} | |
- cp rspasm ${SCRIPT_DIR}/bin | |
-fi | |
+# make clean && make all -j${numproc} | |
+# cp rspasm ${SCRIPT_DIR}/bin | |
+# fi | |
rm -rf "${SCRIPT_DIR}"/../tools/tarballs | |
rm -rf "${SCRIPT_DIR}"/../tools/*-source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the commented out rspasm-build part an is unrelated change i needed to make to prevent the script from failing there