launch.binutils 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #! /bin/sh
  2. #
  3. # This script launch configure with the right arguments
  4. # The tree must have been patched before doing this.
  5. #
  6. isbsd=`uname -a | grep "BSD"`
  7. isos=`uname -a | grep "opensolaris"`
  8. if [ "x$isbsd" = "x" -a "x$isos" = "x" ]; then
  9. #Assume GNU make
  10. make=make
  11. else
  12. make=gmake
  13. fi
  14. if [ "x$isos" = "x" ]; then
  15. #Assume GNU or BSD install
  16. install=install
  17. else
  18. install=ginstall
  19. fi
  20. echo GCC4TI script: Configuring, compiling and installing binutils...
  21. ORG_PWD=$PWD/..
  22. mkdir $ORG_PWD/build; cd $ORG_PWD/build; mkdir binutils; cd binutils
  23. if [ "x$GCC4TIHOST" = "x" ]; then
  24. ../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry
  25. else
  26. echo Compiling GCC4TI binutils on custom host $GCC4TIHOST
  27. ../../download/binutils.ti/configure --disable-serial-configure --prefix=$TIGCC --target=m68k-coff --disable-shared --enable-static --disable-multilib --disable-nls --disable-win32-registry --host=$GCC4TIHOST
  28. fi
  29. if [ $? -ne 0 ]; then
  30. echo "GCC4TI script: Error while configuring binutils"
  31. exit 1
  32. fi
  33. #Binutils 2.14 is very annoying because of its habit to configure subdirectories only during make.
  34. #This keeps us from patching the generated makefile in advance.
  35. #So we have to call make 5 times to get it to work with our removed directories.
  36. ${make}
  37. echo You should have seen an error. This is normal. GCC4TI installation continues.
  38. # Create dummy libiberty testuite makefile
  39. rm -f libiberty/testsuite/Makefile
  40. echo all: >libiberty/testsuite/Makefile
  41. ${make}
  42. echo You should have seen an error. This is normal. GCC4TI installation continues.
  43. # We do not want to install any documentation. It is redundant with our HTML documentation.
  44. rm -f bfd/doc/Makefile
  45. echo all: >bfd/doc/Makefile
  46. # We do not want any po (NLS) makefiles either: we do not use any NLS anyway
  47. mkdir bfd/po
  48. rm -f bfd/po/Makefile
  49. echo all: >bfd/po/Makefile
  50. ${make}
  51. echo You should have seen an error. This is normal. GCC4TI installation continues.
  52. # We do not want any po (NLS) makefiles: we do not use any NLS anyway
  53. rm -f opcodes/po/Makefile
  54. echo all: >opcodes/po/Makefile
  55. ${make}
  56. echo You should have seen an error. This is normal. GCC4TI installation continues.
  57. # We do not want to install any documentation. It is redundant with our HTML documentation.
  58. mkdir gas/doc
  59. rm -f gas/doc/Makefile
  60. echo all: >gas/doc/Makefile
  61. # We do not want any po (NLS) makefiles either: we do not use any NLS anyway
  62. mkdir gas/po
  63. rm -f gas/po/Makefile
  64. echo all: >gas/po/Makefile
  65. #Now this one should really work...
  66. ${make}
  67. if [ $? -ne 0 ]; then
  68. echo "GCC4TI script: Error while making binutils"
  69. exit 2
  70. fi
  71. ${install} -d $TIGCC/bin/ || exit 1
  72. iswin1=`echo $GCC4TIHOST | grep -E "msys|mingw|cygwin"`
  73. iswin2=`uname -a | grep -E "msys|mingw|cygwin"`
  74. if [ "x$iswin1" = "x" -a "x$iswin2" = "x" ]; then
  75. ${install} gas/as-new $TIGCC/bin/as || exit 1
  76. else
  77. ${install} gas/as-new.exe $TIGCC/bin/as.exe || exit 1
  78. fi
  79. cd $ORG_PWD/scripts
  80. echo Done.
  81. exit 0