2000-02-18 03:39:52 +08:00
|
|
|
# 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", "")
|
2002-09-21 01:11:29 +08:00
|
|
|
# newlib_multithread --enable-newlib-multithread ("yes", "no", "yes")
|
|
|
|
# newlib_elix_level --enable-newlib-elix-level ("1","2","3","4") ("4")
|
2007-05-12 04:09:00 +08:00
|
|
|
# newlib_io_c99_formats --enable-newlib-io-c99-formats ("yes", "no", "")
|
2004-05-26 08:19:14 +08:00
|
|
|
# newlib_io_long_long --enable-newlib-io-long-long ("yes", "no", "")
|
|
|
|
# newlib_io_long_double --enable-newlib-io-long-double ("yes", "no", "")
|
2018-04-14 03:42:37 +08:00
|
|
|
# newlib_global_stdio_streams --enable-global-stdio-streams ("yes", "no, "")
|
2018-09-01 00:44:33 +08:00
|
|
|
# newlib_fno_builtin --disable-newlib-fno-builtin ("yes", "no, "")
|
2019-10-08 03:29:33 +08:00
|
|
|
# newlib_reent_check_verify --enable-newlib-reent-check-verify ("yes", "no, "")
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
# It sets the following shell variables:
|
|
|
|
# newlib_cflags Special CFLAGS to use when building
|
|
|
|
# machine_dir Subdirectory of libc/machine to configure
|
2021-03-24 17:32:50 +08:00
|
|
|
# shared_machine_dir Subdirectory of libc/machine for files shared
|
|
|
|
# between specific architectures, optional
|
2000-02-18 03:39:52 +08:00
|
|
|
# sys_dir Subdirectory of libc/sys to configure
|
2002-05-01 02:23:40 +08:00
|
|
|
# have_sys_mach_dir Is there a machine subdirectory in sys subdirectory
|
2000-02-18 03:39:52 +08:00
|
|
|
# posix_dir "posix" to build libc/posix, "" otherwise
|
|
|
|
# signal_dir "signal" to build libc/signal, "" otherwise
|
2002-07-20 04:36:09 +08:00
|
|
|
# stdio64_dir "stdio64" to build libc/stdio64, "" otherwise
|
2000-02-18 03:39:52 +08:00
|
|
|
# syscall_dir "syscalls" to build libc/syscalls, "" otherwise
|
|
|
|
# unix_dir "unix" to build libc/unix, "" otherwise
|
2001-12-14 07:50:11 +08:00
|
|
|
# use_libtool flag: use libtool to build newlib?
|
|
|
|
# aext library extension - needed for libtool support
|
|
|
|
# oext object file extension - needed for libtool support
|
2006-04-12 03:02:16 +08:00
|
|
|
# lpfx library object prefix - generated when no libtool
|
2002-04-05 06:41:11 +08:00
|
|
|
# crt1 name of crt1 object if one is provided
|
|
|
|
# crt1_dir directory where crt1 object is found
|
2005-09-01 04:39:43 +08:00
|
|
|
# have_crt0 "yes"/"no" if crt0 is/isn't provided.
|
|
|
|
# "" if crt0 is provided when sys_dir is set
|
2018-07-27 16:11:44 +08:00
|
|
|
# have_init_fini have init/fini ("yes" or "no", set to "yes" by default)
|
2011-01-13 06:24:06 +08:00
|
|
|
# noinclude list of include files to not install
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
newlib_cflags=
|
2001-12-14 07:50:11 +08:00
|
|
|
libm_machine_dir=
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=
|
2021-03-24 17:32:50 +08:00
|
|
|
shared_machine_dir=
|
2000-02-18 03:39:52 +08:00
|
|
|
sys_dir=
|
|
|
|
posix_dir=
|
|
|
|
signal_dir=signal
|
2007-02-01 03:34:38 +08:00
|
|
|
stdio_dir=stdio
|
2002-07-18 07:25:44 +08:00
|
|
|
stdio64_dir=
|
2010-03-02 20:05:18 +08:00
|
|
|
xdr_dir=
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=
|
|
|
|
unix_dir=
|
2011-01-13 06:24:06 +08:00
|
|
|
noinclude=
|
2000-02-18 03:39:52 +08:00
|
|
|
mach_add_setjmp=
|
2002-04-05 06:41:11 +08:00
|
|
|
crt1=
|
|
|
|
crt1_dir=
|
2005-09-01 04:39:43 +08:00
|
|
|
have_crt0=
|
2018-07-27 16:11:44 +08:00
|
|
|
have_init_fini=yes
|
2001-12-14 07:50:11 +08:00
|
|
|
use_libtool=no
|
2002-04-04 06:46:21 +08:00
|
|
|
have_sys_mach_dir=no
|
2007-05-12 04:09:00 +08:00
|
|
|
default_newlib_io_c99_formats=no
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long=no
|
|
|
|
default_newlib_io_long_double=no
|
|
|
|
default_newlib_io_pos_args=no
|
2006-03-22 04:02:13 +08:00
|
|
|
default_newlib_atexit_dynamic_alloc=yes
|
2014-06-10 11:09:35 +08:00
|
|
|
default_newlib_nano_malloc=no
|
2020-01-22 03:54:49 +08:00
|
|
|
default_newlib_reent_check_verify=yes
|
2001-12-14 07:50:11 +08:00
|
|
|
aext=a
|
|
|
|
oext=o
|
2006-04-12 03:02:16 +08:00
|
|
|
lpfx="lib_a-"
|
2018-04-14 03:42:37 +08:00
|
|
|
newlib_msg_warn=
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
case "${target_optspace}:${host}" in
|
|
|
|
yes:*)
|
|
|
|
newlib_cflags="${newlib_cflags} -Os"
|
|
|
|
;;
|
2018-03-12 04:23:26 +08:00
|
|
|
:m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :pru-* | :rl78-* )
|
2000-02-18 03:39:52 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -Os"
|
|
|
|
;;
|
|
|
|
no:* | :*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2018-09-01 00:44:33 +08:00
|
|
|
case "${newlib_fno_builtin}:${host}" in
|
|
|
|
yes:*)
|
|
|
|
newlib_cflags="${newlib_cflags} -fno-builtin"
|
|
|
|
;;
|
|
|
|
no:*)
|
|
|
|
newlib_cflags="${newlib_cflags}"
|
|
|
|
;;
|
|
|
|
*:*)
|
|
|
|
# For now, all targets default to using -fno-builtin until tested without
|
|
|
|
newlib_cflags="${newlib_cflags} -fno-builtin"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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
|
|
|
|
;;
|
2012-09-27 04:06:50 +08:00
|
|
|
aarch64*)
|
|
|
|
machine_dir=aarch64
|
|
|
|
libm_machine_dir=aarch64
|
|
|
|
;;
|
2019-01-15 23:36:50 +08:00
|
|
|
amdgcn*)
|
|
|
|
newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__"
|
|
|
|
machine_dir=amdgcn
|
2019-06-08 01:55:43 +08:00
|
|
|
libc_cv_initfinit_array=yes
|
2019-01-15 23:36:50 +08:00
|
|
|
;;
|
2015-10-24 02:24:50 +08:00
|
|
|
arc*)
|
|
|
|
machine_dir=arc
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2012-02-23 17:30:19 +08:00
|
|
|
arm*)
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=arm
|
2012-12-05 05:43:21 +08:00
|
|
|
libm_machine_dir=arm
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2000-06-28 03:51:33 +08:00
|
|
|
avr*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -mcall-prologues"
|
|
|
|
;;
|
2006-11-09 03:26:43 +08:00
|
|
|
bfin)
|
|
|
|
machine_dir=bfin
|
|
|
|
;;
|
2010-12-03 03:30:47 +08:00
|
|
|
cr16*)
|
|
|
|
machine_dir=cr16
|
|
|
|
;;
|
2005-01-27 Hans-Peter Nilsson <hp@axis.com>
* configure.host: Add support for cris-*-* and crisv32-*-*.
* libc/include/machine/ieeefp.h: Ditto.
* libc/include/machine/setjmp.h: Ditto.
* libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
files.
2005-01-28 07:54:46 +08:00
|
|
|
cris | crisv32)
|
2018-09-13 23:48:48 +08:00
|
|
|
# The size of the (kernel_)time_t passed from or to a
|
|
|
|
# simulator or a Linux kernel is mandated by the
|
|
|
|
# gettimeofday and time system calls and fixed to 32 bits, the
|
|
|
|
# size of a long. Instead of churning as 64 bits what is anyway
|
|
|
|
# 32 bits, it makes more sense to default to long.
|
|
|
|
test -z "${enable_newlib_long_time_t}" && newlib_long_time_t=yes
|
2005-01-27 Hans-Peter Nilsson <hp@axis.com>
* configure.host: Add support for cris-*-* and crisv32-*-*.
* libc/include/machine/ieeefp.h: Ditto.
* libc/include/machine/setjmp.h: Ditto.
* libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
files.
2005-01-28 07:54:46 +08:00
|
|
|
machine_dir=cris
|
|
|
|
;;
|
2004-10-06 03:44:24 +08:00
|
|
|
crx*)
|
|
|
|
machine_dir=crx
|
|
|
|
;;
|
2020-09-24 03:06:09 +08:00
|
|
|
csky*)
|
|
|
|
machine_dir=csky
|
|
|
|
default_newlib_atexit_dynamic_alloc="no"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
d10v*)
|
|
|
|
machine_dir=d10v
|
|
|
|
;;
|
|
|
|
d30v*)
|
|
|
|
machine_dir=d30v
|
|
|
|
;;
|
2012-02-22 06:34:31 +08:00
|
|
|
epiphany)
|
|
|
|
machine_dir=epiphany
|
|
|
|
;;
|
2006-12-19 05:49:14 +08:00
|
|
|
fido)
|
|
|
|
machine_dir=m68k
|
|
|
|
newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
fr30)
|
|
|
|
machine_dir=fr30
|
|
|
|
;;
|
2003-02-21 03:14:12 +08:00
|
|
|
frv)
|
|
|
|
machine_dir=frv
|
|
|
|
;;
|
2015-09-05 01:17:53 +08:00
|
|
|
ft32*)
|
|
|
|
machine_dir=ft32
|
2015-09-23 06:11:01 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
|
2015-09-05 01:17:53 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
h8300)
|
|
|
|
machine_dir=h8300
|
|
|
|
;;
|
|
|
|
h8500)
|
|
|
|
machine_dir=h8500
|
|
|
|
;;
|
|
|
|
hppa*)
|
|
|
|
machine_dir=hppa
|
|
|
|
;;
|
|
|
|
i960)
|
|
|
|
machine_dir=i960
|
|
|
|
;;
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86)
|
2021-03-24 17:35:28 +08:00
|
|
|
libm_machine_dir=i386
|
|
|
|
machine_dir=i386
|
|
|
|
shared_machine_dir=shared_x86
|
2000-02-18 03:39:52 +08:00
|
|
|
# Don't use for these since they provide their own setjmp.
|
|
|
|
case ${host} in
|
2002-12-20 10:29:00 +08:00
|
|
|
*-*-sco* | *-*-cygwin*)
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
mach_add_setjmp=true
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
2000-05-11 10:28:06 +08:00
|
|
|
ia64*)
|
|
|
|
;;
|
2003-06-10 23:32:27 +08:00
|
|
|
iq2000)
|
|
|
|
machine_dir=iq2000
|
|
|
|
;;
|
2008-12-12 04:05:38 +08:00
|
|
|
lm32)
|
|
|
|
machine_dir=lm32
|
|
|
|
;;
|
2005-08-11 04:35:13 +08:00
|
|
|
m32c)
|
2014-07-27 22:37:10 +08:00
|
|
|
machine_dir=m32c
|
2009-09-23 05:23:13 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
|
2005-08-11 04:35:13 +08:00
|
|
|
;;
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
m32r*)
|
|
|
|
machine_dir=m32r
|
|
|
|
;;
|
2002-07-24 23:44:24 +08:00
|
|
|
|
|
|
|
m68hc11|m6811|m68hc12|m6812)
|
|
|
|
machine_dir=m68hc11
|
|
|
|
newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os -mrelax"
|
|
|
|
CFLAGS="-g -Os"
|
|
|
|
;;
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
m68*)
|
|
|
|
machine_dir=m68k
|
2002-02-20 08:47:07 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DCOMPACT_CTYPE"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
m88k)
|
|
|
|
machine_dir=m88k
|
|
|
|
newlib_cflags="${newlib_cflags} -m88000"
|
|
|
|
;;
|
|
|
|
m88110)
|
|
|
|
machine_dir=m88k
|
|
|
|
newlib_cflags="${newlib_cflags} -m88110"
|
|
|
|
;;
|
|
|
|
mcore)
|
|
|
|
;;
|
2013-07-16 15:48:53 +08:00
|
|
|
microblaze*)
|
2009-09-28 Michael Eager <eager@eagercon.com>
* configure.host: Add microblaze.
* libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
* libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
* libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
_UNIX98_THREAD_MUTEX_ATTRIBUTES.
* libc/include/sys/types.h: Treat XMK like rtems, define
PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
* libc/machine/configure.in: Add microblaze.
* libc/machine/configure: Add microblaze (not regenerated).
* libc/machine/microblaze/configure.in: NEW.
* libc/machine/microblaze/configure: Generate.
* libc/machine/microblaze/Makefile.am: NEW.
* libc/machine/microblaze/Makefile.in: Generate.
* libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
mallocr.c, longjmp.S, setjmp.S}: NEW.
* libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
mALLOc(): return malloc value.
2009-09-29 00:42:21 +08:00
|
|
|
machine_dir=microblaze
|
|
|
|
;;
|
2007-11-08 05:42:24 +08:00
|
|
|
mep)
|
|
|
|
machine_dir=mep
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
mips*)
|
|
|
|
machine_dir=mips
|
2020-07-03 05:13:06 +08:00
|
|
|
libm_machine_dir=mips
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
* libc/include/machine/ieeefp.h: Add support for mmix target.
* libc/include/machine/setjmp.h: Ditto.
* configure.host: Ditto.
* libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
* libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
libc/sys/mmixware/aclocal.m4: Generate.
2001-11-13 05:04:41 +08:00
|
|
|
mmix)
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
mn10200)
|
|
|
|
machine_dir=mn10200
|
|
|
|
;;
|
|
|
|
mn10300)
|
2005-05-13 06:10:26 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=mn10300
|
|
|
|
;;
|
2009-04-23 03:52:49 +08:00
|
|
|
moxie)
|
|
|
|
machine_dir=moxie
|
|
|
|
;;
|
2013-05-14 05:39:51 +08:00
|
|
|
msp430*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
|
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
|
|
|
newlib_cflags="${newlib_cflags} -mOs "
|
2014-11-21 19:55:39 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -mhwmult=none "
|
2013-05-14 05:39:51 +08:00
|
|
|
machine_dir=msp430
|
2014-06-10 11:09:35 +08:00
|
|
|
default_newlib_nano_malloc="yes"
|
2013-05-14 05:39:51 +08:00
|
|
|
;;
|
2005-12-12 19:25:07 +08:00
|
|
|
mt*)
|
2006-04-14 03:56:32 +08:00
|
|
|
machine_dir=mt
|
|
|
|
;;
|
2013-07-10 03:06:47 +08:00
|
|
|
nds32*)
|
|
|
|
machine_dir=nds32
|
2014-12-15 21:27:38 +08:00
|
|
|
libm_machine_dir=nds32
|
2013-07-10 03:06:47 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections"
|
2014-12-15 21:27:38 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME"
|
2013-07-10 03:06:47 +08:00
|
|
|
;;
|
2013-05-07 02:23:09 +08:00
|
|
|
nios2*)
|
|
|
|
machine_dir=nios2
|
|
|
|
;;
|
2018-04-14 03:42:37 +08:00
|
|
|
nvptx*)
|
|
|
|
machine_dir=nvptx
|
nvptx: Emulate clock and other machine stubs.
This patch to the libc/machine/nvptx port of newlib implements an
approximation of "clock" and provides some additional stub routines.
These changes not only reduce the number of (link) failures in the GCC
testsuite when targeting nvptx-none, but also allow the NIST scimark4
benchmark to compile and run without modification.
newlib already contains support for backends to provide their own
clock implementations via -DCLOCK_PROVIDED. That functionality is
used here to return an approximate elapsed time based on the NVidia
GPU's clock64 cycle counter. Although not great, this is better than
the current behaviour of link error from the unresolved symbol
_times_r.
The other part of the patch is to add a small number of stub functions
to nvptx's misc.c. Adding isatty, for example, resolves linking
problems in libc from the dependency in __smakebuf_r, and the sync
stub, for example, fixes the failure with GCC's
testsuite/gfortran.dg/ISO_Fortran_binding_14.f90 [which simply tests
that gfortran can call a/any C function].
newlib/
configure.host: Add -DCLOCK_PROVIDED to newlib_cflags on nvptx*.
newlib/libc/machine/nvptx
Makefile.am: Add clock.c to lib_a_SOURCES.
clock.c: New source file to implement/approximate clock().
misc.c: Add stubs for fstat, isatty, open, sync and unlink.
2021-08-25 00:24:19 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED"
|
2018-04-14 03:42:37 +08:00
|
|
|
;;
|
2014-12-13 05:14:06 +08:00
|
|
|
or1k*|or1knd*)
|
2014-07-18 02:43:05 +08:00
|
|
|
machine_dir=or1k
|
2018-11-03 06:00:02 +08:00
|
|
|
have_init_fini=no
|
2000-12-05 02:15:35 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
powerpc*)
|
|
|
|
machine_dir=powerpc
|
2020-06-03 00:41:40 +08:00
|
|
|
libm_machine_dir=powerpc
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2018-03-12 04:23:26 +08:00
|
|
|
pru*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
|
|
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC"
|
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_MEMORY"
|
2021-05-09 21:11:36 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
2018-03-12 04:23:26 +08:00
|
|
|
default_newlib_nano_malloc="yes"
|
|
|
|
default_newlib_atexit_dynamic_alloc="no"
|
|
|
|
machine_dir=pru
|
2018-03-12 04:15:05 +08:00
|
|
|
libm_machine_dir=pru
|
2018-03-12 04:23:26 +08:00
|
|
|
;;
|
2017-07-27 16:44:22 +08:00
|
|
|
riscv*)
|
|
|
|
libm_machine_dir=riscv
|
|
|
|
machine_dir=riscv
|
2017-12-27 04:24:45 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_NANOSLEEP"
|
2017-07-27 16:44:22 +08:00
|
|
|
default_newlib_atexit_dynamic_alloc="no"
|
2018-07-27 16:11:44 +08:00
|
|
|
have_init_fini=no
|
2017-07-27 16:44:22 +08:00
|
|
|
;;
|
2011-11-29 14:33:49 +08:00
|
|
|
rl78)
|
|
|
|
machine_dir=rl78
|
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
|
2013-12-20 18:27:49 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
2011-11-29 14:33:49 +08:00
|
|
|
;;
|
2009-10-26 18:05:23 +08:00
|
|
|
rx)
|
|
|
|
machine_dir=rx
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
|
|
|
;;
|
2002-02-08 15:11:13 +08:00
|
|
|
sh | sh64)
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=sh
|
|
|
|
;;
|
|
|
|
sparc*)
|
2020-07-03 05:13:05 +08:00
|
|
|
libm_machine_dir=sparc
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=sparc
|
|
|
|
# FIXME: Might wish to make MALLOC_ALIGNMENT more generic.
|
|
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_ALIGNMENT=8"
|
|
|
|
;;
|
2004-02-03 00:59:53 +08:00
|
|
|
tic4x|c4x)
|
|
|
|
machine_dir=tic4x
|
|
|
|
;;
|
2010-10-09 10:33:30 +08:00
|
|
|
tic6x)
|
|
|
|
machine_dir=tic6x
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
tic80*)
|
|
|
|
machine_dir=tic80
|
|
|
|
;;
|
|
|
|
v70)
|
|
|
|
;;
|
|
|
|
v810)
|
|
|
|
;;
|
2010-07-24 02:11:27 +08:00
|
|
|
v850*)
|
2000-02-18 03:39:52 +08:00
|
|
|
machine_dir=v850
|
2003-08-01 00:21:20 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2015-01-22 02:27:47 +08:00
|
|
|
visium)
|
|
|
|
machine_dir=visium
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
w65*)
|
|
|
|
machine_dir=w65
|
|
|
|
;;
|
2007-08-29 05:56:50 +08:00
|
|
|
x86_64)
|
|
|
|
machine_dir=x86_64
|
2019-10-09 04:57:37 +08:00
|
|
|
libm_machine_dir=x86_64
|
2021-03-24 17:35:28 +08:00
|
|
|
shared_machine_dir=shared_x86
|
2007-08-29 05:56:50 +08:00
|
|
|
;;
|
2009-12-11 01:12:11 +08:00
|
|
|
xc16x*)
|
2013-12-20 18:27:49 +08:00
|
|
|
machine_dir=xc16x
|
|
|
|
;;
|
2001-12-23 06:47:58 +08:00
|
|
|
xstormy16)
|
|
|
|
machine_dir=xstormy16
|
2002-02-02 02:00:41 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED"
|
2004-07-07 16:15:26 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
|
2001-12-23 06:47:58 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
z8k)
|
|
|
|
machine_dir=z8k
|
|
|
|
;;
|
2006-08-17 05:39:43 +08:00
|
|
|
spu)
|
2007-02-02 00:33:05 +08:00
|
|
|
stdio_dir=
|
2007-02-15 07:18:25 +08:00
|
|
|
libm_machine_dir=spu
|
2006-08-17 05:39:43 +08:00
|
|
|
machine_dir=spu
|
2008-04-02 02:58:07 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_POSIX_MODE"
|
|
|
|
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
2006-08-17 05:39:43 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
*)
|
|
|
|
echo '***' "Newlib does not support CPU ${host_cpu}" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2002-05-09 04:35:16 +08:00
|
|
|
# Disable thread support if requested.
|
|
|
|
|
|
|
|
if [ "${newlib_multithread}" = "no" ] ; then
|
|
|
|
newlib_cflags="${newlib_cflags} -D__SINGLE_THREAD__"
|
|
|
|
fi
|
|
|
|
|
2003-02-08 12:30:58 +08:00
|
|
|
# Disable syscall support if requested.
|
|
|
|
|
|
|
|
if [ "${newlib_may_supply_syscalls}" = "no" ] ; then
|
|
|
|
newlib_cflags="${newlib_cflags} -D__NO_SYSCALLS__"
|
|
|
|
fi
|
|
|
|
|
2002-09-12 02:36:55 +08:00
|
|
|
# Enable multibyte support if requested or it is defaulted
|
|
|
|
# for target.
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-09-12 02:36:55 +08:00
|
|
|
if [ "x${newlib_mb}" = "x" ]; then
|
|
|
|
case "${host}" in
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-pc-linux-*|*-*-cygwin*)
|
2002-09-12 02:36:55 +08:00
|
|
|
newlib_mb=yes
|
2002-09-21 01:11:29 +08:00
|
|
|
;;
|
2002-09-12 02:36:55 +08:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2002-02-28 07:56:24 +08:00
|
|
|
# Disable printf/scanf floating-point support if requested.
|
|
|
|
|
|
|
|
if [ "${newlib_io_float}" = "no" ] ; then
|
|
|
|
newlib_cflags="${newlib_cflags} -DNO_FLOATING_POINT"
|
|
|
|
fi
|
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
# 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
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-pc-linux-*)
|
2001-12-14 07:50:11 +08:00
|
|
|
use_libtool=yes
|
2002-04-04 06:46:21 +08:00
|
|
|
have_sys_mach_dir=yes
|
2002-07-18 07:25:44 +08:00
|
|
|
stdio64_dir=stdio64
|
2001-12-14 07:50:11 +08:00
|
|
|
oext=lo
|
2006-04-12 03:02:16 +08:00
|
|
|
lpfx=
|
2001-12-14 07:50:11 +08:00
|
|
|
aext=la ;;
|
|
|
|
*) ;; #shared library not supported for ${host}
|
|
|
|
esac
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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
|
2003-03-08 04:41:49 +08:00
|
|
|
stdio64_dir=stdio64
|
2010-03-02 20:05:18 +08:00
|
|
|
xdr_dir=xdr
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
*-*-netware*)
|
|
|
|
signal_dir=
|
|
|
|
sys_dir=netware
|
|
|
|
;;
|
2016-05-10 03:23:58 +08:00
|
|
|
*-*-phoenix*)
|
|
|
|
sys_dir=phoenix
|
|
|
|
posix_dir=posix
|
|
|
|
unix_dir=unix
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
*-*-rtems*) # generic RTEMS support
|
|
|
|
sys_dir=rtems
|
2008-11-18 06:08:05 +08:00
|
|
|
posix_dir=posix
|
2008-11-28 04:50:31 +08:00
|
|
|
unix_dir=unix
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2014-04-05 05:40:59 +08:00
|
|
|
*-*-tirtos*)
|
|
|
|
sys_dir=tirtos
|
|
|
|
have_crt0="no"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
a29k-*-*)
|
|
|
|
sys_dir=a29khif
|
|
|
|
signal_dir=
|
|
|
|
;;
|
2018-10-02 05:16:40 +08:00
|
|
|
aarch64*-*-*)
|
|
|
|
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
|
|
|
|
;;
|
2019-01-15 23:36:50 +08:00
|
|
|
amdgcn*)
|
|
|
|
sys_dir=amdgcn
|
|
|
|
have_crt0="no"
|
|
|
|
;;
|
2012-02-23 17:30:19 +08:00
|
|
|
arm*-*-*)
|
2018-02-12 19:23:41 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
|
2005-09-01 04:39:43 +08:00
|
|
|
sys_dir=arm
|
|
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
|
|
have_crt0="no"
|
2004-06-10 03:05:09 +08:00
|
|
|
fi
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2006-11-09 03:26:43 +08:00
|
|
|
bfin-*-*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2010-12-03 03:30:47 +08:00
|
|
|
cr16-*-*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2004-10-06 03:44:24 +08:00
|
|
|
crx*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
d10v*)
|
|
|
|
sys_dir=d10v
|
|
|
|
;;
|
|
|
|
d30v*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2012-02-22 06:34:31 +08:00
|
|
|
epiphany-*-*)
|
|
|
|
sys_dir=epiphany
|
|
|
|
# crt0 is provided by libgloss.
|
|
|
|
have_crt0="no"
|
|
|
|
;;
|
2004-06-10 03:05:09 +08:00
|
|
|
frv*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2015-09-05 01:17:53 +08:00
|
|
|
ft32*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
h8300-*-hms*)
|
|
|
|
sys_dir=h8300hms
|
|
|
|
;;
|
2001-08-29 21:26:32 +08:00
|
|
|
h8300-*-elf*)
|
|
|
|
sys_dir=h8300hms
|
|
|
|
;;
|
2002-05-22 02:20:18 +08:00
|
|
|
h8300-*-coff*)
|
|
|
|
sys_dir=h8300hms
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
h8300-*-xray*)
|
|
|
|
sys_dir=h8300xray
|
|
|
|
;;
|
|
|
|
h8500-*-hms*)
|
|
|
|
sys_dir=h8500hms
|
|
|
|
;;
|
2001-08-29 21:26:32 +08:00
|
|
|
h8500-*-elf*)
|
|
|
|
sys_dir=h8500hms
|
|
|
|
;;
|
2006-01-31 Leif Ekblad <leif@rdos.net>
* configure.host: RDOS support added
* libc/include/sys/config.h: Ditto.
* libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
* libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
* libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
* libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
* libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
* libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
* libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
* libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
* libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
* libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
* libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
* libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
* libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
* libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
* libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
* libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
* libc/sys/rdos/write.c: Ditto.
2006-02-01 03:33:56 +08:00
|
|
|
i[34567]86-*-rdos*)
|
|
|
|
sys_dir=rdos
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
2016-02-27 01:52:46 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_I386MACH_DISABLE_HW_INTERRUPTS"
|
2006-01-31 Leif Ekblad <leif@rdos.net>
* configure.host: RDOS support added
* libc/include/sys/config.h: Ditto.
* libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
* libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
* libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
* libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
* libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
* libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
* libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
* libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
* libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
* libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
* libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
* libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
* libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
* libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
* libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
* libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
* libc/sys/rdos/write.c: Ditto.
2006-02-01 03:33:56 +08:00
|
|
|
;;
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-*-sco*)
|
2000-02-18 03:39:52 +08:00
|
|
|
sys_dir=sysvi386
|
|
|
|
unix_dir=unix
|
|
|
|
;;
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-pc-linux-*)
|
2000-12-09 09:20:32 +08:00
|
|
|
sys_dir=linux
|
|
|
|
unix_dir=unix
|
|
|
|
posix_dir=posix
|
2002-04-05 06:41:11 +08:00
|
|
|
crt1=crt1.o
|
|
|
|
crt1_dir=libc/sys/${sys_dir}
|
2000-12-09 09:20:32 +08:00
|
|
|
gcc_dir=`gcc -print-search-dirs | awk '/^install:/{print $2}'`
|
2007-05-12 04:09:00 +08:00
|
|
|
default_newlib_io_c99_formats="yes"
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_double="yes"
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
default_newlib_io_pos_args="yes"
|
2000-12-09 09:20:32 +08:00
|
|
|
#newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
|
|
|
|
newlib_cflags="${newlib_cflags} -Wall"
|
2003-11-08 07:47:05 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
|
2008-03-08 02:16:35 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_GETOPT"
|
2013-10-02 02:08:46 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_NO_POSIX_SPAWN"
|
2001-12-14 07:50:11 +08:00
|
|
|
# --- Required when building a shared library ------------------------
|
2000-12-09 09:20:32 +08:00
|
|
|
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"
|
|
|
|
;;
|
2002-08-23 09:56:05 +08:00
|
|
|
|
2002-07-24 23:44:24 +08:00
|
|
|
m68hc11-*-*|m6811-*-*|m6812-*-*|m68hc12-*-*)
|
|
|
|
;;
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
m68k-sun-sunos*)
|
|
|
|
unix_dir=unix
|
|
|
|
;;
|
|
|
|
m8*-bug-*)
|
|
|
|
sys_dir=m88kbug
|
|
|
|
;;
|
2007-11-08 05:42:24 +08:00
|
|
|
mep-*-*)
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
;;
|
2013-07-16 15:48:53 +08:00
|
|
|
microblaze*-*-*)
|
2009-09-28 Michael Eager <eager@eagercon.com>
* configure.host: Add microblaze.
* libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
* libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
* libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
_UNIX98_THREAD_MUTEX_ATTRIBUTES.
* libc/include/sys/types.h: Treat XMK like rtems, define
PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
* libc/machine/configure.in: Add microblaze.
* libc/machine/configure: Add microblaze (not regenerated).
* libc/machine/microblaze/configure.in: NEW.
* libc/machine/microblaze/configure: Generate.
* libc/machine/microblaze/Makefile.am: NEW.
* libc/machine/microblaze/Makefile.in: Generate.
* libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
mallocr.c, longjmp.S, setjmp.S}: NEW.
* libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
mALLOc(): return malloc value.
2009-09-29 00:42:21 +08:00
|
|
|
machine_dir=microblaze
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
mips*-dec-*)
|
|
|
|
sys_dir=decstation
|
|
|
|
;;
|
2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
* libc/include/machine/ieeefp.h: Add support for mmix target.
* libc/include/machine/setjmp.h: Ditto.
* configure.host: Ditto.
* libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
* libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
libc/sys/mmixware/aclocal.m4: Generate.
2001-11-13 05:04:41 +08:00
|
|
|
mmix-knuth-mmixware)
|
|
|
|
sys_dir=mmixware
|
|
|
|
;;
|
2009-04-23 03:52:49 +08:00
|
|
|
moxie*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2013-05-07 02:23:09 +08:00
|
|
|
nios2*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2015-01-20 17:59:40 +08:00
|
|
|
or1k-*-elf | or1knd-*-elf)
|
|
|
|
sys_dir=or1k
|
|
|
|
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED "
|
|
|
|
have_crt0="no"
|
2014-07-18 02:43:05 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
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
|
|
|
|
;;
|
2006-08-17 05:39:43 +08:00
|
|
|
spu-*-*)
|
|
|
|
default_newlib_io_long_long="yes"
|
2007-02-21 05:02:36 +08:00
|
|
|
default_newlib_atexit_dynamic_alloc="no"
|
2006-08-17 05:39:43 +08:00
|
|
|
;;
|
2010-10-09 10:33:30 +08:00
|
|
|
tic6x*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
have_crt0="no"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
tic80*)
|
|
|
|
sys_dir=tic80
|
|
|
|
;;
|
|
|
|
v70-nec-*)
|
|
|
|
sys_dir=sysvnecv70
|
|
|
|
;;
|
|
|
|
v810-*-*)
|
|
|
|
sys_dir=sysnec810
|
|
|
|
;;
|
2010-07-24 02:11:27 +08:00
|
|
|
v850*-*-*)
|
2000-02-18 03:39:52 +08:00
|
|
|
sys_dir=sysnecv850
|
2010-07-24 02:11:27 +08:00
|
|
|
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
|
|
|
|
have_crt0="no"
|
|
|
|
fi
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2015-01-22 02:27:47 +08:00
|
|
|
visium-*-*)
|
|
|
|
sys_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
w65-*-*)
|
|
|
|
sys_dir=w65
|
|
|
|
;;
|
|
|
|
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*)
|
2003-07-26 00:06:01 +08:00
|
|
|
test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd`
|
|
|
|
export cygwin_srcdir
|
2007-05-12 04:09:00 +08:00
|
|
|
default_newlib_io_c99_formats="yes"
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
default_newlib_io_long_double="yes"
|
|
|
|
default_newlib_io_pos_args="yes"
|
2005-03-24 01:09:29 +08:00
|
|
|
CC="${CC} -I${cygwin_srcdir}/include"
|
2017-10-11 20:57:44 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DGETREENT_PROVIDED -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED"
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2016-05-10 03:23:58 +08:00
|
|
|
*-*-phoenix*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_NANOSLEEP"
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2008-12-13 01:07:37 +08:00
|
|
|
default_newlib_io_c99_formats="yes"
|
2018-10-08 20:29:08 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
|
2010-11-17 01:14:11 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
|
2017-10-11 20:57:44 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DGETREENT_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
|
2008-11-28 04:50:31 +08:00
|
|
|
# turn off unsupported items in posix directory
|
2013-10-02 02:08:46 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
# VxWorks supplies its own version of malloc, and the newlib one
|
|
|
|
# doesn't work because VxWorks does not have sbrk.
|
|
|
|
*-wrs-vxworks*)
|
2001-02-22 07:11:06 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2014-04-05 05:40:59 +08:00
|
|
|
# TIRTOS supplies its own version of malloc
|
|
|
|
*-*-tirtos*)
|
|
|
|
newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__ -DMALLOC_PROVIDED"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
# UDI doesn't have exec, so system() should fail the right way
|
|
|
|
a29k-amd-udi)
|
|
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC"
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2012-09-27 04:06:50 +08:00
|
|
|
aarch64*-*-*)
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2015-10-24 02:24:50 +08:00
|
|
|
arc*-*-*)
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
2015-10-24 02:24:50 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2012-02-23 17:30:19 +08:00
|
|
|
arm*-*-pe)
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2012-02-23 17:30:19 +08:00
|
|
|
arm*-*-*)
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
2004-06-10 03:05:09 +08:00
|
|
|
# If newlib is supplying syscalls, select which debug protocol is being used.
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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.
|
2004-06-10 03:05:09 +08:00
|
|
|
# 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
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2000-06-28 03:51:33 +08:00
|
|
|
avr*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
|
|
;;
|
2006-11-09 03:26:43 +08:00
|
|
|
bfin*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2005-01-27 Hans-Peter Nilsson <hp@axis.com>
* configure.host: Add support for cris-*-* and crisv32-*-*.
* libc/include/machine/ieeefp.h: Ditto.
* libc/include/machine/setjmp.h: Ditto.
* libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
files.
2005-01-28 07:54:46 +08:00
|
|
|
cris-*-* | crisv32-*-*)
|
2005-04-18 10:52:21 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2006-06-08 03:20:04 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -D_USE_WRITE -DCOMPACT_CTYPE"
|
2005-01-27 Hans-Peter Nilsson <hp@axis.com>
* configure.host: Add support for cris-*-* and crisv32-*-*.
* libc/include/machine/ieeefp.h: Ditto.
* libc/include/machine/setjmp.h: Ditto.
* libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
files.
2005-01-28 07:54:46 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2010-12-03 03:30:47 +08:00
|
|
|
cr16-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2004-10-06 03:44:24 +08:00
|
|
|
crx-*-*)
|
2005-03-24 02:09:57 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DMISSING_SYSCALL_NAMES"
|
2004-10-06 03:44:24 +08:00
|
|
|
syscall_dir=
|
|
|
|
;;
|
2020-09-24 03:06:09 +08:00
|
|
|
csky*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
d10v*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_MEMORY"
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
|
|
|
d30v*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DABORT_MESSAGE -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2012-02-22 06:34:31 +08:00
|
|
|
epiphany*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
|
|
|
|
;;
|
2006-12-19 05:49:14 +08:00
|
|
|
fido-*-elf)
|
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
fr30-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2003-02-21 03:14:12 +08:00
|
|
|
frv-*-*)
|
|
|
|
syscall_dir=syscalls
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2003-02-21 03:14:12 +08:00
|
|
|
;;
|
2015-09-05 01:17:53 +08:00
|
|
|
ft32*-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
h8300*-*-*)
|
|
|
|
syscall_dir=syscalls
|
2004-07-17 05:40:22 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2000-02-18 03:39:52 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
2003-03-19 04:38:04 +08:00
|
|
|
# Simulator only extensions for H8300.
|
|
|
|
# Uncomment the next line to enable them.
|
|
|
|
# newlib_cflags="${newlib_cflags} -D__SIMULATOR__"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
h8500-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
|
|
|
;;
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-*-sco*)
|
2001-02-22 07:11:06 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED -DHAVE_FCNTL"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2003-05-31 05:47:40 +08:00
|
|
|
i[34567]86-*-netware*)
|
2001-02-22 07:11:06 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
2016-03-31 17:12:00 +08:00
|
|
|
i[3-7]86-*-elfiamcu)
|
|
|
|
newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -ffunction-sections -fomit-frame-pointer -DREENTRANT_SYSCALL_PROVIDED"
|
|
|
|
if [ "${newlib_multithread}" = "no" ] ; then
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
else
|
|
|
|
syscall_dir=syscalls
|
|
|
|
newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__"
|
|
|
|
fi
|
|
|
|
;;
|
2003-06-10 23:32:27 +08:00
|
|
|
iq2000*)
|
2003-06-21 08:11:40 +08:00
|
|
|
syscall_dir=syscalls
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2003-06-21 08:11:40 +08:00
|
|
|
;;
|
2008-12-18 07:09:09 +08:00
|
|
|
lm32-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2009-01-27 09:41:31 +08:00
|
|
|
m32c-*-*)
|
|
|
|
default_newlib_io_long_long="yes"
|
2009-09-23 05:23:13 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DABORT_PROVIDED"
|
2009-01-27 09:41:31 +08:00
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
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
|
|
|
|
;;
|
2002-07-24 23:44:24 +08:00
|
|
|
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
|
2002-08-23 09:56:05 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DNO_EXEC -DABORT_PROVIDED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
|
|
|
|
;;
|
libgloss/
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.
2006-09-01 13:41:06 +08:00
|
|
|
m68k-unknown-elf)
|
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
mcore-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2013-07-16 15:48:53 +08:00
|
|
|
microblaze*-*-*)
|
2009-09-28 Michael Eager <eager@eagercon.com>
* configure.host: Add microblaze.
* libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
* libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
* libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
_UNIX98_THREAD_MUTEX_ATTRIBUTES.
* libc/include/sys/types.h: Treat XMK like rtems, define
PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
* libc/machine/configure.in: Add microblaze.
* libc/machine/configure: Add microblaze (not regenerated).
* libc/machine/microblaze/configure.in: NEW.
* libc/machine/microblaze/configure: Generate.
* libc/machine/microblaze/Makefile.am: NEW.
* libc/machine/microblaze/Makefile.in: Generate.
* libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
mallocr.c, longjmp.S, setjmp.S}: NEW.
* libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
mALLOc(): return malloc value.
2009-09-29 00:42:21 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DSMALL_MEMORY -D_REENT_SMALL"
|
|
|
|
;;
|
2003-01-08 20:51:23 +08:00
|
|
|
mips64vr*-*-*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
2003-01-08 20:51:23 +08:00
|
|
|
;;
|
2004-07-07 07:32:08 +08:00
|
|
|
mips*-*-elf*)
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
;;
|
2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
* libc/include/machine/ieeefp.h: Add support for mmix target.
* libc/include/machine/setjmp.h: Ditto.
* configure.host: Ditto.
* libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
* libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
libc/sys/mmixware/aclocal.m4: Generate.
2001-11-13 05:04:41 +08:00
|
|
|
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"
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
mn10?00-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2014-07-27 22:37:10 +08:00
|
|
|
moxie-*-elf* | moxie-*-rtems*)
|
2009-04-23 03:52:49 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
;;
|
2014-07-27 22:37:10 +08:00
|
|
|
moxie-*-moxiebox)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
|
|
|
|
;;
|
2013-05-07 02:23:09 +08:00
|
|
|
nios2*)
|
|
|
|
syscall_dir=
|
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_RENAME -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
|
|
;;
|
2013-07-10 03:06:47 +08:00
|
|
|
nds32*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2015-01-20 17:59:40 +08:00
|
|
|
or1k*|or1knd*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2002-04-20 03:16:22 +08:00
|
|
|
powerpc*-*-eabialtivec*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
2002-04-20 03:16:22 +08:00
|
|
|
;;
|
2002-08-17 13:57:20 +08:00
|
|
|
powerpc*-*-eabispe*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
2002-08-17 13:57:20 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
powerpc*-*-eabi* | \
|
|
|
|
powerpc*-*-elf* | \
|
|
|
|
powerpc*-*-linux* | \
|
|
|
|
powerpc*-*-rtem* | \
|
|
|
|
powerpc*-*-sysv* | \
|
|
|
|
powerpc*-*-solaris*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
|
|
|
newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
|
2000-02-18 03:39:52 +08:00
|
|
|
;;
|
|
|
|
powerpcle-*-pe)
|
2013-10-02 02:08:46 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN"
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2018-03-12 04:23:26 +08:00
|
|
|
pru*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_MEMORY -D_REENT_SMALL"
|
|
|
|
;;
|
2017-07-27 16:44:22 +08:00
|
|
|
riscv*-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
sh*-*-*)
|
2004-05-26 08:19:14 +08:00
|
|
|
default_newlib_io_long_long="yes"
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
|
|
|
sparc-sun-sunos*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DSIGNAL_PROVIDED"
|
|
|
|
;;
|
|
|
|
sparc64-*-*)
|
2006-06-08 03:20:04 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_BLKSIZE -DHAVE_FCNTL"
|
2000-02-18 03:39:52 +08:00
|
|
|
# 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
|
|
|
|
;;
|
2010-10-09 10:33:30 +08:00
|
|
|
tic6x*)
|
|
|
|
syscall_dir=
|
2010-11-18 05:44:57 +08:00
|
|
|
newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED"
|
2010-10-09 10:33:30 +08:00
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
tic80*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2010-07-24 02:11:27 +08:00
|
|
|
v850*-*-*)
|
2000-02-18 03:39:52 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2015-01-22 02:27:47 +08:00
|
|
|
visium-*-*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
w65-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
|
2009-12-11 01:12:11 +08:00
|
|
|
;;
|
|
|
|
xc16x-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2001-12-23 06:47:58 +08:00
|
|
|
xstormy16-*-*)
|
2002-05-01 02:23:40 +08:00
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
2000-02-18 03:39:52 +08:00
|
|
|
z8k-*-*)
|
|
|
|
syscall_dir=syscalls
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
|
|
|
|
syscall_dir=
|
|
|
|
;;
|
|
|
|
esac
|
2004-05-26 08:19:14 +08:00
|
|
|
|
|
|
|
# Use defaults for certain settings if not specified by user
|
|
|
|
|
2007-05-12 04:09:00 +08:00
|
|
|
# Enable C99 format support in I/O routines if requested.
|
|
|
|
if [ "x${newlib_io_c99_formats}" = "x" ]; then
|
|
|
|
if [ ${default_newlib_io_c99_formats} = "yes" ]; then
|
|
|
|
newlib_io_c99_formats="yes";
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2004-05-26 08:19:14 +08:00
|
|
|
# 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
|
2005-09-01 04:39:43 +08:00
|
|
|
|
2006-03-22 04:02:13 +08:00
|
|
|
# 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
|
|
|
|
|
2014-06-10 11:09:35 +08:00
|
|
|
# Enable nano-malloc if requested.
|
|
|
|
if [ "x${newlib_nano_malloc}" = "x" ]; then
|
|
|
|
if [ ${default_newlib_nano_malloc} = "yes" ]; then
|
|
|
|
newlib_nano_malloc="yes";
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2019-10-08 03:29:33 +08:00
|
|
|
# Enable _REENT_CHECK macro memory allocation verification.
|
|
|
|
if [ "x${newlib_reent_check_verify}" = "x" ]; then
|
2020-01-22 04:12:34 +08:00
|
|
|
if [ ${default_newlib_reent_check_verify} = "yes" ]; then
|
|
|
|
newlib_reent_check_verify="yes";
|
2019-10-08 03:29:33 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-01-13 06:24:06 +08:00
|
|
|
# Remove rpc headers if xdr_dir not specified
|
2012-02-16 02:32:05 +08:00
|
|
|
if [ "x${xdr_dir}" = "x" ]; then
|
2011-01-13 06:24:06 +08:00
|
|
|
noinclude="${noinclude} rpc/types.h rpc/xdr.h"
|
|
|
|
fi
|
|
|
|
|
2018-07-27 16:11:44 +08:00
|
|
|
# Have init/finit if not explicitly specified otherwise
|
|
|
|
if [ "x${have_init_fini}" != "xno" ]; then
|
|
|
|
newlib_cflags="${newlib_cflags} -DHAVE_INIT_FINI"
|
|
|
|
fi
|
|
|
|
|
2005-09-01 04:39:43 +08:00
|
|
|
if test -z "${have_crt0}" && test -n "${sys_dir}"; then
|
|
|
|
have_crt0="yes"
|
|
|
|
fi
|
2018-04-14 03:42:37 +08:00
|
|
|
|
|
|
|
# Target-specific defaults
|
|
|
|
case "${host_cpu}" in
|
|
|
|
nvptx*)
|
|
|
|
if [ "x${newlib_elix_level}" = "x0" ]; then
|
|
|
|
newlib_elix_level=1;
|
|
|
|
elif [ "x${newlib_elix_level}" != "x1" ]; then
|
|
|
|
newlib_msg_warn="nvptx does not support elix level > 1";
|
|
|
|
fi
|
|
|
|
if [[ -z ${newlib_global_stdio_streams} ]]; then
|
|
|
|
newlib_global_stdio_streams="yes";
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|