mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-25 15:41:31 -05:00
reconfigure and build final compiler from scratch after newlib install
This commit is contained in:
parent
c6a5353109
commit
dbbf264032
|
|
@ -12,7 +12,7 @@ if [ ! -f configured-binutils ]
|
||||||
then
|
then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
||||||
--prefix=$prefix --target=$target --disable-nls --disable-dependency-tracking --disable-werror \
|
--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 \
|
$CROSS_PARAMS \
|
||||||
|| { echo "Error configuring binutils"; exit 1; }
|
|| { echo "Error configuring binutils"; exit 1; }
|
||||||
touch configured-binutils
|
touch configured-binutils
|
||||||
|
|
@ -34,45 +34,41 @@ cd $BUILDDIR
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install just the c compiler
|
# build and install just the c compiler
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
mkdir -p $target/gcc
|
mkdir -p $target/gcc-stage1
|
||||||
cd $target/gcc
|
cd $target/gcc-stage1
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
--enable-languages=c,c++,objc \
|
--enable-languages=c \
|
||||||
--with-march=armv4t\
|
--with-march=armv4t\
|
||||||
--enable-interwork --enable-multilib\
|
--enable-interwork --enable-multilib \
|
||||||
--with-gcc --with-gnu-ld --with-gnu-as \
|
--disable-dependency-tracking \
|
||||||
--disable-dependency-tracking \
|
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
|
||||||
--disable-threads --disable-win32-registry --disable-nls --disable-debug\
|
--disable-libmudflap --disable-libssp --disable-libgomp \
|
||||||
--disable-libmudflap --disable-libssp --disable-libgomp \
|
--disable-libstdcxx-pch \
|
||||||
--disable-libstdcxx-pch \
|
--target=$target \
|
||||||
--target=$target \
|
--with-newlib \
|
||||||
--with-newlib \
|
--without-headers \
|
||||||
--with-headers=$BUILDDIR/newlib-$NEWLIB_VER/newlib/libc/include \
|
--prefix=$prefix \
|
||||||
--prefix=$prefix \
|
--enable-lto $plugin_ld\
|
||||||
--enable-lto $plugin_ld\
|
$CROSS_PARAMS \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 38" \
|
|| { echo "Error configuring gcc"; exit 1; }
|
||||||
$CROSS_PARAMS \
|
touch configured-gcc
|
||||||
|| { echo "Error configuring gcc"; exit 1; }
|
|
||||||
touch configured-gcc
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f built-gcc-stage1 ]
|
if [ ! -f built-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE all-gcc || { echo "Error building gcc stage1"; exit 1; }
|
$MAKE all-gcc || { echo "Error building gcc stage1"; exit 1; }
|
||||||
touch built-gcc-stage1
|
touch built-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f installed-gcc-stage1 ]
|
if [ ! -f installed-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE install-gcc || { echo "Error installing gcc"; exit 1; }
|
$MAKE install-gcc || { echo "Error installing gcc"; exit 1; }
|
||||||
touch installed-gcc-stage1
|
touch installed-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -fr $prefix/$target/sys-include
|
|
||||||
|
|
||||||
unset CFLAGS
|
unset CFLAGS
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
|
|
@ -113,18 +109,40 @@ fi
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
cd $target/gcc
|
mkdir -p $target/gcc-stage2
|
||||||
|
cd $target/gcc-stage2
|
||||||
|
|
||||||
if [ ! -f built-gcc-stage2 ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE || { echo "Error building gcc stage2"; exit 1; }
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
touch built-gcc-stage2
|
--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
|
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
|
then
|
||||||
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
||||||
touch installed-gcc-stage2
|
touch installed-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
||||||
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
|
--enable-poison-system-directories \
|
||||||
--enable-plugins --enable-lto --disable-dependency-tracking \
|
--enable-plugins --enable-lto --disable-dependency-tracking \
|
||||||
--disable-werror $CROSS_PARAMS \
|
--disable-werror $CROSS_PARAMS \
|
||||||
|| { echo "Error configuing ppc binutils"; exit 1; }
|
|| { echo "Error configuing ppc binutils"; exit 1; }
|
||||||
|
|
@ -75,7 +76,7 @@ cd $target/gcc
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
--enable-languages=c,c++,objc \
|
--enable-languages=c \
|
||||||
--enable-lto $plugin_ld \
|
--enable-lto $plugin_ld \
|
||||||
--with-cpu=750 \
|
--with-cpu=750 \
|
||||||
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
||||||
|
|
@ -83,12 +84,11 @@ then
|
||||||
--disable-libstdcxx-pch \
|
--disable-libstdcxx-pch \
|
||||||
--target=$target \
|
--target=$target \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
--with-headers=$BUILDDIR/newlib-$NEWLIB_VER/newlib/libc/include \
|
--without-headers \
|
||||||
--prefix=$prefix\
|
--prefix=$prefix\
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 26" \
|
|
||||||
$CROSS_PARAMS \
|
$CROSS_PARAMS \
|
||||||
2>&1 | tee gcc_configure.log
|
|| { echo "Error configuring gcc stage 1"; exit 1; }
|
||||||
touch configured-gcc
|
touch configured-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -105,8 +105,6 @@ then
|
||||||
rm -fr $INSTALLDIR/devkitPPC/$target/sys-include
|
rm -fr $INSTALLDIR/devkitPPC/$target/sys-include
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -fr $prefix/$target/sys-include
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install newlib
|
# build and install newlib
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
@ -143,18 +141,41 @@ fi
|
||||||
# build and install the final compiler
|
# build and install the final compiler
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
cd $BUILDDIR/$target/gcc
|
cd $BUILDDIR
|
||||||
|
|
||||||
if [ ! -f built-gcc-stage2 ]
|
mkdir -p $target/gcc-stage2
|
||||||
|
cd $target/gcc-stage2
|
||||||
|
|
||||||
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
touch built-gcc-stage2
|
--enable-languages=c,c++,objc \
|
||||||
|
--enable-lto $plugin_ld \
|
||||||
|
--with-cpu=750 \
|
||||||
|
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
||||||
|
--disable-win32-registry \
|
||||||
|
--disable-libstdcxx-pch \
|
||||||
|
--target=$target \
|
||||||
|
--with-newlib \
|
||||||
|
--prefix=$prefix\
|
||||||
|
--enable-poison-system-directories \
|
||||||
|
--disable-dependency-tracking \
|
||||||
|
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 26" \
|
||||||
|
$CROSS_PARAMS \
|
||||||
|
|| { echo "Error configuring gcc stage 1"; exit 1; }
|
||||||
|
touch configured-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f installed-gcc-stage2 ]
|
if [ ! -f built ]
|
||||||
|
then
|
||||||
|
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
|
||||||
|
touch built
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f installed ]
|
||||||
then
|
then
|
||||||
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
||||||
touch installed-gcc-stage2
|
touch installed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
||||||
--prefix=$prefix --target=$target --disable-nls --disable-debug \
|
--prefix=$prefix --target=$target --disable-nls --disable-debug \
|
||||||
--enable-lto --enable-plugins \
|
--enable-lto --enable-plugins \
|
||||||
|
--enable-poison-system-directories \
|
||||||
--disable-dependency-tracking --disable-werror \
|
--disable-dependency-tracking --disable-werror \
|
||||||
$CROSS_PARAMS \
|
$CROSS_PARAMS \
|
||||||
|| { echo "Error configuring binutils"; exit 1; }
|
|| { echo "Error configuring binutils"; exit 1; }
|
||||||
|
|
@ -42,19 +43,17 @@ cd $target/gcc
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c \
|
||||||
--disable-multilib\
|
--disable-multilib\
|
||||||
--with-gcc --with-gnu-ld --with-gnu-as\
|
|
||||||
--disable-shared --disable-win32-registry --disable-nls\
|
--disable-shared --disable-win32-registry --disable-nls\
|
||||||
--enable-cxx-flags="-G0" \
|
--enable-cxx-flags="-G0" \
|
||||||
--disable-libstdcxx-pch \
|
--disable-libstdcxx-pch \
|
||||||
--target=$target \
|
--target=$target \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
|
--without-headers \
|
||||||
--enable-lto $plugin_ld \
|
--enable-lto $plugin_ld \
|
||||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
|
||||||
--prefix=$prefix \
|
--prefix=$prefix \
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPSP release 17" \
|
|
||||||
$CROSS_PARAMS \
|
$CROSS_PARAMS \
|
||||||
|| { echo "Error configuring gcc"; exit 1; }
|
|| { echo "Error configuring gcc"; exit 1; }
|
||||||
touch configured-gcc
|
touch configured-gcc
|
||||||
|
|
@ -74,8 +73,6 @@ then
|
||||||
touch installed-gcc
|
touch installed-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -fr $prefix/$target/sys-include
|
|
||||||
|
|
||||||
unset CFLAGS
|
unset CFLAGS
|
||||||
cd $BUILDDIR/pspsdk-$PSPSDK_VER
|
cd $BUILDDIR/pspsdk-$PSPSDK_VER
|
||||||
|
|
||||||
|
|
@ -138,18 +135,40 @@ cd $BUILDDIR
|
||||||
# build and install the final compiler
|
# build and install the final compiler
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
cd $target/gcc
|
mkdir -p $target/gcc-stage2
|
||||||
|
cd $target/gcc-stage2
|
||||||
|
|
||||||
if [ ! -f built-g++ ]
|
|
||||||
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE || { echo "Error building g++"; exit 1; }
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
touch built-g++
|
--enable-languages=c,c++,objc \
|
||||||
|
--disable-multilib\
|
||||||
|
--enable-poison-system-directories \
|
||||||
|
--disable-shared --disable-win32-registry --disable-nls\
|
||||||
|
--enable-cxx-flags="-G0" \
|
||||||
|
--disable-libstdcxx-pch \
|
||||||
|
--target=$target \
|
||||||
|
--with-newlib \
|
||||||
|
--enable-lto $plugin_ld \
|
||||||
|
--prefix=$prefix \
|
||||||
|
--disable-dependency-tracking \
|
||||||
|
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPSP release 17" \
|
||||||
|
$CROSS_PARAMS \
|
||||||
|
|| { echo "Error configuring gcc"; exit 1; }
|
||||||
|
touch configured-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f installed-g++ ]
|
if [ ! -f built-gcc ]
|
||||||
|
then
|
||||||
|
$MAKE || { echo "Error building g++"; exit 1; }
|
||||||
|
touch built-gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f installed-gcc ]
|
||||||
then
|
then
|
||||||
$MAKE install || { echo "Error installing g++"; exit 1; }
|
$MAKE install || { echo "Error installing g++"; exit 1; }
|
||||||
touch installed-g++
|
touch installed-gcc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $BUILDDIR/pspsdk-$PSPSDK_VER
|
cd $BUILDDIR/pspsdk-$PSPSDK_VER
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user