reconfigure and build final compiler from scratch after newlib install

This commit is contained in:
Dave Murphy
2012-04-15 11:59:39 +01:00
parent c6a5353109
commit dbbf264032
3 changed files with 115 additions and 57 deletions

View File

@@ -12,7 +12,7 @@ if [ ! -f configured-binutils ]
then
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
--prefix=$prefix --target=$target --disable-nls --disable-dependency-tracking --disable-werror \
--enable-lto --enable-plugins \
--enable-lto --enable-plugins --enable-poison-system-directories \
$CROSS_PARAMS \
|| { echo "Error configuring binutils"; exit 1; }
touch configured-binutils
@@ -34,45 +34,41 @@ cd $BUILDDIR
#---------------------------------------------------------------------------------
# build and install just the c compiler
#---------------------------------------------------------------------------------
mkdir -p $target/gcc
cd $target/gcc
mkdir -p $target/gcc-stage1
cd $target/gcc-stage1
if [ ! -f configured-gcc ]
then
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
--enable-languages=c,c++,objc \
--with-march=armv4t\
--enable-interwork --enable-multilib\
--with-gcc --with-gnu-ld --with-gnu-as \
--disable-dependency-tracking \
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libstdcxx-pch \
--target=$target \
--with-newlib \
--with-headers=$BUILDDIR/newlib-$NEWLIB_VER/newlib/libc/include \
--prefix=$prefix \
--enable-lto $plugin_ld\
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 38" \
$CROSS_PARAMS \
|| { echo "Error configuring gcc"; exit 1; }
touch configured-gcc
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
--enable-languages=c \
--with-march=armv4t\
--enable-interwork --enable-multilib \
--disable-dependency-tracking \
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libstdcxx-pch \
--target=$target \
--with-newlib \
--without-headers \
--prefix=$prefix \
--enable-lto $plugin_ld\
$CROSS_PARAMS \
|| { echo "Error configuring gcc"; exit 1; }
touch configured-gcc
fi
if [ ! -f built-gcc-stage1 ]
if [ ! -f built-gcc ]
then
$MAKE all-gcc || { echo "Error building gcc stage1"; exit 1; }
touch built-gcc-stage1
touch built-gcc
fi
if [ ! -f installed-gcc-stage1 ]
if [ ! -f installed-gcc ]
then
$MAKE install-gcc || { echo "Error installing gcc"; exit 1; }
touch installed-gcc-stage1
touch installed-gcc
fi
rm -fr $prefix/$target/sys-include
unset CFLAGS
cd $BUILDDIR
@@ -113,18 +109,40 @@ fi
#---------------------------------------------------------------------------------
cd $BUILDDIR
cd $target/gcc
mkdir -p $target/gcc-stage2
cd $target/gcc-stage2
if [ ! -f built-gcc-stage2 ]
if [ ! -f configured-gcc ]
then
$MAKE || { echo "Error building gcc stage2"; exit 1; }
touch built-gcc-stage2
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
--enable-languages=c,c++,objc \
--with-march=armv4t \
--enable-interwork --enable-multilib \
--enable-poison-system-directories \
--disable-dependency-tracking \
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
--disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libstdcxx-pch \
--target=$target \
--with-newlib \
--prefix=$prefix \
--enable-lto $plugin_ld\
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 39" \
$CROSS_PARAMS \
|| { echo "Error configuring gcc"; exit 1; }
touch configured-gcc
fi
if [ ! -f installed-gcc-stage2 ]
if [ ! -f built-gcc ]
then
$MAKE || { echo "Error building gcc stage2"; exit 1; }
touch built-gcc
fi
if [ ! -f installed-gcc ]
then
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
touch installed-gcc-stage2
touch installed-gcc
fi
cd $BUILDDIR