Skip to content

Commit b9ea67e

Browse files
committed
back to using --with-headers
1 parent 5292765 commit b9ea67e

2 files changed

Lines changed: 24 additions & 62 deletions

File tree

dkarm-eabi/scripts/build-gcc.sh

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@ cd $target/gcc-stage1
4040
if [ ! -f configured-gcc ]
4141
then
4242
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
43-
--enable-languages=c \
43+
--enable-languages=c,c++,objc,obj-c++ \
4444
--with-march=armv4t\
45+
--enable-poison-system-directories \
4546
--enable-interwork --enable-multilib \
4647
--disable-dependency-tracking \
4748
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
4849
--disable-libmudflap --disable-libssp --disable-libgomp \
4950
--disable-libstdcxx-pch \
5051
--target=$target \
5152
--with-newlib \
52-
--without-headers \
53+
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
5354
--prefix=$prefix \
5455
--enable-lto $plugin_ld\
56+
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 39" \
5557
$CROSS_PARAMS \
5658
|| { echo "Error configuring gcc"; exit 1; }
5759
touch configured-gcc
@@ -109,42 +111,23 @@ fi
109111
#---------------------------------------------------------------------------------
110112

111113
cd $BUILDDIR
112-
mkdir -p $target/gcc-stage2
113-
cd $target/gcc-stage2
114114

115-
if [ ! -f configured-gcc ]
116-
then
117-
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
118-
--enable-languages=c,c++,objc \
119-
--with-march=armv4t \
120-
--enable-interwork --enable-multilib \
121-
--enable-poison-system-directories \
122-
--disable-dependency-tracking \
123-
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
124-
--disable-libmudflap --disable-libssp --disable-libgomp \
125-
--disable-libstdcxx-pch \
126-
--target=$target \
127-
--with-newlib \
128-
--prefix=$prefix \
129-
--enable-lto $plugin_ld\
130-
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 39" \
131-
$CROSS_PARAMS \
132-
|| { echo "Error configuring gcc"; exit 1; }
133-
touch configured-gcc
134-
fi
115+
cd $target/gcc
135116

136-
if [ ! -f built-gcc ]
117+
if [ ! -f built-stage2 ]
137118
then
138-
$MAKE || { echo "Error building gcc stage2"; exit 1; }
139-
touch built-gcc
119+
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
120+
touch built-stage2
140121
fi
141122

142-
if [ ! -f installed-gcc ]
123+
if [ ! -f installed-stage2 ]
143124
then
144125
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
145-
touch installed-gcc
126+
touch installed-stage2
146127
fi
147128

129+
rm -fr $prefix/$target/sys-include
130+
148131
cd $BUILDDIR
149132

150133
#---------------------------------------------------------------------------------

dkpsp/scripts/build-gcc.sh

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,18 @@ cd $target/gcc
4343
if [ ! -f configured-gcc ]
4444
then
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
129130
fi
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 ]
163141
then
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
166144
fi
167145

168-
if [ ! -f installed-gcc ]
146+
if [ ! -f installed-stage2 ]
169147
then
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
172150
fi
173151

152+
rm -fr $prefix/$target/sys-include
174153
cd $BUILDDIR/pspsdk-$PSPSDK_VER
175154

176155
#---------------------------------------------------------------------------------

0 commit comments

Comments
 (0)