Skip to content

Commit ad7dbd5

Browse files
committed
Don't share GCC folders
1 parent bafaff9 commit ad7dbd5

2 files changed

Lines changed: 29 additions & 46 deletions

File tree

‎scripts/002-gcc-newlib-PPU.sh‎

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,29 @@
44
GCC="gcc-7.5.0"
55
NEWLIB="newlib-4.4.0.20231231"
66

7-
if [ ! -d ${NEWLIB} ]; then
7+
if [ ! -d ${GCC}-PPU ]; then
88

99
## Download the source code.
10+
if [ ! -f ${GCC}.tar.xz ]; then wget -q --show-progress --continue https://ftpmirror.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.xz; fi
1011
if [ ! -f ${NEWLIB}.tar.gz ]; then wget -q --show-progress --continue https://sourceware.org/pub/newlib/${NEWLIB}.tar.gz; fi
1112

1213
## Unpack the source code.
13-
rm -Rf ${NEWLIB} && tar xfz ${NEWLIB}.tar.gz
14-
15-
## Patch the source code.
16-
cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB}
17-
18-
fi
14+
tar xfJ ${GCC}.tar.xz
15+
mv ${GCC} ${GCC}-PPU
1916

20-
if [ ! -d ${GCC} ]; then
21-
22-
## Download the source code.
23-
if [ ! -f ${GCC}.tar.xz ]; then wget -q --show-progress --continue https://ftpmirror.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.xz; fi
24-
25-
## Unpack the source code.
26-
rm -Rf ${GCC} && tar xfJ ${GCC}.tar.xz
17+
tar xfz ${NEWLIB}.tar.gz
18+
mv ${NEWLIB} ${NEWLIB}-PPU
2719

2820
## Patch the source code.
29-
cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC}
21+
cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB}-PPU
22+
cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC}-PPU
3023

3124
## Enter the source code directory.
32-
cd ${GCC}
25+
cd ${GCC}-PPU
3326

3427
## Create the newlib symlinks.
35-
if [ -f ../${NEWLIB}/newlib ]; then rm newlib; fi
36-
if [ -f ../${NEWLIB}/libgloss ]; then rm libgloss; fi
37-
ln -s ../${NEWLIB}/newlib newlib
38-
ln -s ../${NEWLIB}/libgloss libgloss
28+
ln -s ../${NEWLIB}-PPU/newlib newlib
29+
ln -s ../${NEWLIB}-PPU/libgloss libgloss
3930

4031
## Download the prerequisites.
4132
./contrib/download_prerequisites
@@ -45,15 +36,15 @@ if [ ! -d ${GCC} ]; then
4536

4637
fi
4738

48-
if [ ! -d ${GCC}/build-ppu ]; then
39+
if [ ! -d ${GCC}-PPU/build-ppu ]; then
4940

5041
## Create the build directory.
51-
mkdir ${GCC}/build-ppu
42+
mkdir ${GCC}-PPU/build-ppu
5243

5344
fi
5445

5546
## Enter the build directory.
56-
cd ${GCC}/build-ppu
47+
cd ${GCC}-PPU/build-ppu
5748

5849
## Configure the build.
5950
../configure --prefix="$PS3DEV/ppu" --target="powerpc64-ps3-elf" \

‎scripts/005-gcc-newlib-SPU.sh‎

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,29 @@
44
GCC="gcc-7.5.0"
55
NEWLIB="newlib-4.2.0.20211231"
66

7-
if [ ! -d ${NEWLIB} ]; then
7+
if [ ! -d ${GCC}-SPU ]; then
88

99
## Download the source code.
10+
if [ ! -f ${GCC}.tar.xz ]; then wget -q --show-progress --continue https://ftpmirror.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.xz; fi
1011
if [ ! -f ${NEWLIB}.tar.gz ]; then wget -q --show-progress --continue https://sourceware.org/pub/newlib/${NEWLIB}.tar.gz; fi
1112

1213
## Unpack the source code.
13-
rm -Rf ${NEWLIB} && tar xfz ${NEWLIB}.tar.gz
14-
15-
## Patch the source code.
16-
cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB}
17-
18-
fi
14+
tar xfJ ${GCC}.tar.xz
15+
mv ${GCC} ${GCC}-SPU
1916

20-
if [ ! -d ${GCC} ]; then
21-
22-
## Download the source code.
23-
if [ ! -f ${GCC}.tar.xz ]; then wget -q --show-progress --continue https://ftpmirror.gnu.org/gnu/gcc/${GCC}/${GCC}.tar.xz; fi
24-
25-
## Unpack the source code.
26-
rm -Rf ${GCC} && tar xfJ ${GCC}.tar.xz
17+
tar xfz ${NEWLIB}.tar.gz
18+
mv ${NEWLIB} ${NEWLIB}-SPU
2719

2820
## Patch the source code.
29-
cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC}
21+
cat ../patches/${NEWLIB}-PS3.patch | patch -p1 -d ${NEWLIB}-SPU
22+
cat ../patches/${GCC}-PS3.patch | patch -p1 -d ${GCC}-SPU
3023

3124
## Enter the source code directory.
32-
cd ${GCC}
25+
cd ${GCC}-SPU
3326

3427
## Create the newlib symlinks.
35-
if [ -f ../${NEWLIB}/newlib ]; then rm newlib; fi
36-
if [ -f ../${NEWLIB}/libgloss ]; then rm libgloss; fi
37-
ln -s ../${NEWLIB}/newlib newlib
38-
ln -s ../${NEWLIB}/libgloss libgloss
28+
ln -s ../${NEWLIB}-SPU/newlib newlib
29+
ln -s ../${NEWLIB}-SPU/libgloss libgloss
3930

4031
## Download the prerequisites.
4132
./contrib/download_prerequisites
@@ -45,15 +36,15 @@ if [ ! -d ${GCC} ]; then
4536

4637
fi
4738

48-
if [ ! -d ${GCC}/build-spu ]; then
39+
if [ ! -d ${GCC}-SPU/build-spu ]; then
4940

5041
## Create the build directory.
51-
mkdir ${GCC}/build-spu
42+
mkdir ${GCC}-SPU/build-spu
5243

5344
fi
5445

5546
## Enter the build directory.
56-
cd ${GCC}/build-spu
47+
cd ${GCC}-SPU/build-spu
5748

5849
## Configure the build.
5950
CFLAGS_FOR_TARGET="-Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fschedule-insns -mdual-nops -mwarn-reloc" \
@@ -71,6 +62,7 @@ CFLAGS_FOR_TARGET="-Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fsched
7162
--with-newlib \
7263
--enable-newlib-multithread \
7364
--enable-newlib-hw-fp \
65+
--with-system-zlib \
7466
--with-pic
7567

7668
## Compile and install.

0 commit comments

Comments
 (0)