mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-29 02:20:21 +08:00
c023e783e9
Merge from newlib-csl-20060320-branch: 2006-08-31 Nathan Sidwell <nathan@codesourcery.com> * m68k/bdm-crt1.c: Call hardware_init_hook before copying initialized data. * m68k/Makefile.in (CF_BDM_SCRIPTS): Rename to CF_RAM_SCRIPTS. (CF_SCRIPTS): Update. (%-bdm.ld): Rename to %-ram.ld. 2006-08-25 Nathan Sidwell <nathan@codesourcery.com> * m68k/Makefile.in (DBUG_BSP, DBUG_OBJS): Remove. (BDM_CRT0): New. (BDM_OBJS): Add bdm-crt1.o. (BDM_OTHER_OBJS): Remove print.o putnum.o (CF_BOARDS): New. (CF_BDM_SCRIPTS): Generated name of ram scripts. (CF_ROM_SCRIPTS): Generated name of rom scripts. (CF_SCRIPTS): Adjust. (all): Add BDM_CRT0. (bdm-crt0.o, bdm-crt1.o): New targets. (bdm-isv.o): Remove. (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5282evb, m5329evb, m5485evb): New. (%-bdm.ld, %-rom.ld): New. Replace individual linker script rules. (install): Remove DBUG installs. * m68k/bdm-crt0.S: New. * m68k/bdm-crt1.c: New. * m68k/bdm-exit.c: Call __reset. * m68k/bdm-isv.c: Remove. * m68k/cf.sc: Adjust to produce either rom or ram images. * m68k/dbug-exit.S, m68k/dbug-inbyte.S, m68k/dbug-outbyte.S: Remove. 2006-07-24 Nathan Sidwell <nathan@codesourcery.com> Bug 844 * m68k/cf.sc: Set entry point to _start. * m68k/crt0.X (_start): New name for entrypoint (start): Weak alias for start. 2006-06-09 Nathan Sidwell <nathan@codesourcery.com> * m68k/bdm-system.c (_system): Support system(NULL). 2006-06-08 Nathan Sidwell <nathan@codesourcery.com> * m68k/bdm-system.c (_system): Properly encode non failure exit code. 2006-06-05 Nathan Sidwell <nathan@codesourcery.com> * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-inbyte.o. Add bdm-time.o. * m68k/bdm-close.c: Add copyright notice. * m68k/bdm-fstat.c: Add copyright notice. * m68k/bdm-gettimeofday.c: Add copyright notice. * m68k/bdm-inbyte.c: Remove. * m68k/bdm-isatty.c: Add copyright notice. * m68k/bdm-lseek.c: Add copyright notice. Fix &/| thinko. * m68k/bdm-open.c: Add copyright notice. * m68k/bdm-read.c: Add copyright notice. * m68k/bdm-rename.c: Add copyright notice. * m68k/bdm-stat.c: Add copyright notice. * m68k/bdm-system.c: Add copyright notice. * m68k/bdm-time.c: New. * m68k/bdm-unlink.c: Add copyright notice. * m68k/bdm-write.c: Add copyright notice. 2006-05-25 Nathan Sidwell <nathan@codesourcery.com> * m68k/Makefile.in (m52235-dbug.ld, m52235-bdm.ld): New scripts. 2006-05-24 Nathan Sidwell <nathan@codesourcery.com> * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-outbyte.o. * m68k/bdm-outbyte.c: Delete. * m68k/bdm-semihost.h (BDM_OUTBYTE): Mark as obsolete. 2006-05-22 Sandra Loosemore <sandra@codesourcery.com> * m68k/bdm-semihost.h: Add new constants for additional semihosting functions. Add new BDM_TRAP macro to encapsulate inline asm. * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro. * m68k/bdm-outbyte.c (outbyte): Ditto. * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP now called BDM_TRAPNUM. * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files containing declarations and conversion functions for GDB's fileio protocol. * m68k/bdm-close.c: New file to define corresponding function. * m68k/bdm-fstat.c: Ditto. * m68k/bdm-gettimeofday.c: Ditto. * m68k/bdm-isatty.c: Ditto. * m68k/bdm-lseek.c: Ditto. * m68k/bdm-open.c: Ditto. * m68k/bdm-read.c: Ditto. * m68k/bdm-rename.c: Ditto. * m68k/bdm-stat.c: Ditto. * m68k/bdm-system.c: Ditto. * m68k/bdm-unlink.c: Ditto. * m68k/bdm-write.c Ditto. * m68k/Makefile.in: Add dependencies for new files. 2006-03-29 Nathan Sidwell <nathan@codesourcery.com> * m68k/bdm-isv.c (software_init_hook): Fix trap numbering. * m68k/Makefile.in (CF_SCRIPTS): Add m5329 board. Reorder. (*-dbug.ld, *-bdm.ld): Add appropriate IO definition. (m5329evb-dbug.ld, m5329evb-bdm.ld): New. * cf.sc (GROUP): Revert previous change. Add IO library. * m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New. (CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485 scripts. (all): Add new targets. (BDM_BSP): New target. (bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New targets. (BDM_ISRS): New targets. (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld): Rename and adjust. (m5485evb-dbug): New. (m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld, m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New. (install): Add BDM_BSP. * m68k/bdm-exit.c: New * m68k/bdm-inbyte.c: New * m68k/bdm-outbyte.c: New * m68k/bdm-semihost.c: New * m68k/bdm-semihost.h: New * m68k/bdm-isrs.c: New. * m68k/bdm-isv.c: New. * dbug-cf.sc: Renamed to ... * cf.sc: ... here. Add bdm flexibility. Remove GROUP 2006-05-22 Sandra Loosemore <sandra@codesourcery.com> * m68k/bdm-semihost.h: Add new constants for additional semihosting functions. Add new BDM_TRAP macro to encapsulate inline asm. * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro. * m68k/bdm-outbyte.c (outbyte): Ditto. * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP now called BDM_TRAPNUM. * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files containing declarations and conversion functions for GDB's fileio protocol. * m68k/bdm-close.c: New file to define corresponding function. * m68k/bdm-fstat.c: Ditto. * m68k/bdm-gettimeofday.c: Ditto. * m68k/bdm-isatty.c: Ditto. * m68k/bdm-lseek.c: Ditto. * m68k/bdm-open.c: Ditto. * m68k/bdm-read.c: Ditto. * m68k/bdm-rename.c: Ditto. * m68k/bdm-stat.c: Ditto. * m68k/bdm-system.c: Ditto. * m68k/bdm-unlink.c: Ditto. * m68k/bdm-write.c Ditto. * m68k/Makefile.in: Add dependencies for new files. newlib/ Merge from newlib-csl-20060320-branch: 2006-05-22 Sandra Loosemore <sandra@codesourcery.com> * configure.host: Tell it we have _rename and _system when building m68k-unknown-elf.
757 lines
18 KiB
Plaintext
757 lines
18 KiB
Plaintext
# configure.host
|
|
|
|
# This shell script handles all host based configuration for newlib.
|
|
# It sets various shell variables based on the the host and the
|
|
# configuration options. You can modify this shell script without
|
|
# needing to rerun autoconf.
|
|
|
|
# This shell script should be invoked as
|
|
# . configure.host
|
|
# If it encounters an error, it will exit with a message.
|
|
|
|
# FIXME: This script is too complicated. It does things in too many
|
|
# different ways. This was taken from the old Cygnus configure script
|
|
# with only minor changes. It should be cleaned up.
|
|
|
|
# FIXME: The general approach of picking and choosing which
|
|
# directories to configure, other than machine_dir and sys_dir, is
|
|
# potentially confusing.
|
|
|
|
# It uses the following shell variables:
|
|
# host The configuration host
|
|
# host_cpu The configuration host CPU
|
|
# newlib_mb --enable-newlib-mb ("yes", "no")
|
|
# target_optspace --enable-target-optspace ("yes", "no", "")
|
|
# newlib_multithread --enable-newlib-multithread ("yes", "no", "yes")
|
|
# newlib_elix_level --enable-newlib-elix-level ("1","2","3","4") ("4")
|
|
# newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "")
|
|
# newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
|
|
|
|
# It sets the following shell variables:
|
|
# newlib_cflags Special CFLAGS to use when building
|
|
# machine_dir Subdirectory of libc/machine to configure
|
|
# sys_dir Subdirectory of libc/sys to configure
|
|
# have_sys_mach_dir Is there a machine subdirectory in sys subdirectory
|
|
# posix_dir "posix" to build libc/posix, "" otherwise
|
|
# signal_dir "signal" to build libc/signal, "" otherwise
|
|
# stdio64_dir "stdio64" to build libc/stdio64, "" otherwise
|
|
# syscall_dir "syscalls" to build libc/syscalls, "" otherwise
|
|
# unix_dir "unix" to build libc/unix, "" otherwise
|
|
# use_libtool flag: use libtool to build newlib?
|
|
# aext library extension - needed for libtool support
|
|
# oext object file extension - needed for libtool support
|
|
# lpfx library object prefix - generated when no libtool
|
|
# crt1 name of crt1 object if one is provided
|
|
# crt1_dir directory where crt1 object is found
|
|
# have_crt0 "yes"/"no" if crt0 is/isn't provided.
|
|
# "" if crt0 is provided when sys_dir is set
|
|
|
|
newlib_cflags=
|
|
libm_machine_dir=
|
|
machine_dir=
|
|
sys_dir=
|
|
posix_dir=
|
|
signal_dir=signal
|
|
stdio64_dir=
|
|
syscall_dir=
|
|
unix_dir=
|
|
mach_add_setjmp=
|
|
crt1=
|
|
crt1_dir=
|
|
have_crt0=
|
|
use_libtool=no
|
|
have_sys_mach_dir=no
|
|
default_newlib_io_long_long=no
|
|
default_newlib_io_long_double=no
|
|
default_newlib_io_pos_args=no
|
|
default_newlib_atexit_dynamic_alloc=yes
|
|
aext=a
|
|
oext=o
|
|
lpfx="lib_a-"
|
|
|
|
case "${target_optspace}:${host}" in
|
|
yes:*)
|
|
newlib_cflags="${newlib_cflags} -Os"
|
|
;;
|
|
:m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* )
|
|
newlib_cflags="${newlib_cflags} -Os"
|
|
;;
|
|
no:* | :*)
|
|
newlib_cflags="${newlib_cflags} -O2"
|
|
;;
|
|
esac
|
|
|
|
# Get the source directories to use for the CPU type.
|
|
# machine_dir should supply CPU dependent routines, such as setjmp.
|
|
# newlib_cflags is passed to gcc when compiling.
|
|
# THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
|
|
|
|
case "${host_cpu}" in
|
|
a29k)
|
|
machine_dir=a29k
|
|
;;
|
|
arc)
|
|
machine_dir=
|
|
;;
|
|
arm)
|
|
machine_dir=arm
|
|
;;
|
|
avr*)
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
|
|
;;
|
|
cris | crisv32)
|
|
machine_dir=cris
|
|
;;
|
|
crx*)
|
|
machine_dir=crx
|
|
;;
|
|
d10v*)
|
|
machine_dir=d10v
|
|
;;
|
|
d30v*)
|
|
machine_dir=d30v
|
|
;;
|
|
ep9312)
|
|
machine_dir=arm
|
|
;;
|
|
fr30)
|
|
machine_dir=fr30
|
|
;;
|
|
frv)
|
|
machine_dir=frv
|
|
;;
|
|
h8300)
|
|
machine_dir=h8300
|
|
;;
|
|
h8500)
|
|
machine_dir=h8500
|
|
;;
|
|
hppa*)
|
|
machine_dir=hppa
|
|
;;
|
|
i960)
|
|
machine_dir=i960
|
|
;;
|
|
i[34567]86)
|
|
# Don't use for these since they provide their own setjmp.
|
|
case ${host} in
|
|
*-*-sco* | *-*-cygwin*)
|
|
libm_machine_dir=i386
|
|
machine_dir=i386
|
|
;;
|
|
*)
|
|
libm_machine_dir=i386
|
|
machine_dir=i386
|
|
mach_add_setjmp=true
|
|
;;
|
|
esac
|
|
;;
|
|
ia64*)
|
|
;;
|
|
iq2000)
|
|
machine_dir=iq2000
|
|
;;
|
|
m32c)
|
|
machine_dir=m32c
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DABORT_PROVIDED -DSMALL_MEMORY"
|
|
;;
|
|
|
|
m32r*)
|
|
machine_dir=m32r
|
|
;;
|
|
|
|
m68hc11|m6811|m68hc12|m6812)
|
|
machine_dir=m68hc11
|
|
newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax"
|
|
CFLAGS="-g -Os"
|
|
;;
|
|
|
|
m68*)
|
|
machine_dir=m68k
|
|
newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
|
|
;;
|
|
m88k)
|
|
machine_dir=m88k
|
|
newlib_cflags="${newlib_cflags} -m88000"
|
|
;;
|
|
m88110)
|
|
machine_dir=m88k
|
|
newlib_cflags="${newlib_cflags} -m88110"
|
|
;;
|
|
mcore)
|
|
;;
|
|
mips*)
|
|
machine_dir=mips
|
|
;;
|
|
mmix)
|
|
;;
|
|
mn10200)
|
|
machine_dir=mn10200
|
|
;;
|
|
mn10300)
|
|
default_newlib_io_long_long="yes"
|
|
machine_dir=mn10300
|
|
;;
|
|
mt*)
|
|
machine_dir=mt
|
|
;;
|
|
or16)
|
|
;;
|
|
or32)
|
|
;;
|
|
powerpc*)
|
|
machine_dir=powerpc
|
|
;;
|
|
sh | sh64)
|
|
machine_dir=sh
|
|
;;
|
|
sparc*)
|
|
machine_dir=sparc
|
|
# FIXME: Might wish to make MALLOC_ALIGNMENT more generic.
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8"
|
|
;;
|
|
strongarm)
|
|
machine_dir=arm
|
|
;;
|
|
xscale)
|
|
machine_dir=xscale
|
|
;;
|
|
thumb)
|
|
machine_dir=arm
|
|
;;
|
|
tic4x|c4x)
|
|
machine_dir=tic4x
|
|
;;
|
|
tic80*)
|
|
machine_dir=tic80
|
|
;;
|
|
v70)
|
|
;;
|
|
v810)
|
|
;;
|
|
v850)
|
|
machine_dir=v850
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mv850 "
|
|
;;
|
|
v850e)
|
|
machine_dir=v850
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
|
|
;;
|
|
w65*)
|
|
machine_dir=w65
|
|
;;
|
|
xstormy16)
|
|
machine_dir=xstormy16
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED"
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
|
|
;;
|
|
z8k)
|
|
machine_dir=z8k
|
|
;;
|
|
spu)
|
|
machine_dir=spu
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
|
;;
|
|
*)
|
|
echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# Disable thread support if requested.
|
|
|
|
if [ "${newlib_multithread}" = "no" ] ; then
|
|
newlib_cflags="${newlib_cflags} -D__SINGLE_THREAD__"
|
|
fi
|
|
|
|
# Disable syscall support if requested.
|
|
|
|
if [ "${newlib_may_supply_syscalls}" = "no" ] ; then
|
|
newlib_cflags="${newlib_cflags} -D__NO_SYSCALLS__"
|
|
fi
|
|
|
|
# Enable multibyte support if requested or it is defaulted
|
|
# for target.
|
|
|
|
if [ "x${newlib_mb}" = "x" ]; then
|
|
case "${host}" in
|
|
i[34567]86-pc-linux-*|*-*-cygwin*)
|
|
newlib_mb=yes
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Disable printf/scanf floating-point support if requested.
|
|
|
|
if [ "${newlib_io_float}" = "no" ] ; then
|
|
newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT"
|
|
fi
|
|
|
|
# Verify if shared newlib support is allowed and set appropriate variables
|
|
# We don't want to use libtool for platforms that we are not going to
|
|
# support shared libraries. This is because it adds executable tests which
|
|
# we don't want for most embedded platforms.
|
|
case "${host}" in
|
|
i[34567]86-pc-linux-*)
|
|
use_libtool=yes
|
|
have_sys_mach_dir=yes
|
|
stdio64_dir=stdio64
|
|
oext=lo
|
|
lpfx=
|
|
aext=la ;;
|
|
*) ;; #shared library not supported for ${host}
|
|
esac
|
|
|
|
# Get the source directories to use for the host. unix_dir is set
|
|
# to unix to get some standard Unix routines. posix_dir is set to get some
|
|
# standard Posix routines. sys_dir should supply system dependent routines
|
|
# including crt0.
|
|
# THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
|
|
|
|
case "${host}" in
|
|
*-*-cygwin*)
|
|
posix_dir=posix
|
|
stdio64_dir=stdio64
|
|
;;
|
|
*-*-netware*)
|
|
signal_dir=
|
|
sys_dir=netware
|
|
;;
|
|
*-*-rtems*) # generic RTEMS support
|
|
sys_dir=rtems
|
|
# RTEMS POSIX support is all inside RTEMS
|
|
;;
|
|
a29k-*-*)
|
|
sys_dir=a29khif
|
|
signal_dir=
|
|
;;
|
|
arc-*-*)
|
|
sys_dir=arc
|
|
;;
|
|
arm-*-*)
|
|
sys_dir=arm
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
have_crt0="no"
|
|
fi
|
|
;;
|
|
crx*)
|
|
sys_dir=
|
|
;;
|
|
d10v*)
|
|
sys_dir=d10v
|
|
;;
|
|
d30v*)
|
|
sys_dir=
|
|
;;
|
|
ep9312-*-*)
|
|
sys_dir=arm
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
have_crt0="no"
|
|
fi
|
|
;;
|
|
frv*)
|
|
sys_dir=
|
|
;;
|
|
h8300-*-hms*)
|
|
sys_dir=h8300hms
|
|
;;
|
|
h8300-*-elf*)
|
|
sys_dir=h8300hms
|
|
;;
|
|
h8300-*-coff*)
|
|
sys_dir=h8300hms
|
|
;;
|
|
h8300-*-xray*)
|
|
sys_dir=h8300xray
|
|
;;
|
|
h8500-*-hms*)
|
|
sys_dir=h8500hms
|
|
;;
|
|
h8500-*-elf*)
|
|
sys_dir=h8500hms
|
|
;;
|
|
i[34567]86-*-rdos*)
|
|
sys_dir=rdos
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
i[34567]86-*-sco*)
|
|
sys_dir=sysvi386
|
|
unix_dir=unix
|
|
;;
|
|
i[34567]86-pc-linux-*)
|
|
sys_dir=linux
|
|
unix_dir=unix
|
|
posix_dir=posix
|
|
crt1=crt1.o
|
|
crt1_dir=libc/sys/${sys_dir}
|
|
gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'`
|
|
default_newlib_io_long_double="yes"
|
|
default_newlib_io_long_long="yes"
|
|
default_newlib_io_pos_args="yes"
|
|
#newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
|
|
newlib_cflags="${newlib_cflags} -Wall"
|
|
newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
|
|
newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
|
|
# --- Required when building a shared library ------------------------
|
|
newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION"
|
|
# --- The three lines below are optional ------------------------------
|
|
##newlib_cflags="${newlib_cflags} -nostdinc"
|
|
##newlib_cflags="${newlib_cflags} -I`newlib-flags --kernel-dir`/include"
|
|
##newlib_cflags="${newlib_cflags} -idirafter ${gcc_dir}include"
|
|
;;
|
|
|
|
m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*)
|
|
;;
|
|
|
|
m68k-sun-sunos*)
|
|
unix_dir=unix
|
|
;;
|
|
m8*-bug-*)
|
|
sys_dir=m88kbug
|
|
;;
|
|
mips*-dec-*)
|
|
sys_dir=decstation
|
|
;;
|
|
mmix-knuth-mmixware)
|
|
sys_dir=mmixware
|
|
;;
|
|
powerpcle-*-pe)
|
|
posix_dir=posix
|
|
;;
|
|
sh*-*)
|
|
sys_dir=sh
|
|
;;
|
|
sparc-sun-sunos*)
|
|
sys_dir=sun4
|
|
unix_dir=unix
|
|
;;
|
|
sparc64*)
|
|
sys_dir=sparc64
|
|
unix_dir=unix
|
|
;;
|
|
spu-*-*)
|
|
default_newlib_io_long_long="yes"
|
|
;;
|
|
strongarm-*-*)
|
|
sys_dir=arm
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
have_crt0="no"
|
|
fi
|
|
;;
|
|
thumb-*-*)
|
|
sys_dir=arm
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
have_crt0="no"
|
|
fi
|
|
;;
|
|
tic80*)
|
|
sys_dir=tic80
|
|
;;
|
|
v70-nec-*)
|
|
sys_dir=sysvnecv70
|
|
;;
|
|
v810-*-*)
|
|
sys_dir=sysnec810
|
|
;;
|
|
v850-*-*)
|
|
sys_dir=sysnecv850
|
|
;;
|
|
v850e-*-*)
|
|
sys_dir=sysnecv850
|
|
;;
|
|
v850ea-*-*)
|
|
sys_dir=sysnecv850
|
|
;;
|
|
w65-*-*)
|
|
sys_dir=w65
|
|
;;
|
|
xscale-*-*)
|
|
sys_dir=arm
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
have_crt0="no"
|
|
fi
|
|
;;
|
|
z8k-*-coff)
|
|
sys_dir=z8ksim
|
|
;;
|
|
esac
|
|
|
|
# Host specific flag settings -- usually for features that are not
|
|
# general enough or broad enough to be handled above.
|
|
# THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY.
|
|
|
|
case "${host}" in
|
|
*-*-cygwin*)
|
|
test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd`
|
|
export cygwin_srcdir
|
|
default_newlib_io_long_long="yes"
|
|
default_newlib_io_long_double="yes"
|
|
default_newlib_io_pos_args="yes"
|
|
CC="${CC} -I${cygwin_srcdir}/include"
|
|
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_FCNTL -DMALLOC_PROVIDED"
|
|
syscall_dir=syscalls
|
|
;;
|
|
# RTEMS supplies its own versions of some routines:
|
|
# malloc() (reentrant version)
|
|
# exit() RTEMS has a "global" reent to flush
|
|
# signal()/raise() RTEMS has its own including pthread signals
|
|
# _XYZ_r() RTEMS has its own reentrant routines
|
|
#
|
|
# NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that.
|
|
*-*-rtems*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"
|
|
;;
|
|
# VxWorks supplies its own version of malloc, and the newlib one
|
|
# doesn't work because VxWorks does not have sbrk.
|
|
*-wrs-vxworks*)
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL"
|
|
;;
|
|
# UDI doesn't have exec, so system() should fail the right way
|
|
a29k-amd-udi)
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC"
|
|
syscall_dir=syscalls
|
|
;;
|
|
arc-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
arm-*-pe)
|
|
syscall_dir=syscalls
|
|
;;
|
|
arm-*-*)
|
|
syscall_dir=syscalls
|
|
# If newlib is supplying syscalls, select which debug protocol is being used.
|
|
# ARM_RDP_MONITOR selects the Demon monitor.
|
|
# ARM_RDI_MONITOR selects the Angel monitor.
|
|
# If neither are defined, then hard coded defaults will be used
|
|
# to create the program's environment.
|
|
# If --disable-newlib-supplied-syscalls is specified, then the end-user
|
|
# may specify the protocol via gcc spec files supplied by libgloss.
|
|
# See also thumb below.
|
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
|
# newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
|
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
|
fi
|
|
;;
|
|
arc*)
|
|
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
|
|
;;
|
|
avr*)
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
cris-*-* | crisv32-*-*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -D_USE_WRITE -DCOMPACT_CTYPE"
|
|
syscall_dir=syscalls
|
|
;;
|
|
crx-*-*)
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DMISSING_SYSCALL_NAMES"
|
|
syscall_dir=
|
|
;;
|
|
d10v*)
|
|
newlib_cflags="${newlib_cflags} -DSMALL_MEMORY"
|
|
syscall_dir=syscalls
|
|
;;
|
|
d30v*)
|
|
newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
syscall_dir=
|
|
;;
|
|
ep9312-*-*)
|
|
syscall_dir=syscalls
|
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
|
fi
|
|
;;
|
|
fr30-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
frv-*-*)
|
|
syscall_dir=syscalls
|
|
default_newlib_io_long_long="yes"
|
|
;;
|
|
h8300*-*-*)
|
|
syscall_dir=syscalls
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
|
# Simulator only extensions for H8300.
|
|
# Uncomment the next line to enable them.
|
|
# newlib_cflags="${newlib_cflags} -D__SIMULATOR__"
|
|
;;
|
|
h8500-*-*)
|
|
syscall_dir=syscalls
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
|
;;
|
|
i[34567]86-*-sco*)
|
|
newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL"
|
|
;;
|
|
i[34567]86-*-netware*)
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL"
|
|
;;
|
|
iq2000*)
|
|
syscall_dir=syscalls
|
|
default_newlib_io_long_long="yes"
|
|
;;
|
|
m32r-*-*)
|
|
# Pass -msdata=sdata so _impure_ptr goes in .sdata.
|
|
# We don't generate sda relocs however for upward compatibility.
|
|
# FIXME: This is necessary because the default multilib doesn't
|
|
# use --print-multi-lib.
|
|
newlib_cflags="${newlib_cflags} -msdata=sdata"
|
|
syscall_dir=syscalls
|
|
;;
|
|
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
m68k-unknown-elf)
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
syscall_dir=
|
|
;;
|
|
mcore-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
mips64vr*-*-*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
mips*-*-elf*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
mmix-*)
|
|
syscall_dir=syscalls
|
|
# We need every symbol 32-bit aligned, so the invalid
|
|
# construct with attribute ((alias ("_ctype_b+127"))) breaks.
|
|
newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
|
|
;;
|
|
mn10?00-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
powerpc*-*-eabialtivec*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
powerpc*-*-eabispe*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
powerpc*-*-eabi* | \
|
|
powerpc*-*-elf* | \
|
|
powerpc*-*-linux* | \
|
|
powerpc*-*-rtem* | \
|
|
powerpc*-*-sysv* | \
|
|
powerpc*-*-solaris*)
|
|
default_newlib_io_long_long="yes"
|
|
newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
|
|
;;
|
|
powerpcle-*-pe)
|
|
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL"
|
|
syscall_dir=syscalls
|
|
;;
|
|
sh*-*-*)
|
|
default_newlib_io_long_long="yes"
|
|
syscall_dir=syscalls
|
|
;;
|
|
sparc-sun-sunos*)
|
|
newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
|
|
;;
|
|
sparc64-*-*)
|
|
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL"
|
|
# This either belongs elsewhere or nowhere. But I need *something*,
|
|
# so for now it's here ...
|
|
case "${host_os}" in
|
|
aoutv8 | *32p)
|
|
newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=32" ;;
|
|
*)
|
|
newlib_cflags="${newlib_cflags} -DTARGET_PTR_SIZE=64" ;;
|
|
esac
|
|
;;
|
|
strongarm-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
thumb-*-pe)
|
|
syscall_dir=syscalls
|
|
# Don't use the debugging protocols just yet.
|
|
;;
|
|
thumb-*-*)
|
|
syscall_dir=syscalls
|
|
# If newlib is supplying syscalls, select which debug protocol is being used.
|
|
# ARM_RDP_MONITOR selects the Demon monitor.
|
|
# ARM_RDI_MONITOR selects the Angel monitor.
|
|
# If neither are defined, then hard coded defaults will be used
|
|
# to create the program's environment.
|
|
# If --disable-newlib-supplied-syscalls is specified, then the end-user
|
|
# may specify the protocol via gcc spec files supplied by libgloss.
|
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
|
# newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
|
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
|
fi
|
|
;;
|
|
tic80*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
v850-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
v850e-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
v850ea-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
w65-*-*)
|
|
syscall_dir=syscalls
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
|
;;
|
|
xscale-*-*)
|
|
syscall_dir=syscalls
|
|
newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
|
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
|
fi
|
|
;;
|
|
xstormy16-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
z8k-*-*)
|
|
syscall_dir=syscalls
|
|
;;
|
|
*)
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
syscall_dir=
|
|
;;
|
|
esac
|
|
|
|
# Use defaults for certain settings if not specified by user
|
|
|
|
# Enable long long support in I/O routines if requested.
|
|
if [ "x${newlib_io_long_long}" = "x" ]; then
|
|
if [ ${default_newlib_io_long_long} = "yes" ]; then
|
|
newlib_io_long_long="yes";
|
|
fi
|
|
fi
|
|
|
|
# Enable long double support in I/O routines if requested.
|
|
if [ "x${newlib_io_long_double}" = "x" ]; then
|
|
if [ ${default_newlib_io_long_double} = "yes" ]; then
|
|
newlib_io_long_double="yes";
|
|
fi
|
|
fi
|
|
|
|
# Enable printf positional argument support if requested.
|
|
if [ "x${newlib_io_pos_args}" = "x" ]; then
|
|
if [ ${default_newlib_io_pos_args} = "yes" ]; then
|
|
newlib_io_pos_args="yes";
|
|
fi
|
|
fi
|
|
|
|
# Disable atexit dynamic allocation if requested.
|
|
if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then
|
|
if [ ${default_newlib_atexit_dynamic_alloc} = "yes" ]; then
|
|
newlib_atexit_dynamic_alloc="yes";
|
|
fi
|
|
fi
|
|
|
|
if test -z "${have_crt0}" && test -n "${sys_dir}"; then
|
|
have_crt0="yes"
|
|
fi
|