launch.gcc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. echo TIGCC script: Configuring, compiling and installing gcc...
  7. CFLAGS_FOR_BUILD="$CFLAGS"
  8. export CFLAGS_FOR_BUILD
  9. CC_FOR_BUILD="$CC"
  10. export CC_FOR_BUILD
  11. mkdir ../build; mkdir ../build/gcc;
  12. 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
  13. if [ $? -ne 0 ]
  14. then echo "TIGCC script: Error while configuring GCC"
  15. exit 1
  16. fi
  17. #GCC 4.0 is very annoying because of its habit to configure subdirectories only during make.
  18. #This keeps us from patching the generated makefile in advance.
  19. #So we have to call make 3 times to get it to work with our removed directories.
  20. make
  21. echo You should have seen an error. This is normal. TIGCC installation continues.
  22. # Create dummy libiberty testsuite makefile
  23. rm -f libiberty/testsuite/Makefile
  24. echo all: >libiberty/testsuite/Makefile
  25. make
  26. echo You should have seen an error. This is normal. TIGCC installation continues.
  27. # Create dummy build-libiberty testsuite makefile
  28. rm -f `ls -d build-*`/libiberty/testsuite/Makefile
  29. echo all: >`ls -d build-*`/libiberty/testsuite/Makefile
  30. make
  31. echo You should have seen an error. This is normal. TIGCC installation continues.
  32. cd ../../scripts
  33. # Finish gcc installation
  34. mkdir $TIGCC/bin/
  35. cp ../build/gcc/gcc/cc1 $TIGCC/bin/
  36. cp ../build/gcc/gcc/xgcc $TIGCC/bin/gcc
  37. echo Done.