]>
Commit | Line | Data |
---|---|---|
ee9dd372 TT |
1 | # configure.host |
2 | ||
3 | # This shell script handles all host based configuration for libgcj. | |
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 | ||
8 | # This shell script should be invoked as | |
9 | # . configure.host | |
10 | # If it encounters an error, it will exit with a message. | |
11 | ||
12 | # It uses the following shell variables: | |
13 | # host The configuration host | |
14 | # host_cpu The configuration host CPU | |
15 | # target_optspace --enable-target-optspace ("yes", "no", "") | |
16 | ||
17 | # It sets the following shell variables: | |
18 | # libgcj_cflags Special CFLAGS to use when building | |
19 | # libgcj_cxxflags Special CXXFLAGS to use when building | |
20 | # libgcj_javaflags Special JAVAFLAGS to use when building | |
45597167 BM |
21 | # libgcj_interpreter If the bytecode interpreter supports this platform. |
22 | # enable_java_net_default If java.net native code should be enabled by | |
23 | # default. | |
24 | # enable_hash_synchronization_default If hash synchronization should be | |
25 | # enabled by default. | |
26 | # sysdeps_dir Directory containing system-dependent headers | |
27 | # slow_pthread_self The synchronization code should try to avoid | |
28 | # pthread_self calls by caching thread IDs in a hashtable | |
605dc89b BM |
29 | # can_unwind_signal Set to "yes" if the EH unwinder supports throwing |
30 | # from a signal handler. | |
ee9dd372 TT |
31 | |
32 | libgcj_flags= | |
33 | libgcj_cflags= | |
34 | libgcj_cxxflags= | |
35 | libgcj_javaflags= | |
b11f6430 | 36 | libgcj_interpreter= |
3610e0d5 TT |
37 | enable_java_net_default=yes |
38 | enable_hash_synchronization_default=no | |
45597167 BM |
39 | sysdeps_dir=generic |
40 | slow_pthread_self= | |
605dc89b | 41 | can_unwind_signal=no |
ee9dd372 TT |
42 | |
43 | case "${target_optspace}:${host}" in | |
44 | yes:*) | |
45 | libgcj_flags="${libgcj_flags} -Os" | |
46 | ;; | |
47 | :m32r-* | :d10v-* | :d30v-*) | |
48 | libgcj_flags="${libgcj_flags} -Os" | |
49 | ;; | |
50 | no:* | :*) | |
51 | # Nothing. | |
52 | ;; | |
53 | esac | |
54 | ||
55 | AM_RUNTESTFLAGS= | |
56 | ||
57 | # Set any host dependent compiler flags. | |
58 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. | |
59 | ||
60 | echo "$target" | |
61 | ||
d342a2e1 | 62 | DIVIDESPEC=-fuse-divide-subroutine |
e529c2c1 | 63 | EXCEPTIONSPEC=-fnon-call-exceptions |
5cb27a46 | 64 | CHECKREFSPEC= |
d342a2e1 | 65 | |
c0904887 | 66 | # This case statement supports per-CPU defaults. |
ee9dd372 TT |
67 | case "${host}" in |
68 | mips-tx39-*|mipstx39-unknown-*) | |
69 | libgcj_flags="${libgcj_flags} -G 0" | |
70 | LDFLAGS="$LDFLAGS -Tjmr3904dram.ld" | |
d342a2e1 | 71 | AM_RUNTESTFLAGS="--target_board=jmr3904-sim" |
ab31268c TT |
72 | # Use "Ecos" processes since they are a no-op. |
73 | PROCESS=Ecos | |
2d933a0b | 74 | FILE=Posix |
4b68fe8a | 75 | enable_java_net_default=no |
ffccc6be | 76 | enable_getenv_properties_default=no |
ee9dd372 | 77 | ;; |
97ce4a51 | 78 | i686-*|i586-*|i486-*|i386-*) |
45597167 | 79 | sysdeps_dir=i386 |
6cc96432 | 80 | libgcj_flags="${libgcj_flags} -ffloat-store" |
b11f6430 | 81 | libgcj_interpreter=yes |
6cc96432 AG |
82 | libgcj_cxxflags="-D__NO_MATH_INLINES" |
83 | libgcj_cflags="-D__NO_MATH_INLINES" | |
c677cd7f | 84 | DIVIDESPEC=-fno-use-divide-subroutine |
3610e0d5 | 85 | enable_hash_synchronization_default=yes |
45597167 | 86 | slow_pthread_self=yes |
ee9dd372 | 87 | ;; |
7b204712 BT |
88 | x86_64-*) |
89 | sysdeps_dir=x86-64 | |
90 | libgcj_flags="${libgcj_flags} -ffloat-store" | |
91 | libgcj_interpreter=no | |
92 | libgcj_cxxflags="-D__NO_MATH_INLINES" | |
93 | libgcj_cflags="-D__NO_MATH_INLINES" | |
94 | DIVIDESPEC=-fno-use-divide-subroutine | |
95 | enable_hash_synchronization_default=yes | |
96 | slow_pthread_self=yes | |
97 | ;; | |
48a9aced | 98 | alpha*-*) |
45597167 | 99 | sysdeps_dir=alpha |
0be25992 | 100 | libgcj_flags="${libgcj_flags} -mieee" |
bc38c787 | 101 | libgcj_interpreter=yes |
092a1f5a | 102 | enable_hash_synchronization_default=yes |
bc38c787 | 103 | ;; |
1d49f58a AM |
104 | powerpc64*-*) |
105 | # libffi not ported. | |
106 | with_libffi_default=no | |
107 | libgcj_interpreter=no | |
108 | libgcj_flags="${libgcj_flags} -mminimal-toc" | |
109 | # this may not be correct | |
110 | sysdeps_dir=powerpc | |
111 | enable_hash_synchronization_default=yes | |
112 | slow_pthread_self=yes | |
113 | ;; | |
c0904887 | 114 | powerpc*-*) |
45597167 | 115 | sysdeps_dir=powerpc |
23ab86e4 | 116 | libgcj_interpreter=yes |
45597167 BM |
117 | enable_hash_synchronization_default=yes |
118 | slow_pthread_self=yes | |
23ab86e4 | 119 | ;; |
3cf88fb4 TT |
120 | sparc-*) |
121 | ;; | |
6c80c45e | 122 | ia64-*) |
45597167 | 123 | sysdeps_dir=ia64 |
6c80c45e | 124 | libgcj_flags="${libgcj_flags} -funwind-tables" |
6c80c45e | 125 | libgcj_interpreter=yes |
3610e0d5 | 126 | enable_hash_synchronization_default=yes |
6c80c45e | 127 | ;; |
9782d8f5 AG |
128 | xscale*-elf) |
129 | with_libffi_default=no | |
130 | PROCESS=Ecos | |
2d933a0b | 131 | FILE=Posix |
5cb27a46 AG |
132 | CHECKREFSPEC=-fcheck-references |
133 | EXCEPTIONSPEC= | |
9782d8f5 AG |
134 | enable_java_net_default=no |
135 | enable_getenv_properties_default=no | |
136 | enable_main_args_default=no | |
137 | ;; | |
d8278e27 KK |
138 | sh-* | sh[34]*-*) |
139 | sysdeps_dir=sh | |
140 | libgcj_flags="${libgcj_flags} -mieee" | |
141 | libgcj_interpreter=yes | |
142 | CHECKREFSPEC=-fcheck-references | |
143 | EXCEPTIONSPEC= | |
144 | enable_hash_synchronization_default=yes | |
145 | ;; | |
ee9dd372 TT |
146 | esac |
147 | ||
c0904887 | 148 | # This case statement supports generic port properties and may refine |
605dc89b BM |
149 | # the above per-CPU defaults. Note: If your OS implements |
150 | # MD_FALLBACK_FRAME_STATE_FOR, then you want to set can_unwind_signal | |
151 | # here. | |
c0904887 | 152 | case "${host}" in |
605dc89b BM |
153 | i[34567]86*-linux* | \ |
154 | powerpc*-linux* | \ | |
155 | alpha*-linux* | \ | |
e793a714 | 156 | s390*-linux* | \ |
714708c8 | 157 | sparc*-linux* | \ |
7b204712 BT |
158 | ia64-* | \ |
159 | x86_64*-linux*) | |
605dc89b BM |
160 | can_unwind_signal=yes |
161 | ;; | |
c0904887 LR |
162 | *-*-darwin*) |
163 | enable_hash_synchronization_default=no | |
164 | slow_pthread_self= | |
165 | ;; | |
166 | *-*-freebsd*) | |
c0904887 LR |
167 | slow_pthread_self= |
168 | ;; | |
5f555088 BM |
169 | *-cygwin*) |
170 | # The cygwin linker doesn't do 8-byte alignment by default, so | |
171 | # disable hash synchronization for now. | |
172 | enable_hash_synchronization_default=no | |
173 | slow_pthread_self= | |
174 | ;; | |
c0904887 LR |
175 | esac |
176 | ||
ee9dd372 TT |
177 | libgcj_cflags="${libgcj_cflags} ${libgcj_flags}" |
178 | libgcj_cxxflags="${libgcj_cxxflags} ${libgcj_flags}" | |
179 | libgcj_javaflags="${libgcj_javaflags} ${libgcj_flags}" |