launch.gcc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #! /bin/sh
  2. #
  3. # This script launches configure with the right arguments
  4. # The tree must have been patched before doing this.
  5. #
  6. isbsd=`uname | grep "BSD"`
  7. if [ $isbsd = "" ]; then
  8. #Assume GNU make
  9. make=make
  10. else
  11. make=gmake
  12. fi
  13. echo TIGCC script: Configuring, compiling and installing gcc...
  14. CFLAGS_FOR_BUILD="$CFLAGS"
  15. export CFLAGS_FOR_BUILD
  16. CC_FOR_BUILD="$CC"
  17. export CC_FOR_BUILD
  18. mkdir ../build; mkdir ../build/gcc;
  19. cd ../build/gcc; ../../download/gcc.ti/configure --prefix=$TIGCC --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
  20. if [ $? -ne 0 ]
  21. then echo "TIGCC script: Error while configuring GCC"
  22. exit 1
  23. fi
  24. #GCC 4.0 is very annoying because of its habit to configure subdirectories only during make.
  25. #This keeps us from patching the generated makefile in advance.
  26. #So we have to call make 3 times to get it to work with our removed directories.
  27. ${make}
  28. echo You should have seen an error. This is normal. TIGCC installation continues.
  29. # Create dummy libiberty testsuite makefile
  30. rm -f libiberty/testsuite/Makefile
  31. echo all: >libiberty/testsuite/Makefile
  32. ${make}
  33. echo You should have seen an error. This is normal. TIGCC installation continues.
  34. # Create dummy build-libiberty testsuite makefile
  35. rm -f `ls -d build-*`/libiberty/testsuite/Makefile
  36. echo all: >`ls -d build-*`/libiberty/testsuite/Makefile
  37. ${make}
  38. echo You should have seen an error. This is normal. TIGCC installation continues.
  39. cd ../../scripts
  40. # Finish gcc installation
  41. mkdir $TIGCC/bin/
  42. cp ../build/gcc/gcc/cc1 $TIGCC/bin/
  43. cp ../build/gcc/gcc/xgcc $TIGCC/bin/gcc
  44. echo Done.