configure.host 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # configure.host
  2. # This shell script handles all host based configuration for the garbage
  3. # collector.
  4. # It sets various shell variables based on the the host and the
  5. # configuration options. You can modify this shell script without
  6. # needing to rerun autoconf.
  7. # This shell script should be invoked as
  8. # . configure.host
  9. # If it encounters an error, it will exit with a message.
  10. # It uses the following shell variables:
  11. # host The configuration host
  12. # host_cpu The configuration host CPU
  13. # target_optspace --enable-target-optspace ("yes", "no", "")
  14. # GCC should be "yes" if using gcc
  15. # It sets the following shell variables:
  16. # gc_cflags Special CFLAGS to use when building
  17. # gc_use_mmap Set to "yes" on platforms where mmap should be used instead
  18. # of sbrk. This will define USE_MMAP.
  19. gc_cflags=""
  20. gc_use_mmap=
  21. # We should set -fexceptions if we are using gcc and might be used
  22. # inside something like gcj. This is the zeroth approximation:
  23. if test :"$GCC": = :yes: ; then
  24. gc_cflags="${gc_cflags} -fexceptions"
  25. else
  26. case "$host" in
  27. hppa*-*-hpux* )
  28. if test :$GCC: != :"yes": ; then
  29. gc_cflags="${gc_flags} +ESdbgasm"
  30. fi
  31. # :TODO: actaully we should check using Autoconf if
  32. # the compiler supports this option.
  33. ;;
  34. esac
  35. fi
  36. case "${host}" in
  37. *-linux*)
  38. gc_use_mmap=yes
  39. ;;
  40. esac
  41. case "${target_optspace}:${host}" in
  42. yes:*)
  43. gc_cflags="${gc_cflags} -Os"
  44. ;;
  45. :m32r-* | :d10v-* | :d30v-*)
  46. gc_cflags="${gc_cflags} -Os"
  47. ;;
  48. no:* | :*)
  49. # Nothing.
  50. ;;
  51. esac
  52. # Set any host dependent compiler flags.
  53. # THIS TABLE IS SORTED. KEEP IT THAT WAY.
  54. case "${host}" in
  55. mips-tx39-*|mipstx39-unknown-*)
  56. gc_cflags="${gc_cflags} -G 0"
  57. ;;
  58. *)
  59. ;;
  60. esac