allow for canadian cross

This commit is contained in:
Dave Murphy 2012-04-01 16:50:28 +01:00
parent da0d2f7b3a
commit 3397347bd0
6 changed files with 1536 additions and 23 deletions

6
.gitignore vendored
View File

@ -1,4 +1,4 @@
config.sh
.devkitARM
.devkitPPC
.devkitPSP
.devkitARM*
.devkitPPC*
.devkitPSP*

View File

@ -6,7 +6,7 @@
# devkitPSP release 17
#---------------------------------------------------------------------------------
if [ 1 -eq 1 ] ; then
if [ 0 -eq 1 ] ; then
echo "Currently in release cycle, proceed with caution, do not report problems, do not ask for support."
echo "Please use the latest release buildscripts unless advised otherwise by devkitPro staff."
echo "http://sourceforge.net/projects/devkitpro/files/buildscripts/"
@ -61,6 +61,12 @@ function extract_and_patch {
fi
}
if [ ! -z "$CROSSBUILD" ] ; then
if [ ! -x $(which $CROSSBUILD-gcc) ]; then
echo "error $CROSSBUILD-gcc not in PATH"
exit 1
fi
fi
#---------------------------------------------------------------------------------
# Sane defaults for building toolchain
@ -129,6 +135,13 @@ export MAKE
TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/')
export PATH=$PATH:$TOOLPATH/$package/bin
if [ ! -z $CROSSBUILD ]; then
prefix=$INSTALLDIR/$CROSSBUILD/$package
CROSS_PARAMS="--build=`./config.guess` --host=$CROSSBUILD"
else
prefix=$INSTALLDIR/$package
fi
if [ "$BUILD_DKPRO_AUTOMATED" != "1" ] ; then
echo
@ -154,6 +167,9 @@ esac
BUILDSCRIPTDIR=$(pwd)
BUILDDIR=$(pwd)/.$package
if [ ! -z $CROSSBUILD ]; then
BUILDDIR=$BUILDDIR-$CROSSBUILD
fi
DEVKITPRO_URL="http://downloads.sourceforge.net/devkitpro"
patchdir=$(pwd)/$basedir/patches

1500
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,5 @@
#!/bin/sh
#---------------------------------------------------------------------------------
# Check Parameters
#---------------------------------------------------------------------------------
prefix=$INSTALLDIR/devkitARM
#---------------------------------------------------------------------------------
# build and install binutils
@ -15,7 +11,7 @@ cd $target/binutils
if [ ! -f configured-binutils ]
then
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 $CROSS_PARAMS \
|| { echo "Error configuring binutils"; exit 1; }
touch configured-binutils
fi
@ -33,11 +29,6 @@ then
fi
cd $BUILDDIR
#---------------------------------------------------------------------------------
# included zlib has issues with multilib toolchain
#---------------------------------------------------------------------------------
rm -fr $GCC_SRCDIR/zlib
#---------------------------------------------------------------------------------
# build and install just the c compiler
#---------------------------------------------------------------------------------
@ -61,7 +52,7 @@ then
--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" \
--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
fi
@ -145,7 +136,7 @@ if [ ! -f configured-gdb ]
then
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \
--disable-nls --prefix=$prefix --target=$target --disable-werror \
--disable-dependency-tracking \
--disable-dependency-tracking $CROSS_PARAMS \
|| { echo "Error configuring gdb"; exit 1; }
touch configured-gdb
fi

View File

@ -6,7 +6,7 @@ do
dir=$(echo $archive | sed -e 's/\(.*\)\.tar\.bz2/\1/' )
cd $BUILDDIR/$dir
if [ ! -f configured ]; then
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$prefix --disable-dependency-tracking || { echo "error configuring $archive"; exit 1; }
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$prefix --disable-dependency-tracking $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
touch configured
fi
if [ ! -f built ]; then

View File

@ -4,19 +4,25 @@
# strip has trouble using wildcards so do it this way instead
#---------------------------------------------------------------------------------
for f in $INSTALLDIR/$package/bin/* \
$INSTALLDIR/$package/$target/bin/* \
$INSTALLDIR/$package/libexec/gcc/$target/$GCC_VER/*
if [ ! -z $CROSSBUILD ]; then
HOST_STRIP=$CROSSBUILD-strip
else
HOST_STRIP=strip
fi
for f in $prefix/bin/* \
$prefix/$target/bin/* \
$prefix/$package/libexec/gcc/$target/$GCC_VER/*
do
# exclude dll for windows, so for linux/osx, directories .la files, embedspu script & the gccbug text file
if ! [[ "$f" == *.dll || "$f" == *.so || -d $f || "$f" == *.la || "$f" == *-embedspu || "$f" == *-gccbug ]]
then
strip $f
$HOST_STRIP $f
fi
done
#---------------------------------------------------------------------------------
# strip debug info from libraries
#---------------------------------------------------------------------------------
find $INSTALLDIR/$package/lib/gcc/$target -name *.a -exec $target-strip -d {} \;
find $INSTALLDIR/$package/$target -name *.a -exec $target-strip -d {} \;
find $prefix/lib/gcc/$target -name *.a -exec $target-strip -d {} \;
find $prefix/$package/$target -name *.a -exec $target-strip -d {} \;