OSDN Git Service

* configure.host: Add case statement to support generic port
[pf3gnuchains/gcc-fork.git] / libjava / configure.host
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
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
29
30 libgcj_flags=
31 libgcj_cflags=
32 libgcj_cxxflags=
33 libgcj_javaflags=
34 libgcj_interpreter=
35 enable_java_net_default=yes
36 enable_hash_synchronization_default=no
37 sysdeps_dir=generic
38 slow_pthread_self=
39
40 case "${target_optspace}:${host}" in
41   yes:*)
42     libgcj_flags="${libgcj_flags} -Os"
43     ;;
44   :m32r-* | :d10v-* | :d30v-*)
45     libgcj_flags="${libgcj_flags} -Os"
46     ;;
47   no:* | :*)
48     # Nothing.
49     ;;
50 esac
51
52 AM_RUNTESTFLAGS= 
53
54 # Set any host dependent compiler flags.
55 # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
56
57 echo "$target"
58
59 DIVIDESPEC=-fuse-divide-subroutine
60 EXCEPTIONSPEC=-fnon-call-exceptions
61 CHECKREFSPEC=
62
63 # This case statement supports per-CPU defaults.
64 case "${host}" in
65   mips-tx39-*|mipstx39-unknown-*)
66         libgcj_flags="${libgcj_flags} -G 0"
67         LDFLAGS="$LDFLAGS -Tjmr3904dram.ld"
68         AM_RUNTESTFLAGS="--target_board=jmr3904-sim"    
69         # Use "Ecos" processes since they are a no-op.
70         PROCESS=Ecos
71         FILE=Posix
72         enable_java_net_default=no
73         enable_getenv_properties_default=no
74         ;;
75   i686-*|i586-*|i486-*|i386-*)
76         sysdeps_dir=i386
77         libgcj_flags="${libgcj_flags} -ffloat-store"
78         libgcj_interpreter=yes
79         libgcj_cxxflags="-D__NO_MATH_INLINES"
80         libgcj_cflags="-D__NO_MATH_INLINES"
81         DIVIDESPEC=-fno-use-divide-subroutine
82         enable_hash_synchronization_default=yes
83         slow_pthread_self=yes
84         ;;
85   alpha*-*)
86         sysdeps_dir=alpha
87         libgcj_flags="${libgcj_flags} -mieee"
88         libgcj_interpreter=yes
89         enable_hash_synchronization_default=yes
90         ;;
91   powerpc*-*)
92         sysdeps_dir=powerpc
93         libgcj_interpreter=yes
94         enable_hash_synchronization_default=yes
95         slow_pthread_self=yes
96         ;;
97   sparc-*)
98         ;;
99   ia64-*)
100         sysdeps_dir=ia64
101         libgcj_flags="${libgcj_flags} -funwind-tables"
102         libgcj_interpreter=yes
103         enable_hash_synchronization_default=yes
104         ;;
105   xscale*-elf)
106         with_libffi_default=no
107         PROCESS=Ecos
108         FILE=Posix
109         CHECKREFSPEC=-fcheck-references
110         EXCEPTIONSPEC=
111         enable_java_net_default=no
112         enable_getenv_properties_default=no
113         enable_main_args_default=no
114         ;;
115 esac
116
117 # This case statement supports generic port properties and may refine
118 # the above per-CPU defaults.  Note: If your OS does not implement
119 # MD_FALLBACK_FRAME_STATE_FOR, then you may want to set CHECKREFSPEC,
120 # DIVIDESPEC (to fix >20 test cases) and EXCEPTIONSPEC (to reduce EH
121 # bloat only) here.
122 case "${host}" in
123   *-*-darwin*)
124         enable_hash_synchronization_default=no
125         slow_pthread_self=
126         ;;
127   *-*-freebsd*)
128         DIVIDESPEC=-fuse-divide-subroutine
129         CHECKREFSPEC=-fcheck-references
130         slow_pthread_self=
131         ;;
132 esac
133
134 libgcj_cflags="${libgcj_cflags} ${libgcj_flags}"
135 libgcj_cxxflags="${libgcj_cxxflags} ${libgcj_flags}"
136 libgcj_javaflags="${libgcj_javaflags} ${libgcj_flags}"