]>
Commit | Line | Data |
---|---|---|
8a0efa53 CF |
1 | # configure.host |
2 | ||
3 | # This shell script handles all host based configuration for newlib. | |
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 | # FIXME: This script is too complicated. It does things in too many | |
13 | # different ways. This was taken from the old Cygnus configure script | |
14 | # with only minor changes. It should be cleaned up. | |
15 | ||
16 | # FIXME: The general approach of picking and choosing which | |
17 | # directories to configure, other than machine_dir and sys_dir, is | |
18 | # potentially confusing. | |
19 | ||
20 | # It uses the following shell variables: | |
21 | # host The configuration host | |
22 | # host_cpu The configuration host CPU | |
23 | # newlib_mb --enable-newlib-mb ("yes", "no") | |
24 | # target_optspace --enable-target-optspace ("yes", "no", "") | |
25 | ||
26 | # It sets the following shell variables: | |
27 | # newlib_cflags Special CFLAGS to use when building | |
28 | # machine_dir Subdirectory of libc/machine to configure | |
29 | # sys_dir Subdirectory of libc/sys to configure | |
bfc27bae | 30 | # have_sys_mach_dir Is there a machine subdirectory in sys subdirectory |
8a0efa53 CF |
31 | # posix_dir "posix" to build libc/posix, "" otherwise |
32 | # signal_dir "signal" to build libc/signal, "" otherwise | |
9b022d6d | 33 | # stdio64_dir "stdio64" to build libc/stdio64, "" otherwise |
8a0efa53 CF |
34 | # syscall_dir "syscalls" to build libc/syscalls, "" otherwise |
35 | # unix_dir "unix" to build libc/unix, "" otherwise | |
2e1a7175 TF |
36 | # use_libtool flag: use libtool to build newlib? |
37 | # aext library extension - needed for libtool support | |
38 | # oext object file extension - needed for libtool support | |
6e6cd5bd JJ |
39 | # crt1 name of crt1 object if one is provided |
40 | # crt1_dir directory where crt1 object is found | |
8a0efa53 CF |
41 | |
42 | newlib_cflags= | |
2e1a7175 | 43 | libm_machine_dir= |
8a0efa53 CF |
44 | machine_dir= |
45 | sys_dir= | |
46 | posix_dir= | |
47 | signal_dir=signal | |
dee51391 | 48 | stdio64_dir= |
8a0efa53 CF |
49 | syscall_dir= |
50 | unix_dir= | |
51 | mach_add_setjmp= | |
6e6cd5bd JJ |
52 | crt1= |
53 | crt1_dir= | |
2e1a7175 | 54 | use_libtool=no |
fa4a16a1 | 55 | have_sys_mach_dir=no |
2e1a7175 TF |
56 | aext=a |
57 | oext=o | |
8a0efa53 CF |
58 | |
59 | case "${target_optspace}:${host}" in | |
60 | yes:*) | |
61 | newlib_cflags="${newlib_cflags} -Os" | |
62 | ;; | |
4634da64 | 63 | :m32r-* | :d10v-* | :d30v-* | :avr-*) |
8a0efa53 CF |
64 | newlib_cflags="${newlib_cflags} -Os" |
65 | ;; | |
66 | no:* | :*) | |
67 | newlib_cflags="${newlib_cflags} -O2" | |
68 | ;; | |
69 | esac | |
70 | ||
71 | # Get the source directories to use for the CPU type. | |
72 | # machine_dir should supply CPU dependent routines, such as setjmp. | |
73 | # newlib_cflags is passed to gcc when compiling. | |
74 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
75 | ||
76 | case "${host_cpu}" in | |
77 | a29k) | |
78 | machine_dir=a29k | |
79 | ;; | |
80 | arc) | |
81 | machine_dir= | |
82 | ;; | |
83 | arm) | |
84 | machine_dir=arm | |
85 | ;; | |
4634da64 JJ |
86 | avr*) |
87 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues" | |
88 | ;; | |
2e1a7175 | 89 | |
8a0efa53 CF |
90 | d10v*) |
91 | machine_dir=d10v | |
92 | ;; | |
93 | d30v*) | |
94 | machine_dir=d30v | |
95 | ;; | |
96 | fr30) | |
97 | machine_dir=fr30 | |
98 | ;; | |
99 | h8300) | |
100 | machine_dir=h8300 | |
101 | ;; | |
102 | h8500) | |
103 | machine_dir=h8500 | |
104 | ;; | |
105 | hppa*) | |
106 | machine_dir=hppa | |
107 | ;; | |
108 | i960) | |
109 | machine_dir=i960 | |
110 | ;; | |
111 | i[3456]86) | |
112 | # Don't use for these since they provide their own setjmp. | |
113 | case ${host} in | |
114 | *-*-go32 | *-*-sco* | *-*-cygwin*) | |
2e1a7175 | 115 | libm_machine_dir=i386 |
8a0efa53 CF |
116 | machine_dir=i386 |
117 | ;; | |
118 | *) | |
2e1a7175 | 119 | libm_machine_dir=i386 |
8a0efa53 CF |
120 | machine_dir=i386 |
121 | mach_add_setjmp=true | |
122 | ;; | |
123 | esac | |
124 | ;; | |
ec463fc7 JW |
125 | ia64*) |
126 | ;; | |
8a0efa53 CF |
127 | m32r*) |
128 | machine_dir=m32r | |
129 | ;; | |
a703e0f2 JJ |
130 | |
131 | m68hc11|m6811|m68hc12|m6812) | |
132 | machine_dir=m68hc11 | |
133 | newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax" | |
134 | CFLAGS="-g -Os" | |
135 | ;; | |
136 | ||
8a0efa53 CF |
137 | m68*) |
138 | machine_dir=m68k | |
55500bf1 | 139 | newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE" |
8a0efa53 CF |
140 | ;; |
141 | m88k) | |
142 | machine_dir=m88k | |
143 | newlib_cflags="${newlib_cflags} -m88000" | |
144 | ;; | |
145 | m88110) | |
146 | machine_dir=m88k | |
147 | newlib_cflags="${newlib_cflags} -m88110" | |
148 | ;; | |
149 | mcore) | |
150 | ;; | |
151 | mips*) | |
152 | machine_dir=mips | |
153 | ;; | |
8be9b48b JJ |
154 | mmix) |
155 | ;; | |
8a0efa53 CF |
156 | mn10200) |
157 | machine_dir=mn10200 | |
158 | ;; | |
159 | mn10300) | |
160 | machine_dir=mn10300 | |
161 | ;; | |
9e5dd5ea JJ |
162 | or16) |
163 | ;; | |
164 | or32) | |
165 | ;; | |
8a0efa53 CF |
166 | powerpc*) |
167 | machine_dir=powerpc | |
168 | ;; | |
9f25eed9 | 169 | sh | sh64) |
8a0efa53 CF |
170 | machine_dir=sh |
171 | ;; | |
172 | sparc*) | |
173 | machine_dir=sparc | |
174 | # FIXME: Might wish to make MALLOC_ALIGNMENT more generic. | |
175 | newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8" | |
176 | ;; | |
177 | strongarm) | |
178 | machine_dir=arm | |
179 | ;; | |
0ffc3b94 NC |
180 | xscale) |
181 | machine_dir=xscale | |
182 | ;; | |
8a0efa53 CF |
183 | thumb) |
184 | machine_dir=arm | |
185 | ;; | |
186 | tic80*) | |
187 | machine_dir=tic80 | |
188 | ;; | |
189 | v70) | |
190 | ;; | |
191 | v810) | |
192 | ;; | |
193 | v850) | |
194 | machine_dir=v850 | |
92b57543 | 195 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 " |
8a0efa53 CF |
196 | ;; |
197 | v850e) | |
198 | machine_dir=v850 | |
92b57543 | 199 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 " |
8a0efa53 CF |
200 | ;; |
201 | v850ea) | |
202 | machine_dir=v850 | |
92b57543 | 203 | newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 " |
8a0efa53 | 204 | ;; |
4ecedd09 DB |
205 | frv) |
206 | machine_dir=frv | |
207 | ;; | |
8a0efa53 CF |
208 | w65*) |
209 | machine_dir=w65 | |
210 | ;; | |
f6eff1c0 GK |
211 | xstormy16) |
212 | machine_dir=xstormy16 | |
9c2e7642 | 213 | newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED" |
f6eff1c0 | 214 | ;; |
8a0efa53 CF |
215 | z8k) |
216 | machine_dir=z8k | |
217 | ;; | |
218 | *) | |
219 | echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2 | |
220 | exit 1 | |
221 | ;; | |
222 | esac | |
223 | ||
0c048a9a TF |
224 | # Disable thread support if requested. |
225 | ||
226 | if [ "${newlib_multithread}" = "no" ] ; then | |
227 | newlib_cflags="${newlib_cflags} -D__SINGLE_THREAD__" | |
228 | fi | |
229 | ||
8a0efa53 CF |
230 | # Enable multibyte support if requested. |
231 | ||
232 | if [ "${newlib_mb}" = "yes" ] ; then | |
233 | newlib_cflags="${newlib_cflags} -DMB_CAPABLE" | |
234 | fi | |
235 | ||
afecf2fa JJ |
236 | # Disable printf/scanf floating-point support if requested. |
237 | ||
238 | if [ "${newlib_io_float}" = "no" ] ; then | |
239 | newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT" | |
240 | fi | |
241 | ||
037240a2 JJ |
242 | # Enable printf positional argument support if requested. |
243 | ||
244 | if [ "${newlib_io_pos_args}" = "yes" ] ; then | |
245 | newlib_cflags="${newlib_cflags} -DWANT_IO_POS_ARGS" | |
246 | fi | |
247 | ||
2e1a7175 TF |
248 | # Verify if shared newlib support is allowed and set appropriate variables |
249 | # We don't want to use libtool for platforms that we are not going to | |
250 | # support shared libraries. This is because it adds executable tests which | |
251 | # we don't want for most embedded platforms. | |
252 | case "${host}" in | |
253 | i[3456]86-pc-linux-*) | |
254 | use_libtool=yes | |
fa4a16a1 | 255 | have_sys_mach_dir=yes |
dee51391 | 256 | stdio64_dir=stdio64 |
2e1a7175 TF |
257 | oext=lo |
258 | aext=la ;; | |
259 | *) ;; #shared library not supported for ${host} | |
260 | esac | |
261 | ||
8a0efa53 CF |
262 | # Get the source directories to use for the host. unix_dir is set |
263 | # to unix to get some standard Unix routines. posix_dir is set to get some | |
264 | # standard Posix routines. sys_dir should supply system dependent routines | |
265 | # including crt0. | |
266 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
267 | ||
268 | case "${host}" in | |
269 | *-*-cygwin*) | |
270 | sys_dir=cygwin | |
271 | posix_dir=posix | |
272 | ;; | |
273 | *-*-netware*) | |
274 | signal_dir= | |
275 | sys_dir=netware | |
276 | ;; | |
277 | *-*-rtems*) # generic RTEMS support | |
278 | sys_dir=rtems | |
279 | # RTEMS POSIX support is all inside RTEMS | |
280 | ;; | |
281 | a29k-*-*) | |
282 | sys_dir=a29khif | |
283 | signal_dir= | |
284 | ;; | |
285 | arc-*-*) | |
286 | sys_dir=arc | |
287 | ;; | |
288 | arm-*-*) | |
289 | sys_dir=arm | |
290 | ;; | |
291 | d10v*) | |
292 | sys_dir=d10v | |
293 | ;; | |
294 | d30v*) | |
295 | sys_dir= | |
296 | ;; | |
297 | h8300-*-hms*) | |
298 | sys_dir=h8300hms | |
299 | ;; | |
1ae900d6 JR |
300 | h8300-*-elf*) |
301 | sys_dir=h8300hms | |
302 | ;; | |
dd671cde TF |
303 | h8300-*-coff*) |
304 | sys_dir=h8300hms | |
305 | ;; | |
8a0efa53 CF |
306 | h8300-*-xray*) |
307 | sys_dir=h8300xray | |
308 | ;; | |
309 | h8500-*-hms*) | |
310 | sys_dir=h8500hms | |
311 | ;; | |
1ae900d6 JR |
312 | h8500-*-elf*) |
313 | sys_dir=h8500hms | |
314 | ;; | |
8a0efa53 CF |
315 | i[3456]86-*-go32) |
316 | sys_dir=go32 | |
317 | ;; | |
318 | i[3456]86-*-sco*) | |
319 | sys_dir=sysvi386 | |
320 | unix_dir=unix | |
321 | ;; | |
2efbc2a7 JJ |
322 | i[3456]86-pc-linux-*) |
323 | sys_dir=linux | |
324 | unix_dir=unix | |
325 | posix_dir=posix | |
6e6cd5bd JJ |
326 | crt1=crt1.o |
327 | crt1_dir=libc/sys/${sys_dir} | |
2efbc2a7 JJ |
328 | gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'` |
329 | #newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD | |
330 | newlib_cflags="${newlib_cflags} -Wall" | |
331 | newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS" | |
3a8fc0e4 | 332 | newlib_cflags="${newlib_cflags} -D_LOOSE_KERNEL_NAMES -DHAVE_FCNTL" |
ad552766 | 333 | newlib_cflags="${newlib_cflags} -DWANT_IO_POS_ARGS -DMB_CAPABLE" |
2e1a7175 | 334 | # --- Required when building a shared library ------------------------ |
2efbc2a7 JJ |
335 | newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION" |
336 | # --- The three lines below are optional ------------------------------ | |
337 | ##newlib_cflags="${newlib_cflags} -nostdinc" | |
338 | ##newlib_cflags="${newlib_cflags} -I`newlib-flags --kernel-dir`/include" | |
339 | ##newlib_cflags="${newlib_cflags} -idirafter ${gcc_dir}include" | |
340 | ;; | |
a703e0f2 JJ |
341 | m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*) |
342 | ;; | |
343 | ||
8a0efa53 CF |
344 | m68k-sun-sunos*) |
345 | unix_dir=unix | |
346 | ;; | |
347 | m8*-bug-*) | |
348 | sys_dir=m88kbug | |
349 | ;; | |
350 | mips*-dec-*) | |
351 | sys_dir=decstation | |
352 | ;; | |
8be9b48b JJ |
353 | mmix-knuth-mmixware) |
354 | sys_dir=mmixware | |
355 | ;; | |
8a0efa53 CF |
356 | powerpcle-*-pe) |
357 | sys_dir=cygwin | |
358 | posix_dir=posix | |
359 | ;; | |
360 | sh*-*) | |
361 | sys_dir=sh | |
362 | ;; | |
363 | sparc-sun-sunos*) | |
364 | sys_dir=sun4 | |
365 | unix_dir=unix | |
366 | ;; | |
367 | sparc64*) | |
368 | sys_dir=sparc64 | |
369 | unix_dir=unix | |
370 | ;; | |
371 | strongarm-*-*) | |
372 | sys_dir=arm | |
373 | ;; | |
0ffc3b94 NC |
374 | xscale-*-*) |
375 | sys_dir=arm | |
376 | ;; | |
8a0efa53 CF |
377 | thumb-*-*) |
378 | sys_dir=arm | |
379 | ;; | |
380 | tic80*) | |
381 | sys_dir=tic80 | |
382 | ;; | |
383 | v70-nec-*) | |
384 | sys_dir=sysvnecv70 | |
385 | ;; | |
386 | v810-*-*) | |
387 | sys_dir=sysnec810 | |
388 | ;; | |
389 | v850-*-*) | |
390 | sys_dir=sysnecv850 | |
391 | ;; | |
392 | v850e-*-*) | |
393 | sys_dir=sysnecv850 | |
394 | ;; | |
395 | v850ea-*-*) | |
396 | sys_dir=sysnecv850 | |
397 | ;; | |
4ecedd09 DB |
398 | frv*) |
399 | sys_dir= | |
400 | ;; | |
8a0efa53 CF |
401 | w65-*-*) |
402 | sys_dir=w65 | |
403 | ;; | |
404 | z8k-*-coff) | |
405 | sys_dir=z8ksim | |
406 | ;; | |
407 | esac | |
408 | ||
409 | # Host specific flag settings -- usually for features that are not | |
410 | # general enough or broad enough to be handled above. | |
411 | # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. | |
412 | ||
413 | case "${host}" in | |
414 | *-*-cygwin*) | |
3a8fc0e4 | 415 | newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -DWANT_IO_LONG_DBL -DWANT_PRINTF_LONG_LONG -D_COMPILING_NEWLIB -DHAVE_FCNTL" |
3ac6f3a7 JJ |
416 | # CYGWIN provides its own malloc if --enable-malloc-debugging is set |
417 | if [ "x${malloc_debugging}" = "xyes" ] ; then | |
418 | newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED" | |
419 | fi | |
8a0efa53 CF |
420 | syscall_dir=syscalls |
421 | ;; | |
422 | # RTEMS supplies its own versions of some routines: | |
423 | # malloc() (reentrant version) | |
424 | # exit() RTEMS has a "global" reent to flush | |
425 | # signal()/raise() RTEMS has its own including pthread signals | |
426 | # _XYZ_r() RTEMS has its own reentrant routines | |
427 | # | |
428 | # NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that. | |
429 | *-*-rtems*) | |
3a8fc0e4 | 430 | newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DWANT_PRINTF_LONG_LONG -DHAVE_FCNTL" |
8a0efa53 CF |
431 | ;; |
432 | # VxWorks supplies its own version of malloc, and the newlib one | |
433 | # doesn't work because VxWorks does not have sbrk. | |
434 | *-wrs-vxworks*) | |
3a8fc0e4 | 435 | newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL" |
8a0efa53 CF |
436 | ;; |
437 | # UDI doesn't have exec, so system() should fail the right way | |
438 | a29k-amd-udi) | |
439 | newlib_cflags="${newlib_cflags} -DNO_EXEC" | |
440 | syscall_dir=syscalls | |
441 | ;; | |
442 | arc-*-*) | |
443 | syscall_dir=syscalls | |
444 | ;; | |
445 | arm-*-pe) | |
446 | syscall_dir=syscalls | |
447 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
448 | # Don't use the debugging protocols just yet. | |
449 | ;; | |
450 | arm-*-*) | |
451 | syscall_dir=syscalls | |
452 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
453 | # Select which debug protocol is being used. | |
454 | # ARM_RDP_MONITOR selects the Demon monitor. | |
455 | # ARM_RDI_MONITOR selects the Angel monitor. | |
456 | # If neither are defined, then hard coded defaults will be used | |
457 | # to create the program's environment. | |
458 | # See also thumb below. | |
459 | # newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR" | |
460 | newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | |
461 | ;; | |
4634da64 JJ |
462 | avr*) |
463 | newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" | |
464 | ;; | |
8a0efa53 CF |
465 | d10v*) |
466 | newlib_cflags="${newlib_cflags} -DSMALL_MEMORY" | |
467 | syscall_dir=syscalls | |
468 | ;; | |
469 | d30v*) | |
470 | newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" | |
471 | syscall_dir= | |
472 | ;; | |
473 | fr30-*-*) | |
474 | newlib_cflags="${newlib_cflags}" | |
475 | syscall_dir=syscalls | |
476 | ;; | |
477 | h8300*-*-*) | |
478 | syscall_dir=syscalls | |
479 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" | |
480 | ;; | |
481 | h8500-*-*) | |
482 | syscall_dir=syscalls | |
483 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" | |
484 | ;; | |
485 | i[3456]86-*-sco*) | |
3a8fc0e4 | 486 | newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL" |
8a0efa53 CF |
487 | ;; |
488 | i[3456]86-*-netware*) | |
3a8fc0e4 | 489 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL" |
8a0efa53 CF |
490 | ;; |
491 | i[3456]86-*-go32) | |
3a8fc0e4 | 492 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DHAVE_FCNTL" |
8a0efa53 CF |
493 | ;; |
494 | m32r-*-*) | |
495 | # Pass -msdata=sdata so _impure_ptr goes in .sdata. | |
496 | # We don't generate sda relocs however for upward compatibility. | |
497 | # FIXME: This is necessary because the default multilib doesn't | |
498 | # use --print-multi-lib. | |
499 | newlib_cflags="${newlib_cflags} -msdata=sdata" | |
500 | syscall_dir=syscalls | |
501 | ;; | |
a703e0f2 JJ |
502 | m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) |
503 | newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES" | |
504 | ;; | |
8a0efa53 CF |
505 | mcore-*-*) |
506 | newlib_cflags="${newlib_cflags}" | |
507 | syscall_dir=syscalls | |
508 | ;; | |
8be9b48b JJ |
509 | mmix-*) |
510 | syscall_dir=syscalls | |
511 | # We need every symbol 32-bit aligned, so the invalid | |
512 | # construct with attribute ((alias ("_ctype_b+127"))) breaks. | |
513 | newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE" | |
514 | ;; | |
8a0efa53 CF |
515 | mn10?00-*-*) |
516 | syscall_dir=syscalls | |
517 | ;; | |
0d844014 JJ |
518 | powerpc*-*-eabialtivec*) |
519 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG" | |
520 | ;; | |
936b520f JJ |
521 | powerpc*-*-eabispe*) |
522 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG" | |
523 | ;; | |
8a0efa53 CF |
524 | powerpc*-*-eabi* | \ |
525 | powerpc*-*-elf* | \ | |
526 | powerpc*-*-linux* | \ | |
527 | powerpc*-*-rtem* | \ | |
528 | powerpc*-*-sysv* | \ | |
529 | powerpc*-*-solaris*) | |
bfc27bae | 530 | newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES -DWANT_PRINTF_LONG_LONG" |
8a0efa53 CF |
531 | ;; |
532 | powerpcle-*-pe) | |
3a8fc0e4 | 533 | newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL" |
8a0efa53 CF |
534 | syscall_dir=syscalls |
535 | ;; | |
536 | sh*-*-*) | |
9f25eed9 | 537 | newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY -DWANT_PRINTF_LONG_LONG" |
8a0efa53 CF |
538 | syscall_dir=syscalls |
539 | ;; | |
540 | sparc-sun-sunos*) | |
541 | newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED" | |
542 | ;; | |
543 | sparc64-*-*) | |
3a8fc0e4 | 544 | newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_GETTIMEOFDAY -DHAVE_FCNTL" |
8a0efa53 CF |
545 | # This either belongs elsewhere or nowhere. But I need *something*, |
546 | # so for now it's here ... | |
547 | case "${host_os}" in | |
548 | aoutv8 | *32p) | |
549 | newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=32" ;; | |
550 | *) | |
551 | newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;; | |
552 | esac | |
553 | ;; | |
554 | strongarm-*-*) | |
555 | syscall_dir=syscalls | |
556 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
557 | newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | |
558 | ;; | |
0ffc3b94 NC |
559 | xscale-*-*) |
560 | syscall_dir=syscalls | |
561 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
562 | newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | |
822afa53 | 563 | newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME" |
0ffc3b94 | 564 | ;; |
8a0efa53 CF |
565 | thumb-*-pe) |
566 | syscall_dir=syscalls | |
567 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
568 | # Don't use the debugging protocols just yet. | |
569 | ;; | |
570 | thumb-*-*) | |
571 | syscall_dir=syscalls | |
572 | newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY" | |
573 | # Select which debug protocol is being used. | |
574 | # ARM_RDP_MONITOR selects the Demon monitor. | |
575 | # ARM_RDI_MONITOR selects the Angel monitor. | |
576 | # If neither are defined, then hard coded defaults will be used | |
577 | # to create the program's environment. | |
578 | # See also arm and strongarm above. | |
579 | # newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR" | |
580 | newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR" | |
581 | ;; | |
582 | tic80*) | |
583 | syscall_dir=syscalls | |
584 | ;; | |
585 | v850-*-*) | |
586 | syscall_dir=syscalls | |
587 | ;; | |
588 | v850e-*-*) | |
589 | syscall_dir=syscalls | |
590 | ;; | |
591 | v850ea-*-*) | |
592 | syscall_dir=syscalls | |
593 | ;; | |
4ecedd09 DB |
594 | frv-*-*) |
595 | syscall_dir=syscalls | |
596 | newlib_cflags="${newlib_cflags} -DWANT_PRINTF_LONG_LONG" | |
597 | ;; | |
8a0efa53 CF |
598 | w65-*-*) |
599 | syscall_dir=syscalls | |
600 | newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY" | |
601 | ;; | |
f6eff1c0 | 602 | xstormy16-*-*) |
bfc27bae TF |
603 | newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY" |
604 | syscall_dir=syscalls | |
605 | ;; | |
8a0efa53 CF |
606 | z8k-*-*) |
607 | syscall_dir=syscalls | |
608 | ;; | |
609 | *) | |
610 | newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" | |
611 | syscall_dir= | |
612 | ;; | |
613 | esac |