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