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