Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,823 changes: 1,823 additions & 0 deletions assets/config.guess

Large diffs are not rendered by default.

2,364 changes: 2,364 additions & 0 deletions assets/config.sub

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion depends/check-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
( python --version || python -V ) 1>/dev/null 2>&1 || { echo "ERROR: Install python before continuing."; exit 1; }

## Check for python-config
pyprefix=$(python-config --prefix || python3-config --prefix)
pyprefix=$(python-config --prefix 2>/dev/null || python3-config --prefix 2>/dev/null)

[ $? -eq 0 ] || { echo "ERROR: Install python-dev before continuing."; exit 1; }

## Check for python header files
Expand Down
13 changes: 13 additions & 0 deletions patches/gcc-7.2.0-PS3.patch
Original file line number Diff line number Diff line change
Expand Up @@ -725,3 +725,16 @@ index bedcf1017..8d6c8feff 100644
powerpc*-*-linux*)
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000"

diff --git a/zlib/zutil.h b/zlib/zutil.h
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -137,7 +137,7 @@
# endif
#endif

-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS) || (defined(TARGET_OS_MAC) && !defined(__APPLE__))
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
8 changes: 4 additions & 4 deletions scripts/001-binutils-PPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ if [ ! -d ${BINUTILS} ]; then
## Download the source code.
if [ ! -f ${BINUTILS}.tar.bz2 ]; then wget --continue https://ftpmirror.gnu.org/binutils/${BINUTILS}.tar.bz2; fi

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable
../scripts/get-config-scripts.sh

## Unpack the source code.
tar xfvj ${BINUTILS}.tar.bz2
Expand Down Expand Up @@ -48,4 +47,5 @@ cd ${BINUTILS}/build-ppu
## Compile and install.
PROCS="$(nproc --all 2>&1)" || ret=$?
if [ ! -z $ret ]; then PROCS=4; fi
${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=host-libs/lib install
${MAKE:-make} -j $PROCS
${MAKE:-make} libdir=host-libs/lib MULTIOSDIR=. install
3 changes: 2 additions & 1 deletion scripts/002-gcc-newlib-PPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ CFLAGS="-Wno-int-conversion" CXXFLAGS="-Wno-int-conversion" ../configure --prefi
## Compile and install.
PROCS="$(nproc --all 2>&1)" || ret=$?
if [ ! -z $ret ]; then PROCS=4; fi
${MAKE:-make} -j $PROCS all && ${MAKE:-make} install
${MAKE:-make} -j $PROCS all
${MAKE:-make} MULTIOSDIR=. install
8 changes: 4 additions & 4 deletions scripts/005-binutils-SPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ if [ ! -d ${BINUTILS} ]; then
## Download the source code.
if [ ! -f ${BINUTILS}.tar.bz2 ]; then wget --continue https://ftpmirror.gnu.org/binutils/${BINUTILS}.tar.bz2; fi

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue https://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable
../scripts/get-config-scripts.sh

## Unpack the source code.
tar xfvj ${BINUTILS}.tar.bz2
Expand Down Expand Up @@ -47,4 +46,5 @@ cd ${BINUTILS}/build-spu
## Compile and install.
PROCS="$(nproc --all 2>&1)" || ret=$?
if [ ! -z $ret ]; then PROCS=4; fi
${MAKE:-make} -j $PROCS && ${MAKE:-make} libdir=host-libs/lib install
${MAKE:-make} -j $PROCS
${MAKE:-make} libdir=host-libs/lib MULTIOSDIR=. install
3 changes: 2 additions & 1 deletion scripts/006-gcc-newlib-SPU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ CXXFLAGS="-Wno-int-conversion" \
## Compile and install.
PROCS="$(nproc --all 2>&1)" || ret=$?
if [ ! -z $ret ]; then PROCS=4; fi
${MAKE:-make} -j $PROCS all && ${MAKE:-make} install
${MAKE:-make} -j $PROCS all
${MAKE:-make} MULTIOSDIR=. install
9 changes: 9 additions & 0 deletions scripts/008-psl1ght.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@ rm -Rf psl1ght && mkdir psl1ght && tar --strip-components=1 --directory=psl1ght
cd psl1ght

## Compile and install.

# on macOS host tools must not see PS3 headers before Darwin SDK headers
# else apple's stdio.h can break includes
if [ "$(uname -s)" = "Darwin" ]; then
unset CPATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset OBJC_INCLUDE_PATH
fi
${MAKE:-make} install-ctrl && ${MAKE:-make} && ${MAKE:-make} install
38 changes: 38 additions & 0 deletions scripts/get-config-scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh -e

CONFIG_TIMEOUT="${CONFIG_TIMEOUT:-15}"
CONFIG_BASE_URL="https://git.savannah.gnu.org/cgit/config.git/plain"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
ASSET_DIR="${ROOT_DIR}/assets"

fetch_config_file() {
file="$1"
url="${CONFIG_BASE_URL}/${file}"
tmp="${file}.tmp"

echo "Fetching ${file} from Savannah, timeout ${CONFIG_TIMEOUT}s..."

if command -v curl >/dev/null 2>&1; then
if curl -fsSL --connect-timeout 5 --max-time "${CONFIG_TIMEOUT}" "${url}" -o "${tmp}"; then
mv "${tmp}" "${file}"
chmod +x "${file}"
return 0
fi
elif command -v wget >/dev/null 2>&1; then
if wget --timeout="${CONFIG_TIMEOUT}" --tries=1 -O "${tmp}" "${url}"; then
mv "${tmp}" "${file}"
chmod +x "${file}"
return 0
fi
fi

echo "Falling back to safe ${file}."
rm -f "${tmp}"
cp "${ASSET_DIR}/${file}" "${file}"
chmod +x "${file}"
}

fetch_config_file config.guess
fetch_config_file config.sub
Loading