-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from pspdev/upgrade_toolchain
Upgrade toolchain
- Loading branch information
Showing
6 changed files
with
149 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
PSPTOOLCHAIN_ALLEGREX_BINUTILS_REPO_URL="https://github.com/pspdev/binutils-gdb.git" | ||
PSPTOOLCHAIN_ALLEGREX_BINUTILS_DEFAULT_REPO_REF="allegrex-v2.37.0" | ||
PSPTOOLCHAIN_ALLEGREX_GCC_REPO_URL="https://github.com/pspdev/gcc.git" | ||
PSPTOOLCHAIN_ALLEGREX_GCC_DEFAULT_REPO_REF="allegrex-v13.2.0" | ||
PSPTOOLCHAIN_ALLEGREX_NEWLIB_REPO_URL="https://github.com/pspdev/newlib.git" | ||
PSPTOOLCHAIN_ALLEGREX_NEWLIB_DEFAULT_REPO_REF="allegrex-v4.4.0" | ||
PSPTOOLCHAIN_ALLEGREX_PTHREAD_EMBEDDED_REPO_URL="https://github.com/pspdev/pthread-embedded.git" | ||
PSPTOOLCHAIN_ALLEGREX_PTHREAD_EMBEDDED_DEFAULT_REPO_REF="platform_agnostic" | ||
|
||
if test -f "$PSPDEV_CONFIG_OVERRIDE"; then | ||
source "$PSPDEV_CONFIG_OVERRIDE" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
#!/bin/bash | ||
# binutils.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 001-binutils.sh by pspdev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/psptoolchain-allegrex-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/pspdev/binutils-gdb.git" | ||
REPO_FOLDER="binutils-gdb" | ||
BRANCH_NAME="allegrex-v2.37.0" | ||
REPO_URL="$PSPTOOLCHAIN_ALLEGREX_BINUTILS_REPO_URL" | ||
REPO_REF="$PSPTOOLCHAIN_ALLEGREX_BINUTILS_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone --depth 1 -b $BRANCH_NAME $REPO_URL $REPO_FOLDER && cd $REPO_FOLDER || { exit 1; } | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; } | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
TARGET="psp" | ||
TARG_XTRA_OPTS="" | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
#!/bin/bash | ||
# gcc-stage1.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 002-gcc-stage1.sh by pspdev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/psptoolchain-allegrex-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/pspdev/gcc.git" | ||
REPO_FOLDER="gcc" | ||
BRANCH_NAME="allegrex-v11.2.0" | ||
REPO_URL="$PSPTOOLCHAIN_ALLEGREX_GCC_REPO_URL" | ||
REPO_REF="$PSPTOOLCHAIN_ALLEGREX_GCC_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone --depth 1 -b $BRANCH_NAME $REPO_URL $REPO_FOLDER && cd $REPO_FOLDER || { exit 1; } | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; } | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
TARGET="psp" | ||
OSVER=$(uname) | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
#!/bin/bash | ||
# newlib.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 003-newlib.sh by pspdev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/psptoolchain-allegrex-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/pspdev/newlib.git" | ||
REPO_FOLDER="newlib" | ||
BRANCH_NAME="allegrex-v4.3.0" | ||
REPO_URL="$PSPTOOLCHAIN_ALLEGREX_NEWLIB_REPO_URL" | ||
REPO_REF="$PSPTOOLCHAIN_ALLEGREX_NEWLIB_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; } | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} && git checkout ${BRANCH_NAME} || { exit 1; } | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
TARGET="psp" | ||
|
||
## Determine the maximum number of processes that Make can work with. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
#!/bin/bash | ||
# pthread-embedded.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 004-pthread-embeedded.sh by pspdev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/psptoolchain-allegrex-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/pspdev/pthread-embedded.git" | ||
REPO_FOLDER="pthread-embedded" | ||
BRANCH_NAME="psp" | ||
REPO_URL="$PSPTOOLCHAIN_ALLEGREX_PTHREAD_EMBEDDED_REPO_URL" | ||
REPO_REF="$PSPTOOLCHAIN_ALLEGREX_PTHREAD_EMBEDDED_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; } | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} && git checkout ${BRANCH_NAME} || { exit 1; } | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
TARGET="psp" | ||
|
||
## Determine the maximum number of processes that Make can work with. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
#!/bin/bash | ||
# gcc-stage2.sh by Francisco Javier Trujillo Mata ([email protected]) | ||
# 005-gcc-stage2.sh by pspdev developers | ||
|
||
## Exit with code 1 when any command executed returns a non-zero exit code. | ||
onerr() | ||
{ | ||
exit 1; | ||
} | ||
trap onerr ERR | ||
|
||
## Read information from the configuration file. | ||
source "$(dirname "$0")/../config/psptoolchain-allegrex-config.sh" | ||
|
||
## Download the source code. | ||
REPO_URL="https://github.com/pspdev/gcc.git" | ||
REPO_FOLDER="gcc" | ||
BRANCH_NAME="allegrex-v11.2.0" | ||
REPO_URL="$PSPTOOLCHAIN_ALLEGREX_GCC_REPO_URL" | ||
REPO_REF="$PSPTOOLCHAIN_ALLEGREX_GCC_DEFAULT_REPO_REF" | ||
REPO_FOLDER="$(s="$REPO_URL"; s=${s##*/}; printf "%s" "${s%.*}")" | ||
|
||
# Checking if a specific Git reference has been passed in parameter $1 | ||
if test -n "$1"; then | ||
REPO_REF="$1" | ||
printf 'Using specified repo reference %s\n' "$REPO_REF" | ||
fi | ||
|
||
if test ! -d "$REPO_FOLDER"; then | ||
git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; } | ||
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" | ||
else | ||
cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; } | ||
git -C "$REPO_FOLDER" fetch origin | ||
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" | ||
git -C "$REPO_FOLDER" checkout "$REPO_REF" | ||
fi | ||
|
||
cd "$REPO_FOLDER" | ||
|
||
TARGET="psp" | ||
OSVER=$(uname) | ||
|
||
|