mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-25 07:22:27 -05:00
--with-headers causes issues
This commit is contained in:
parent
b78b8c08b2
commit
4a304555c6
|
|
@ -1,208 +1,207 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# Check Parameters
|
# Check Parameters
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
prefix=$INSTALLDIR/devkitPPC
|
prefix=$INSTALLDIR/devkitPPC
|
||||||
|
|
||||||
PLATFORM=`uname -s`
|
PLATFORM=`uname -s`
|
||||||
|
|
||||||
case $PLATFORM in
|
case $PLATFORM in
|
||||||
Darwin )
|
Darwin )
|
||||||
cflags="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
|
cflags="-O -g -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
|
||||||
ldflags="-arch i386 -arch ppc"
|
ldflags="-arch i386 -arch ppc"
|
||||||
;;
|
;;
|
||||||
MINGW32* )
|
MINGW32* )
|
||||||
cflags="-D__USE_MINGW_ACCESS"
|
cflags="-D__USE_MINGW_ACCESS"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install ppc binutils
|
# build and install ppc binutils
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
mkdir -p $target/binutils
|
mkdir -p $target/binutils
|
||||||
cd $target/binutils
|
cd $target/binutils
|
||||||
|
|
||||||
if [ ! -f configured-binutils ]
|
if [ ! -f configured-binutils ]
|
||||||
then
|
then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../$BINUTILS_SRCDIR/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../$BINUTILS_SRCDIR/configure \
|
||||||
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
||||||
--with-gcc --with-gnu-as --with-gnu-ld --disable-dependency-tracking \
|
--with-gcc --with-gnu-as --with-gnu-ld --disable-dependency-tracking \
|
||||||
|| { echo "Error configuing ppc binutils"; exit 1; }
|
|| { echo "Error configuing ppc binutils"; exit 1; }
|
||||||
touch configured-binutils
|
touch configured-binutils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f built-binutils ]
|
if [ ! -f built-binutils ]
|
||||||
then
|
then
|
||||||
$MAKE || { echo "Error building ppc binutils"; exit 1; }
|
$MAKE || { echo "Error building ppc binutils"; exit 1; }
|
||||||
touch built-binutils
|
touch built-binutils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f installed-binutils ]
|
if [ ! -f installed-binutils ]
|
||||||
then
|
then
|
||||||
$MAKE install || { echo "Error installing ppc binutils"; exit 1; }
|
$MAKE install || { echo "Error installing ppc binutils"; exit 1; }
|
||||||
touch installed-binutils
|
touch installed-binutils
|
||||||
fi
|
fi
|
||||||
cd $BUILDSCRIPTDIR
|
cd $BUILDSCRIPTDIR
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install mn10200 binutils
|
# build and install mn10200 binutils
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
mkdir -p mn10200/binutils
|
mkdir -p mn10200/binutils
|
||||||
cd mn10200/binutils
|
cd mn10200/binutils
|
||||||
|
|
||||||
if [ ! -f configured-binutils ]
|
if [ ! -f configured-binutils ]
|
||||||
then
|
then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../$BINUTILS_SRCDIR/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../$BINUTILS_SRCDIR/configure \
|
||||||
--prefix=$prefix --target=mn10200 --disable-nls --disable-shared --disable-debug \
|
--prefix=$prefix --target=mn10200 --disable-nls --disable-shared --disable-debug \
|
||||||
--with-gcc --with-gnu-as --with-gnu-ld \
|
--with-gcc --with-gnu-as --with-gnu-ld \
|
||||||
|| { echo "Error configuing mn10200 binutils"; exit 1; }
|
|| { echo "Error configuing mn10200 binutils"; exit 1; }
|
||||||
touch configured-binutils
|
touch configured-binutils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f built-binutils ]
|
if [ ! -f built-binutils ]
|
||||||
then
|
then
|
||||||
$MAKE || { echo "Error building mn10200 binutils"; exit 1; }
|
$MAKE || { echo "Error building mn10200 binutils"; exit 1; }
|
||||||
touch built-binutils
|
touch built-binutils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f installed-binutils ]
|
if [ ! -f installed-binutils ]
|
||||||
then
|
then
|
||||||
$MAKE install || { echo "Error installing mn10200 binutils"; exit 1; }
|
$MAKE install || { echo "Error installing mn10200 binutils"; exit 1; }
|
||||||
touch installed-binutils
|
touch installed-binutils
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $INSTALLDIR/devkitPPC/mn10200/bin/*
|
for f in $INSTALLDIR/devkitPPC/mn10200/bin/*
|
||||||
do
|
do
|
||||||
strip $f
|
strip $f
|
||||||
done
|
done
|
||||||
|
|
||||||
cd $BUILDSCRIPTDIR
|
cd $BUILDSCRIPTDIR
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install just the c compiler
|
# build and install just the c compiler
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
mkdir -p $target/gcc
|
mkdir -p $target/gcc
|
||||||
cd $target/gcc
|
cd $target/gcc
|
||||||
|
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
cp -r $BUILDSCRIPTDIR/$NEWLIB_SRCDIR/newlib/libc/include $INSTALLDIR/devkitPPC/$target/sys-include
|
cp -r $BUILDSCRIPTDIR/$NEWLIB_SRCDIR/newlib/libc/include $INSTALLDIR/devkitPPC/$target/sys-include
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../$GCC_SRCDIR/configure \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../$GCC_SRCDIR/configure \
|
||||||
--enable-languages=c,c++,objc \
|
--enable-languages=c,c++,objc \
|
||||||
--with-cpu=750 \
|
--with-cpu=750 \
|
||||||
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
||||||
--disable-win32-registry \
|
--disable-win32-registry \
|
||||||
--disable-libstdcxx-pch \
|
--disable-libstdcxx-pch \
|
||||||
--target=$target \
|
--target=$target \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
--with-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 18" \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 18" \
|
2>&1 | tee gcc_configure.log
|
||||||
2>&1 | tee gcc_configure.log
|
touch configured-gcc
|
||||||
touch configured-gcc
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f built-gcc-stage1 ]
|
||||||
if [ ! -f built-gcc-stage1 ]
|
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-stage1
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f installed-gcc-stage1 ]
|
||||||
if [ ! -f installed-gcc-stage1 ]
|
then
|
||||||
then
|
$MAKE install-gcc || { echo "Error installing gcc stage1"; exit 1; }
|
||||||
$MAKE install-gcc || { echo "Error installing gcc stage1"; exit 1; }
|
touch installed-gcc-stage1
|
||||||
touch installed-gcc-stage1
|
rm -fr $INSTALLDIR/devkitPPC/$target/sys-include
|
||||||
rm -fr $INSTALLDIR/devkitPPC/$target/sys-include
|
fi
|
||||||
fi
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
# build and install newlib
|
||||||
# build and install newlib
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
cd $BUILDSCRIPTDIR
|
||||||
cd $BUILDSCRIPTDIR
|
mkdir -p $target/newlib
|
||||||
mkdir -p $target/newlib
|
cd $target/newlib
|
||||||
cd $target/newlib
|
|
||||||
|
unset CFLAGS
|
||||||
unset CFLAGS
|
unset LDFLAGS
|
||||||
unset LDFLAGS
|
|
||||||
|
if [ ! -f configured-newlib ]
|
||||||
if [ ! -f configured-newlib ]
|
then
|
||||||
then
|
$BUILDSCRIPTDIR/$NEWLIB_SRCDIR/configure \
|
||||||
$BUILDSCRIPTDIR/$NEWLIB_SRCDIR/configure \
|
--target=$target \
|
||||||
--target=$target \
|
--prefix=$prefix \
|
||||||
--prefix=$prefix \
|
--enable-newlib-mb \
|
||||||
--enable-newlib-mb \
|
--enable-newlib-hw-fp \
|
||||||
--enable-newlib-hw-fp \
|
|| { echo "Error configuring newlib"; exit 1; }
|
||||||
|| { echo "Error configuring newlib"; exit 1; }
|
touch configured-newlib
|
||||||
touch configured-newlib
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f built-newlib ]
|
||||||
if [ ! -f built-newlib ]
|
then
|
||||||
then
|
$MAKE || { echo "Error building newlib"; exit 1; }
|
||||||
$MAKE || { echo "Error building newlib"; exit 1; }
|
touch built-newlib
|
||||||
touch built-newlib
|
fi
|
||||||
fi
|
if [ ! -f installed-newlib ]
|
||||||
if [ ! -f installed-newlib ]
|
then
|
||||||
then
|
$MAKE install || { echo "Error installing newlib"; exit 1; }
|
||||||
$MAKE install || { echo "Error installing newlib"; exit 1; }
|
touch installed-newlib
|
||||||
touch installed-newlib
|
fi
|
||||||
fi
|
|
||||||
|
cd $BUILDSCRIPTDIR
|
||||||
cd $BUILDSCRIPTDIR
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
# build and install the final compiler
|
||||||
# build and install the final compiler
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
|
cd $BUILDSCRIPTDIR
|
||||||
cd $BUILDSCRIPTDIR
|
mkdir -p $target/gcc
|
||||||
mkdir -p $target/gcc
|
cd $target/gcc
|
||||||
cd $target/gcc
|
|
||||||
|
if [ ! -f built-gcc-stage2 ]
|
||||||
if [ ! -f built-gcc-stage2 ]
|
then
|
||||||
then
|
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
|
||||||
$MAKE all || { echo "Error building gcc stage2"; exit 1; }
|
touch built-gcc-stage2
|
||||||
touch built-gcc-stage2
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f installed-gcc-stage2 ]
|
||||||
if [ ! -f installed-gcc-stage2 ]
|
then
|
||||||
then
|
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
||||||
$MAKE install || { echo "Error installing gcc stage2"; exit 1; }
|
touch installed-gcc
|
||||||
touch installed-gcc
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
cd $BUILDSCRIPTDIR
|
||||||
cd $BUILDSCRIPTDIR
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
# build and install the debugger
|
||||||
# build and install the debugger
|
#---------------------------------------------------------------------------------
|
||||||
#---------------------------------------------------------------------------------
|
mkdir -p $target/gdb
|
||||||
mkdir -p $target/gdb
|
cd $target/gdb
|
||||||
cd $target/gdb
|
|
||||||
|
PLATFORM=`uname -s`
|
||||||
PLATFORM=`uname -s`
|
|
||||||
|
|
||||||
|
if [ ! -f configured-gdb ]
|
||||||
if [ ! -f configured-gdb ]
|
then
|
||||||
then
|
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../$GDB_SRCDIR/configure \
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../$GDB_SRCDIR/configure \
|
--disable-nls --prefix=$prefix --target=$target --disable-werror \
|
||||||
--disable-nls --prefix=$prefix --target=$target --disable-werror \
|
|| { echo "Error configuring gdb"; exit 1; }
|
||||||
|| { echo "Error configuring gdb"; exit 1; }
|
touch configured-gdb
|
||||||
touch configured-gdb
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f built-gdb ]
|
||||||
if [ ! -f built-gdb ]
|
then
|
||||||
then
|
$MAKE || { echo "Error building gdb"; exit 1; }
|
||||||
$MAKE || { echo "Error building gdb"; exit 1; }
|
touch built-gdb
|
||||||
touch built-gdb
|
fi
|
||||||
fi
|
|
||||||
|
if [ ! -f installed-gdb ]
|
||||||
if [ ! -f installed-gdb ]
|
then
|
||||||
then
|
$MAKE install || { echo "Error installing gdb"; exit 1; }
|
||||||
$MAKE install || { echo "Error installing gdb"; exit 1; }
|
touch installed-gdb
|
||||||
touch installed-gdb
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user