@@ -43,17 +43,18 @@ cd $target/gcc
4343if [ ! -f configured-gcc ]
4444then
4545 CFLAGS=" $cflags " LDFLAGS=" $ldflags " CFLAGS_FOR_TARGET=" -O2" LDFLAGS_FOR_TARGET=" " ../../gcc-$GCC_VER /configure \
46- --enable-languages=c \
46+ --enable-languages=c,c++,objc,obj-c++ \
4747 --disable-multilib\
4848 --disable-shared --disable-win32-registry --disable-nls\
4949 --enable-cxx-flags=" -G0" \
5050 --disable-libstdcxx-pch \
5151 --target=$target \
5252 --with-newlib \
53- --without -headers \
53+ --with -headers=../../newlib- $NEWLIB_VER /newlib/libc/include \
5454 --enable-lto $plugin_ld \
5555 --prefix=$prefix \
5656 --disable-dependency-tracking \
57+ --with-bugurl=" http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion=" devkitPSP release 17" \
5758 $CROSS_PARAMS \
5859 || { echo " Error configuring gcc" ; exit 1; }
5960 touch configured-gcc
@@ -128,49 +129,27 @@ then
128129 touch installed-newlib
129130fi
130131
131- cd $BUILDDIR
132-
133-
134132# ---------------------------------------------------------------------------------
135133# build and install the final compiler
136134# ---------------------------------------------------------------------------------
137135
138- mkdir -p $target /gcc-stage2
139- cd $target /gcc-stage2
140-
136+ cd $BUILDDIR
141137
142- if [ ! -f configured-gcc ]
143- then
144- CFLAGS=" $cflags " LDFLAGS=" $ldflags " CFLAGS_FOR_TARGET=" -O2" LDFLAGS_FOR_TARGET=" " ../../gcc-$GCC_VER /configure \
145- --enable-languages=c,c++,objc \
146- --disable-multilib\
147- --enable-poison-system-directories \
148- --disable-shared --disable-win32-registry --disable-nls\
149- --enable-cxx-flags=" -G0" \
150- --disable-libstdcxx-pch \
151- --target=$target \
152- --with-newlib \
153- --enable-lto $plugin_ld \
154- --prefix=$prefix \
155- --disable-dependency-tracking \
156- --with-bugurl=" http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion=" devkitPSP release 17" \
157- $CROSS_PARAMS \
158- || { echo " Error configuring gcc" ; exit 1; }
159- touch configured-gcc
160- fi
138+ cd $target /gcc
161139
162- if [ ! -f built-gcc ]
140+ if [ ! -f built-stage2 ]
163141then
164- $MAKE || { echo " Error building g++ " ; exit 1; }
165- touch built-gcc
142+ $MAKE all || { echo " Error building gcc stage2 " ; exit 1; }
143+ touch built-stage2
166144fi
167145
168- if [ ! -f installed-gcc ]
146+ if [ ! -f installed-stage2 ]
169147then
170- $MAKE install || { echo " Error installing g++ " ; exit 1; }
171- touch installed-gcc
148+ $MAKE install || { echo " Error installing gcc stage2 " ; exit 1; }
149+ touch installed-stage2
172150fi
173151
152+ rm -fr $prefix /$target /sys-include
174153cd $BUILDDIR /pspsdk-$PSPSDK_VER
175154
176155# ---------------------------------------------------------------------------------
0 commit comments