diff --git a/build-devkit.sh b/build-devkit.sh index 4127c43..33d9f6c 100755 --- a/build-devkit.sh +++ b/build-devkit.sh @@ -219,15 +219,18 @@ extract_and_patch gcc $GCC_VER xz extract_and_patch newlib $NEWLIB_VER gz extract_and_patch gdb $GDB_VER xz -if [ $VERSION -eq 2 ]; then - extract_and_patch binutils $MN_BINUTILS_VER bz2 -fi +if [ $VERSION -eq 2 ]; then extract_and_patch binutils $MN_BINUTILS_VER bz2; fi #--------------------------------------------------------------------------------- # Build and install devkit components #--------------------------------------------------------------------------------- if [ -f $scriptdir/build-gcc.sh ]; then . $scriptdir/build-gcc.sh || { echo "Error building toolchain"; exit 1; }; cd $BUILDSCRIPTDIR; fi + +if [ "$BUILD_DKPRO_SKIP_CRTLS" != "1" ] && [ -f $scriptdir/build-crtls.sh ]; then + . $scriptdir/build-crtls.sh || { echo "Error building crtls & rules"; exit 1; }; cd $BUILDSCRIPTDIR; +fi + cd $BUILDSCRIPTDIR if [ ! -z $CROSSBUILD ] && grep -q "mingw" <<<"$CROSSBUILD" ; then diff --git a/dkarm-eabi/scripts/build-crtls.sh b/dkarm-eabi/scripts/build-crtls.sh new file mode 100755 index 0000000..3b13e4e --- /dev/null +++ b/dkarm-eabi/scripts/build-crtls.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#--------------------------------------------------------------------------------- +# set env variables +#--------------------------------------------------------------------------------- +export DEVKITPRO=$TOOLPATH +export DEVKITARM=$DEVKITPRO/devkitARM + +#--------------------------------------------------------------------------------- +# Install the rules files +#--------------------------------------------------------------------------------- +cd $BUILDDIR + +mkdir -p rules +cd rules +tar -xvf $SRCDIR/devkitarm-rules-$DKARM_RULES_VER.tar.xz +make install + +#--------------------------------------------------------------------------------- +# Install and build the crt0 files +#--------------------------------------------------------------------------------- +cd $BUILDDIR + +mkdir -p crtls +cd crtls +tar -xvf $SRCDIR/devkitarm-crtls-$DKARM_CRTLS_VER.tar.xz +make install + diff --git a/dkppc/scripts/build-crtls.sh b/dkppc/scripts/build-crtls.sh new file mode 100755 index 0000000..cb015ff --- /dev/null +++ b/dkppc/scripts/build-crtls.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#--------------------------------------------------------------------------------- +# set env variables +#--------------------------------------------------------------------------------- +export DEVKITPRO=$TOOLPATH +export DEVKITARM=$DEVKITPRO/devkitARM + +#--------------------------------------------------------------------------------- +# Install the rules files +#--------------------------------------------------------------------------------- +cd $BUILDDIR + +mkdir -p rules +cd rules +tar -xvf $SRCDIR/devkitarm-rules-$DKARM_RULES_VER.tar.xz +make install