1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #! /bin/sh
- #
- # This script launches configure with the right arguments
- # The tree must have been patched before doing this.
- #
- isbsd=`uname -a | grep "BSD"`
- isos=`uname -a | grep "opensolaris"`
- if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
- #Assume GNU make
- make=make
- else
- make=gmake
- fi
- if [ "x$isos" = "x" ]; then
- #Assume GNU or BSD install
- install=install
- else
- install=ginstall
- fi
- echo GCC4TI script: Configuring, compiling and installing gcc...
- CFLAGS_FOR_BUILD="$CFLAGS"
- export CFLAGS_FOR_BUILD
- CC_FOR_BUILD="$CC"
- export CC_FOR_BUILD
- ORG_PWD=$PWD/..
- mkdir "$ORG_PWD/build"; cd "$ORG_PWD/build"; mkdir gcc; cd gcc
- if [ "x$GCC4TIHOST" = "x" ]; then
- ../../download/gcc.ti/configure "--prefix=$PREFIX_GCC4TI" --target=m68k-coff --with-gnu-as --disable-nls --disable-multilib --disable-shared --enable-static --disable-threads --disable-win32-registry --disable-checking --disable-werror --disable-pch --disable-mudflap --disable-libssp
- else
- echo Compiling GCC4TI gcc on custom host $GCC4TIHOST
- ../../download/gcc.ti/configure "--prefix=$PREFIX_GCC4TI" --target=m68k-coff --with-gnu-as --disable-nls --disable-multilib --disable-shared --enable-static --disable-threads --disable-win32-registry --disable-checking --disable-werror --disable-pch --disable-mudflap --disable-libssp --host=$GCC4TIHOST
- fi
- if [ $? -ne 0 ]; then
- echo "GCC4TI script: Error while configuring GCC"
- exit 1
- fi
- #GCC 4.0 is very annoying because of its habit to configure subdirectories only during make.
- #This keeps us from patching the generated makefile in advance.
- #So we have to call make 3 times to get it to work with our removed directories.
- CC=$CC ${make}
- echo You should have seen an error. This is normal. GCC4TI installation continues.
- # Create dummy libiberty testsuite makefile
- rm -f libiberty/testsuite/Makefile
- echo all: >libiberty/testsuite/Makefile
- ${make}
- echo You should have seen an error. This is normal. GCC4TI installation continues.
- # Create dummy build-libiberty testsuite makefile
- rm -f `ls -d build-*`/libiberty/testsuite/Makefile
- echo all: >`ls -d build-*`/libiberty/testsuite/Makefile
- ${make}
- echo You should have seen an error. This is normal. GCC4TI installation continues.
- # Finish gcc installation
- ${install} -d "$PREFIX_GCC4TI/bin/" || exit 1
- iswin1=`echo $GCC4TIHOST | grep -E -i "msys|mingw|cygwin"`
- iswin2=`uname -a | grep -E -i "msys|mingw|cygwin"`
- if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
- ${install} gcc/cc1 "$PREFIX_GCC4TI/bin/" || exit 1
- ${install} gcc/xgcc "$PREFIX_GCC4TI/bin/gcc" || exit 1
- else
- ${install} gcc/cc1.exe "$PREFIX_GCC4TI/bin/" || exit 1
- ${install} gcc/xgcc.exe "$PREFIX_GCC4TI/bin/gcc.exe" || exit 1
- fi
- cd "$ORG_PWD/scripts"
- echo Done.
- exit 0
|