Merge of upstream-master

This commit is contained in:
Giacomo Tesio 2019-08-12 01:41:02 +02:00
commit b674052101
498 changed files with 30947 additions and 9060 deletions

View File

@ -1179,3 +1179,17 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
(51) Mentor Graphics (amdgcn-* targets)
Copyright (c) 2014-2017 Mentor Graphics.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

116
config.guess vendored
View File

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
# Copyright 1992-2019 Free Software Foundation, Inc.
timestamp='2018-06-26'
timestamp='2019-01-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2018 Free Software Foundation, Inc.
Copyright 1992-2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -84,8 +84,6 @@ if test $# != 0; then
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
@ -96,34 +94,38 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
tmp=
# shellcheck disable=SC2172
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
set_cc_for_build() {
: "${TMPDIR=/tmp}"
# shellcheck disable=SC2039
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
dummy=$tmp/dummy
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c"
for driver in cc gcc c89 c99 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$driver"
break
fi
done
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac
}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
@ -138,7 +140,7 @@ Linux|GNU|GNU/*)
# We could probably try harder.
LIBC=gnu
eval "$set_cc_for_build"
set_cc_for_build
cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
@ -199,7 +201,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval "$set_cc_for_build"
set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@ -383,13 +385,26 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
set_cc_for_build
SUN_ARCH=sparc
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __sparcv9'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=sparcv9
fi
fi
echo "$SUN_ARCH"-sun-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval "$set_cc_for_build"
set_cc_for_build
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@ -482,7 +497,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval "$set_cc_for_build"
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@ -579,7 +594,7 @@ EOF
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval "$set_cc_for_build"
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
@ -660,7 +675,7 @@ EOF
esac
fi
if [ "$HP_ARCH" = "" ]; then
eval "$set_cc_for_build"
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
@ -700,7 +715,7 @@ EOF
esac
if [ "$HP_ARCH" = hppa2.0w ]
then
eval "$set_cc_for_build"
set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@ -726,7 +741,7 @@ EOF
echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
eval "$set_cc_for_build"
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
@ -840,6 +855,17 @@ EOF
*:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
arm:FreeBSD:*:*)
UNAME_PROCESSOR=`uname -p`
set_cc_for_build
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
else
echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
fi
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in
@ -881,7 +907,7 @@ EOF
echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
echo x86_64-pc-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
@ -922,7 +948,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
eval "$set_cc_for_build"
set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
@ -971,7 +997,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval "$set_cc_for_build"
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
@ -1285,7 +1311,7 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval "$set_cc_for_build"
set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
@ -1358,6 +1384,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
# shellcheck disable=SC2154
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
@ -1414,6 +1441,9 @@ EOF
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
*:Unleashed:*:*)
echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
exit ;;
esac
echo "$0: unable to guess system type" >&2

1193
config.sub vendored

File diff suppressed because it is too large Load Diff

View File

@ -61,4 +61,30 @@
# define HAVE_CALL_INDIRECT
#endif
/* A and R profiles (and legacy Arm).
Current Program Status Register (CPSR)
M[4:0] Mode bits. M[4] is always 1 for 32-bit modes.
T[5] 1: Thumb, 0: ARM instruction set
F[6] 1: disables FIQ
I[7] 1: disables IRQ
A[8] 1: disables imprecise aborts
E[9] 0: Little-endian, 1: Big-endian
J[24] 1: Jazelle instruction set
*/
#define CPSR_M_USR 0x00 /* User mode. */
#define CPSR_M_FIQ 0x01 /* Fast Interrupt mode. */
#define CPSR_M_IRQ 0x02 /* Interrupt mode. */
#define CPSR_M_SVR 0x03 /* Supervisor mode. */
#define CPSR_M_MON 0x06 /* Monitor mode. */
#define CPSR_M_ABT 0x07 /* Abort mode. */
#define CPSR_M_HYP 0x0A /* Hypervisor mode. */
#define CPSR_M_UND 0x0B /* Undefined mode. */
#define CPSR_M_SYS 0x0F /* System mode. */
#define CPSR_M_32BIT 0x10 /* 32-bit mode. */
#define CPSR_T_BIT 0x20 /* Thumb bit. */
#define CPSR_F_MASK 0x40 /* FIQ bit. */
#define CPSR_I_MASK 0x80 /* IRQ bit. */
#define CPSR_M_MASK 0x0F /* Mode mask except M[4]. */
#endif /* _LIBGLOSS_ARM_H */

View File

@ -59,6 +59,21 @@
.endm
#endif
/* Annotation for EABI unwinding tables. */
.macro FN_EH_START
#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
.fnstart
#endif
.endm
.macro FN_EH_END
#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
/* Protect against unhandled exceptions. */
.cantunwind
.fnend
#endif
.endm
.macro indirect_call reg
#ifdef HAVE_CALL_INDIRECT
blx \reg
@ -68,14 +83,171 @@
#endif
.endm
.align 0
/* For armv4t and newer, toolchains will transparently convert
'bx lr' to 'mov pc, lr' if needed. GCC has deprecated support
for anything older than armv4t, but this should handle that
corner case in case anyone needs it anyway. */
.macro FN_RETURN
#if __ARM_ARCH <= 4 && __ARM_ARCH_ISA_THUMB == 0
mov pc, lr
#else
bx lr
#endif
.endm
/******************************************************************************
* User mode only: This routine makes default target specific Stack
* +-----+ <- SL_sys, Pointer initialization for different processor modes:
* | | SL_usr FIQ, Abort, IRQ, Undefined, Supervisor, System (User)
* | SYS | and setups a default Stack Limit in-case the code has
* | USR | -=0x10000 been compiled with "-mapcs-stack-check" for FIQ and
* | | System (User) modes.
* | |
* +-----+ <- initial SP,
* becomes SP_sys Hard-wiring SL value is not ideal, since there is
* and SL_usr currently no support for checking that the heap and
* stack have not collided, or that this default 64k is
* All modes: is enough for the program being executed. However,
* +-----+ <- SL_sys, it ensures that this simple crt0 world will not
* | | SL_usr immediately cause an overflow event.
* | SYS |
* | USR | -=0x10000 We go through all execution modes and set up SP
* | | for each of them.
* +-----+ <- SP_sys,
* | | SP_usr Notes:
* | SVC | -= 0x8000 - This code will not work as intended if the system
* | | starts in secure mode. In particular the methods
* +-----+ <- SP_svc of getting in and out of secure state are not as
* | | simple as writing to the CPSR mode bits.
* | IRQ | -= 0x2000 - Mode switch via CPSR is not allowed once in
* | | non-privileged mode, so we take care not to enter
* ^ +-----+ <- SP_und "User" to set up its SP, and also skip most
* s | | operations if already in that mode.
* t | UND | -= 0x1000
* a | | Input parameters:
* c +-----+ <- SP_und - sp - Initialized SP
* k | | - r2 - May contain SL value from semihosting
* | ABT | -= 0x1000 SYS_HEAPINFO call
* g | | Scratch registers:
* r +-----+ <- SP_abt, - r1 - new value of CPSR
* o | | SL_fiq - r2 - intermediate value (in standalone mode)
* w | FIQ | -= 0x1000 - r3 - new SP value
* t | | - r4 - save/restore CPSR on entry/exit
* h +-----+ <- initial SP,
* becomes SP_fiq Declared as "weak" so that user can write and use
* his own implementation if current doesn't fit.
*
******************************************************************************/
.align 0
FUNC_START _stack_init
.weak FUNCTION (_stack_init)
FN_EH_START
/* M profile doesn't have CPSR register. */
#if (__ARM_ARCH_PROFILE != 'M')
/* Following code is compatible for both ARM and Thumb ISA. */
mrs r4, CPSR
/* Test mode bits - in User of all are 0. */
tst r4, #(CPSR_M_MASK)
/* "eq" means r4 AND #0x0F is 0. */
beq .Lskip_cpu_modes
mov r3, sp /* Save input SP value. */
/* FIQ mode, interrupts disabled. */
mov r1, #(CPSR_M_FIQ|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
sub sl, sp, #0x1000 /* FIQ mode has its own SL. */
/* Abort mode, interrupts disabled. */
mov r3, sl
mov r1, #(CPSR_M_ABT|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
sub r3, r3, #0x1000
/* Undefined mode, interrupts disabled. */
mov r1, #(CPSR_M_UND|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
sub r3, r3, #0x1000
/* IRQ mode, interrupts disabled. */
mov r1, #(CPSR_M_IRQ|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
sub r3, r3, #0x2000
/* Supervisory mode, interrupts disabled. */
mov r1, #(CPSR_M_SVR|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
sub r3, r3, #0x8000 /* Min size 32k. */
bic r3, r3, #0x00FF /* Align with current 64k block. */
bic r3, r3, #0xFF00
# if __ARM_ARCH >= 4
/* System (shares regs with User) mode, interrupts disabled. */
mov r1, #(CPSR_M_SYS|CPSR_M_32BIT|CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r1
mov sp, r3
# else
/* Keep this for ARMv3, but GCC actually dropped it. */
/* Move value into user mode SP without changing modes, */
/* via '^' form of ldm. */
str r3, [r3, #-4]
ldmdb r3, {sp}^
# endif
/* Back to original mode, presumably SVC, with diabled FIQ/IRQ. */
orr r4, r4, #(CPSR_I_MASK|CPSR_F_MASK)
msr CPSR_c, r4
.Lskip_cpu_modes:
#endif
/* Set SL register. */
#if defined (ARM_RDI_MONITOR) /* semihosting */
cmp r2, #0
beq .Lsl_forced_zero
/* Allow slop for stack overflow handling and small frames. */
# ifdef THUMB1_ONLY
adds r2, #128
adds r2, #128
mov sl, r2
# else
add sl, r2, #256
# endif
.Lsl_forced_zero:
#else /* standalone */
/* r3 contains SP for System/User mode. Set SL = SP - 0x10000. */
#ifdef THUMB1_ONLY
movs r2, #64
lsls r2, r2, #10
subs r2, r3, r2
mov sl, r2
#else
/* Still assumes 256bytes below SL. */
sub sl, r3, #64 << 10
#endif
#endif
FN_RETURN
FN_EH_END
/*******************************************************************************
* Main library startup code.
*******************************************************************************/
.align 0
FUNC_START _mainCRTStartup
FUNC_START _start
#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
/* Annotation for EABI unwinding tables. */
.fnstart
#endif
FN_EH_START
/* __ARM_ARCH_PROFILE is defined from GCC 4.8 onwards, however __ARM_ARCH_7A
has been defined since 4.2 onwards, which is when v7-a support was added
@ -90,14 +262,14 @@
#endif
#endif
/* Start by setting up a stack */
/* Start by setting up a stack. */
#ifdef ARM_RDP_MONITOR
/* Issue Demon SWI to read stack info */
swi SWI_GetEnv /* Returns command line in r0 */
mov sp,r1 /* and the highest memory address in r1 */
/* Issue Demon SWI to read stack info. */
swi SWI_GetEnv /* Returns command line in r0. */
mov sp,r1 /* and the highest memory address in r1. */
/* stack limit is at end of data */
/* allow slop for stack overflow handling and small frames */
/* Stack limit is at end of data. */
/* Allow slop for stack overflow handling and small frames. */
#ifdef THUMB1_ONLY
ldr r0, .LC2
adds r0, #128
@ -109,19 +281,19 @@
#endif
#else
#ifdef ARM_RDI_MONITOR
/* Issue Angel SWI to read stack info */
/* Issue Angel SWI to read stack info. */
movs r0, #AngelSWI_Reason_HeapInfo
adr r1, .LC0 /* point at ptr to 4 words to receive data */
adr r1, .LC0 /* Point at ptr to 4 words to receive data. */
#ifdef THUMB_VXM
bkpt AngelSWI
#elif defined(__thumb2__)
/* We are in thumb mode for startup on armv7 architectures. */
AngelSWIAsm AngelSWI
/* We are in thumb mode for startup on armv7 architectures. */
AngelSWIAsm (AngelSWI)
#else
/* We are always in ARM mode for startup on pre armv7 archs. */
AngelSWIAsm AngelSWI_ARM
/* We are always in ARM mode for startup on pre armv7 archs. */
AngelSWIAsm (AngelSWI_ARM)
#endif
ldr r0, .LC0 /* point at values read */
ldr r0, .LC0 /* Point at values read. */
/* Set __heap_limit. */
ldr r1, [r0, #4]
@ -142,40 +314,33 @@
.LC32:
ldr r1, [r0, #8]
ldr r2, [r0, #12]
/* We skip setting sp/sl if 0 returned from semihosting.
/* We skip setting SP/SL if 0 returned from semihosting.
- According to semihosting docs, if 0 returned from semihosting,
the system was unable to calculate the real value, so it's ok
to skip setting sp/sl to 0 here.
to skip setting SP/SL to 0 here.
- Considering M-profile processors, We might want to initialize
sp by the first entry of vector table and return 0 to SYS_HEAPINFO
semihosting call, which will be skipped here. */
SP by the first entry of vector table and return 0 to SYS_HEAPINFO
semihosting call, which will be skipped here.
- Considering R-profile processors there is no automatic SP init by hardware
so we need to initialize it by default value. */
ldr r3, .Lstack
cmp r1, #0
beq .LC26
mov sp, r1
mov r3, r1
.LC26:
cmp r2, #0
beq .LC27
/* allow slop for stack overflow handling and small frames */
#ifdef THUMB1_ONLY
adds r2, #128
adds r2, #128
mov sl, r2
#else
add sl, r2, #256
#endif
.LC27:
#else
/* Set up the stack pointer to a fixed value */
mov sp, r3
/* r2 (SL value) will be used in _stack_init. */
bl FUNCTION (_stack_init)
#else /* standalone */
/* Set up the stack pointer to a fixed value. */
/* Changes by toralf:
- Allow linker script to provide stack via __stack symbol - see
defintion of .Lstack
- Provide "hooks" that may be used by the application to add
custom init code - see .Lhwinit and .Lswinit
- Go through all execution modes and set up stack for each of them.
Loosely based on init.s from ARM/Motorola example code.
Note: Mode switch via CPSR is not allowed once in non-privileged
mode, so we take care not to enter "User" to set up its sp,
and also skip most operations if already in that mode. */
custom init code - see .Lhwinit and .Lswinit. */
ldr r3, .Lstack
cmp r3, #0
@ -190,77 +355,30 @@
ldreq r3, .LC0
#endif
/* Note: This 'mov' is essential when starting in User, and ensures we
always get *some* sp value for the initial mode, even if we
always get *some* SP value for the initial mode, even if we
have somehow missed it below (in which case it gets the same
value as FIQ - not ideal, but better than nothing.) */
value as FIQ - not ideal, but better than nothing). */
mov sp, r3
#ifdef PREFER_THUMB
/* XXX Fill in stack assignments for interrupt modes. */
#else
mrs r2, CPSR
tst r2, #0x0F /* Test mode bits - in User of all are 0 */
beq .LC23 /* "eq" means r2 AND #0x0F is 0 */
msr CPSR_c, #0xD1 /* FIRQ mode, interrupts disabled */
mov sp, r3
sub sl, sp, #0x1000 /* This mode also has its own sl (see below) */
mov r3, sl
msr CPSR_c, #0xD7 /* Abort mode, interrupts disabled */
mov sp, r3
sub r3, r3, #0x1000
msr CPSR_c, #0xDB /* Undefined mode, interrupts disabled */
mov sp, r3
sub r3, r3, #0x1000
/* We don't care of r2 value in standalone. */
bl FUNCTION (_stack_init)
msr CPSR_c, #0xD2 /* IRQ mode, interrupts disabled */
mov sp, r3
sub r3, r3, #0x2000
msr CPSR_c, #0xD3 /* Supervisory mode, interrupts disabled */
mov sp, r3
sub r3, r3, #0x8000 /* Min size 32k */
bic r3, r3, #0x00FF /* Align with current 64k block */
bic r3, r3, #0xFF00
str r3, [r3, #-4] /* Move value into user mode sp without */
ldmdb r3, {sp}^ /* changing modes, via '^' form of ldm */
orr r2, r2, #0xC0 /* Back to original mode, presumably SVC, */
msr CPSR_c, r2 /* with FIQ/IRQ disable bits forced to 1 */
#endif
.LC23:
/* Setup a default stack-limit in-case the code has been
compiled with "-mapcs-stack-check". Hard-wiring this value
is not ideal, since there is currently no support for
checking that the heap and stack have not collided, or that
this default 64k is enough for the program being executed.
However, it ensures that this simple crt0 world will not
immediately cause an overflow event: */
#ifdef THUMB1_ONLY
movs r2, #64
lsls r2, r2, #10
subs r2, r3, r2
mov sl, r2
#else
sub sl, r3, #64 << 10 /* Still assumes 256bytes below sl */
#endif
#endif
#endif
/* Zero the memory in the .bss section. */
movs a2, #0 /* Second arg: fill value */
mov fp, a2 /* Null frame pointer */
mov r7, a2 /* Null frame pointer for Thumb */
movs a2, #0 /* Second arg: fill value. */
mov fp, a2 /* Null frame pointer. */
mov r7, a2 /* Null frame pointer for Thumb. */
ldr a1, .LC1 /* First arg: start of memory block */
ldr a1, .LC1 /* First arg: start of memory block. */
ldr a3, .LC2
subs a3, a3, a1 /* Third arg: length of block */
subs a3, a3, a1 /* Third arg: length of block. */
#if __thumb__ && !defined(PREFER_THUMB)
/* Enter Thumb mode.... */
add a4, pc, #1 /* Get the address of the Thumb block */
bx a4 /* Go there and start Thumb decoding */
/* Enter Thumb mode... */
add a4, pc, #1 /* Get the address of the Thumb block. */
bx a4 /* Go there and start Thumb decoding. */
.code 16
.global __change_mode
@ -271,9 +389,8 @@ __change_mode:
bl FUNCTION (memset)
#if !defined (ARM_RDP_MONITOR) && !defined (ARM_RDI_MONITOR)
/* Changes by toralf: Taken from libgloss/m68k/crt0.S
* initialize target specific stuff. Only execute these
* functions it they exist.
*/
initialize target specific stuff. Only execute these
functions it they exist. */
ldr r3, .Lhwinit
cmp r3, #0
beq .LC24
@ -285,24 +402,24 @@ __change_mode:
indirect_call r3
.LC25:
movs r0, #0 /* no arguments */
movs r1, #0 /* no argv either */
movs r0, #0 /* No arguments. */
movs r1, #0 /* No argv either. */
#else
/* Need to set up standard file handles */
/* Need to set up standard file handles. */
bl FUNCTION (initialise_monitor_handles)
#ifdef ARM_RDP_MONITOR
swi SWI_GetEnv /* sets r0 to point to the command line */
swi SWI_GetEnv /* Sets r0 to point to the command line. */
movs r1, r0
#else
movs r0, #AngelSWI_Reason_GetCmdLine
ldr r1, .LC30 /* Space for command line */
AngelSWIAsm AngelSWI
ldr r1, .LC30 /* Space for command line. */
AngelSWIAsm (AngelSWI)
ldr r1, .LC30
ldr r1, [r1]
#endif
/* Parse string at r1 */
movs r0, #0 /* count of arguments so far */
/* Parse string at r1. */
movs r0, #0 /* Count of arguments so far. */
/* Push a NULL argument onto the end of the list. */
#ifdef __thumb__
push {r0}
@ -310,7 +427,7 @@ __change_mode:
stmfd sp!, {r0}
#endif
.LC10:
/* Skip leading blanks */
/* Skip leading blanks. */
#ifdef __thumb__
ldrb r3, [r1]
adds r1, #1
@ -322,8 +439,8 @@ __change_mode:
cmp r3, #' '
beq .LC10
/* See whether we are scanning a string */
cmp r3, #'"'
/* See whether we are scanning a string. */
cmp r3, #'\"'
#ifdef __thumb__
beq .LC20
cmp r3, #'\''
@ -333,17 +450,17 @@ __change_mode:
b .LC22
.LC21:
movs r2, #' ' /* terminator type */
subs r1, r1, #1 /* adjust back to point at start char */
movs r2, #' ' /* Terminator type. */
subs r1, r1, #1 /* Adjust back to point at start char. */
.LC22:
#else
cmpne r3, #'\''
moveq r2, r3
movne r2, #' ' /* terminator type */
subne r1, r1, #1 /* adjust back to point at start char */
movne r2, #' ' /* Terminator type. */
subne r1, r1, #1 /* Adjust back to point at start char. */
#endif
/* Stack a pointer to the current argument */
/* Stack a pointer to the current argument. */
#ifdef __thumb__
push {r1}
#else
@ -359,16 +476,16 @@ __change_mode:
#endif
cmp r3, #0
beq .LC12
cmp r2, r3 /* reached terminator? */
cmp r2, r3 /* Reached terminator ? */
bne .LC11
movs r2, #0
subs r3, r1, #1
strb r2, [r3] /* terminate the arg string */
strb r2, [r3] /* Terminate the arg string. */
b .LC10
.LC12:
mov r1, sp /* point at stacked arg pointers */
/* We've now got the stacked args in order reverse the */
mov r1, sp /* Point at stacked arg pointers. */
/* We've now got the stacked args in order, reverse them. */
#ifdef __thumb__
movs r2, r0
lsls r2, #2
@ -390,10 +507,10 @@ __change_mode:
bics r4, r5
mov sp, r4
#else
add r2, sp, r0, LSL #2 /* End of args */
mov r3, sp /* Start of args */
add r2, sp, r0, LSL #2 /* End of args. */
mov r3, sp /* Start of args. */
.LC13: cmp r2, r3
ldrhi r4,[r2, #-4] /* Reverse ends of list */
ldrhi r4,[r2, #-4] /* Reverse ends of list. */
ldrhi r5, [r3]
strhi r5, [r2, #-4]!
strhi r4, [r3], #4
@ -431,7 +548,6 @@ __change_mode:
#if __thumb__ && !defined(PREFER_THUMB)
/* Come out of Thumb mode. This code should be redundant. */
mov a4, pc
bx a4
@ -441,13 +557,14 @@ change_back:
/* Halt the execution. This code should never be executed. */
/* With no debug monitor, this probably aborts (eventually).
With a Demon debug monitor, this halts cleanly.
With an Angel debug monitor, this will report 'Unknown SWI'. */
With an Angel debug monitor, this will report 'Unknown SWI'. */
swi SWI_Exit
#endif
FN_EH_END
/* For Thumb, constants must be after the code since only
positive offsets are supported for PC relative addresses. */
.align 0
.LC0:
#ifdef ARM_RDI_MONITOR
@ -457,15 +574,12 @@ change_back:
/* Changes by toralf: Provide alternative "stack" variable whose value
may be defined externally; .Lstack will be used instead of .LC0 if
it points to a non-0 value. Also set up references to "hooks" that
may be used by the application to provide additional init code. */
may be used by the application to provide additional init code. */
#ifdef __pe__
.word 0x800000
#else
.word 0x80000 /* Top of RAM on the PIE board. */
#endif
.Lstack:
.word __stack
.Lhwinit:
.word FUNCTION (hardware_init_hook)
.Lswinit:
@ -476,19 +590,18 @@ change_back:
runtime (meaning "ignore setting") for the variables, when the user
does not provide the symbols. (The linker uses a weak symbol if,
and only if, a normal version of the same symbol isn't provided
e.g. by a linker script or another object file.) */
e.g. by a linker script or another object file.) */
.weak __stack
.weak FUNCTION (hardware_init_hook)
.weak FUNCTION (software_init_hook)
#endif
#endif
#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
/* Protect against unhandled exceptions. */
.cantunwind
.fnend
#endif
.Lstack:
.word __stack
.weak __stack
.LC1:
.word __bss_start__
.LC2:

View File

@ -12,7 +12,7 @@
%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
*rdimon_libgloss:
%{!specs=nano.specs:-lrdimon-v2m} %{specs=nano.specs:-lrdimon_nano}
%{!specs=nano.specs:-lrdimon-v2m} %{specs=nano.specs:-lrdimon-v2m_nano}
*link_gcc_c_sequence:
%(rdimon_link_gcc_c_sequence) --start-group %G %(rdimon_libc) %(rdimon_libgloss) --end-group

View File

@ -30,10 +30,12 @@
/* Now the SWI numbers and reason codes for RDI (Angel) monitors. */
#if defined (SEMIHOST_V2) && defined (SEMIHOST_V2_MIXED_MODE)
#define AngelSWI_ARM 0xF000 /* HLT A32. */
#if defined (SEMIHOST_V2) \
&& defined (SEMIHOST_V2_MIXED_MODE) \
&& !defined (THUMB_VXM)
#define AngelSWI_ARM 0xE10F0070 /* HLT #0xF000 A32. */
#ifdef __thumb__
#define AngelSWI 0x3C /* HLT T32. */
#define AngelSWI 0xBABC /* HLT #0x3c T32. */
#else /* __thumb__. */
#define AngelSWI AngelSWI_ARM
#endif /* __thumb__. */
@ -49,10 +51,16 @@
/* For thumb only architectures use the BKPT instruction instead of SWI. */
#ifdef THUMB_VXM
#define AngelSWIInsn "bkpt"
#define AngelSWIAsm bkpt
#define AngelSWIAsm(IMM) bkpt IMM
#elif defined (SEMIHOST_V2) && defined (SEMIHOST_V2_MIXED_MODE)
/* This is actually encoding the HLT instruction, however we don't have
support for this in older assemblers. So we have to encode the
instruction manually. */
#define AngelSWIInsn ".inst"
#define AngelSWIAsm(IMM) .inst IMM
#else
#define AngelSWIInsn "swi"
#define AngelSWIAsm swi
#define AngelSWIAsm(IMM) swi IMM
#endif
/* The reason codes: */

View File

@ -18,30 +18,30 @@
#include "swi.h"
/* Forward prototypes. */
int _system (const char *);
int _rename (const char *, const char *);
int _isatty (int);
int _system (const char *);
int _rename (const char *, const char *);
int _isatty (int);
clock_t _times (struct tms *);
int _gettimeofday (struct timeval *, void *);
int _unlink (const char *);
int _link (const char *, const char *);
int _stat (const char *, struct stat *);
int _fstat (int, struct stat *);
int _gettimeofday (struct timeval *, void *);
int _unlink (const char *);
int _link (const char *, const char *);
int _stat (const char *, struct stat *);
int _fstat (int, struct stat *);
int _swistat (int fd, struct stat * st);
void * _sbrk (ptrdiff_t);
pid_t _getpid (void);
int _close (int);
clock_t _clock (void);
int _swiclose (int);
int _open (const char *, int, ...);
int _swiopen (const char *, int);
int _write (int, const void *, size_t);
int _swiwrite (int, const void *, size_t);
_off_t _lseek (int, _off_t, int);
_off_t _swilseek (int, _off_t, int);
int _read (int, void *, size_t);
int _swiread (int, void *, size_t);
void initialise_monitor_handles (void);
void * _sbrk (ptrdiff_t);
pid_t _getpid (void);
int _close (int);
clock_t _clock (void);
int _swiclose (int);
int _open (const char *, int, ...);
int _swiopen (const char *, int);
int _write (int, const void *, size_t);
int _swiwrite (int, const void *, size_t);
_off_t _lseek (int, _off_t, int);
_off_t _swilseek (int, _off_t, int);
int _read (int, void *, size_t);
int _swiread (int, void *, size_t);
void initialise_monitor_handles (void);
static int checkerror (int);
static int error (int);
@ -143,7 +143,7 @@ initialise_monitor_handles (void)
int i;
/* Open the standard file descriptors by opening the special
* teletype device, ":tt", read-only to obtain a descritpor for
* teletype device, ":tt", read-only to obtain a descriptor for
* standard input and write-only to obtain a descriptor for standard
* output. Finally, open ":tt" in append mode to obtain a descriptor
* for standard error. Since this is a write mode, most kernels will
@ -154,7 +154,7 @@ initialise_monitor_handles (void)
#ifdef ARM_RDI_MONITOR
int volatile block[3];
block[0] = (int) ":tt";
block[2] = 3; /* length of filename */
block[1] = 0; /* mode "r" */
@ -351,17 +351,15 @@ checkerror (int result)
len, is the length in bytes to read.
Returns the number of bytes *not* written. */
int
_swiread (int fh,
void * ptr,
size_t len)
_swiread (int fh, void * ptr, size_t len)
{
#ifdef ARM_RDI_MONITOR
int block[3];
block[0] = fh;
block[1] = (int) ptr;
block[2] = (int) len;
return checkerror (do_AngelSWI (AngelSWI_Reason_Read, block));
#else
register int r0 asm("r0");
@ -381,9 +379,7 @@ _swiread (int fh,
Translates the return of _swiread into
bytes read. */
int __attribute__((weak))
_read (int fd,
void * ptr,
size_t len)
_read (int fd, void * ptr, size_t len)
{
int res;
struct fdent *pfd;
@ -409,9 +405,7 @@ _read (int fd,
/* fd, is a user file descriptor. */
off_t
_swilseek (int fd,
off_t ptr,
int dir)
_swilseek (int fd, off_t ptr, int dir)
{
off_t res;
struct fdent *pfd;
@ -447,7 +441,7 @@ _swilseek (int fd,
}
dir = SEEK_SET;
}
#ifdef ARM_RDI_MONITOR
int block[2];
if (dir == SEEK_END)
@ -458,7 +452,7 @@ _swilseek (int fd,
return -1;
ptr += res;
}
/* This code only does absolute seeks. */
block[0] = pfd->handle;
block[1] = (int) ptr;
@ -494,9 +488,7 @@ _swilseek (int fd,
}
off_t
_lseek (int fd,
off_t ptr,
int dir)
_lseek (int fd, off_t ptr, int dir)
{
return _swilseek (fd, ptr, dir);
}
@ -504,18 +496,15 @@ _lseek (int fd,
/* fh, is a valid internal file handle.
Returns the number of bytes *not* written. */
int
_swiwrite (
int fh,
const void * ptr,
size_t len)
_swiwrite (int fh, const void * ptr, size_t len)
{
#ifdef ARM_RDI_MONITOR
int block[3];
block[0] = fh;
block[1] = (int) ptr;
block[2] = (int) len;
return checkerror (do_AngelSWI (AngelSWI_Reason_Write, block));
#else
register int r0 asm("r0");
@ -533,9 +522,7 @@ _swiwrite (
/* fd, is a user file descriptor. */
int __attribute__((weak))
_write (int fd,
const void * ptr,
size_t len)
_write (int fd, const void * ptr, size_t len)
{
int res;
struct fdent *pfd;
@ -593,7 +580,7 @@ _swiopen (const char * path, int flags)
}
}
/* The flags are Unix-style, so we need to convert them. */
/* The flags are Unix-style, so we need to convert them. */
#ifdef O_BINARY
if (flags & O_BINARY)
aflags |= 1;
@ -611,25 +598,24 @@ _swiopen (const char * path, int flags)
if (flags & O_APPEND)
{
/* Can't ask for w AND a; means just 'a'. */
aflags &= ~4;
aflags &= ~4; /* Can't ask for w AND a; means just 'a'. */
aflags |= 8;
}
#ifdef ARM_RDI_MONITOR
block[0] = (int) path;
block[2] = strlen (path);
block[1] = aflags;
fh = do_AngelSWI (AngelSWI_Reason_Open, block);
#else
asm ("mov r0,%2; mov r1, %3; swi %a1; mov %0, r0"
: "=r"(fh)
: "i" (SWI_Open),"r"(path),"r"(aflags)
: "r0","r1");
#endif
/* Return a user file descriptor or an error. */
if (fh >= 0)
{
@ -707,15 +693,15 @@ uint __heap_limit = 0xcafedead;
void * __attribute__((weak))
_sbrk (ptrdiff_t incr)
{
extern char end asm ("end"); /* Defined by the linker. */
extern char end asm ("end"); /* Defined by the linker. */
static char * heap_end;
char * prev_heap_end;
char * prev_heap_end;
if (heap_end == NULL)
heap_end = & end;
prev_heap_end = heap_end;
if ((heap_end + incr > stack_ptr)
/* Honour heap limit if it's valid. */
|| (__heap_limit != 0xcafedead && heap_end + incr > (char *)__heap_limit))
@ -726,14 +712,14 @@ _sbrk (ptrdiff_t incr)
extern void abort (void);
_write (1, "_sbrk: Heap and stack collision\n", 32);
abort ();
#else
errno = ENOMEM;
return (void *) -1;
#endif
}
heap_end += incr;
return (void *) prev_heap_end;
@ -784,13 +770,13 @@ _stat (const char *fname, struct stat *st)
{
int fd, res;
memset (st, 0, sizeof (* st));
/* The best we can do is try to open the file readonly.
If it exists, then we can guess a few things about it. */
/* The best we can do is try to open the file readonly. If it exists,
then we can guess a few things about it. */
if ((fd = _open (fname, O_RDONLY)) == -1)
return -1;
st->st_mode |= S_IFREG | S_IREAD;
res = _swistat (fd, st);
/* Not interested in the error. */
/* Not interested in the error. */
_close (fd);
return res;
}
@ -880,7 +866,7 @@ _times (struct tms * tp)
tp->tms_cutime = 0; /* user time, children */
tp->tms_cstime = 0; /* system time, children */
}
return timeval;
};

View File

@ -1,6 +1,6 @@
#include "arm.h"
/* Run-time exception support */
#ifndef PREFER_THUMB
#ifndef __ARM_EABI__
#include "swi.h"
/* .text is used instead of .section .text so it works with arm-aout too. */

214
libgloss/m68k/m68k-semi.txt Normal file
View File

@ -0,0 +1,214 @@
Copyright (c) 2006 CodeSourcery Inc
Copyright (c) 2019 Mentor Graphics
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
m68k Semihosting Protocol
-------------------------
The instruction used to trigger a semihosting request depends on the
m68k processor variant. On ColdFire, "halt" is used; on other processors
(which don't implement "halt"), "bkpt #0" may be used.
Additionally, a special code sequence is used to distinguish
semihosting requests from other uses of the instruction used to
trigger it. The semihosting instruction is immediately preceded by a
"nop" aligned to a 4-byte boundary, and followed by an invalid sentinel
instruction 0x4e7bf000 ("movec %sp,0"). The debug agent handling the
semihosting request must adjust the program counter to skip over the
sentinel instruction before continuing execution.
Registers d0 and d1 are used to pass parameters to the semihosting call.
d0 contains a request code. d1 is typically a pointer to a 4-longword
parameter block, except for the exit and simulator initialization operations
where it is an immediate integer value.
The result of the operation is returned in the first word of the
parameter block. The second word is used to return an errno value,
encoded per the "Errno Values" section of the RSP documentation in the
GDB User Manual.
The supported d0 request codes are:
#define HOSTED_EXIT 0
Terminate program execution; send a 'W' stop reply to GDB.
d1 contains the exit code, as an immediate integer rather than indirectly
in a parameter block. This semihosting request isn't expected to return.
#define HOSTED_INIT_SIM 1
Do simulator initialization, such as allocation of memory for the
stack and heap. This semihosting request may be triggered from
startup code (crt0.S).
On entry to the semihosting request, d1 contains the default initial
stack pointer as an immediate value, typically the high end of
memory defined by the linker script. If the simulator needs to
dynamically allocate memory for the stack, it should set both d1 and
sp (a7) to the new stack pointer value.
#define HOSTED_OPEN 2
Open file; 'Fopen' GDB fileio request.
d1 points to a parameter block containing:
[0] pointer to filename
[1] filename length
[2] open flags, encoded per the GDB RSP documentation
[3] mode, encoded per the GDB RSP documentation
Return values in parameter block:
[0] file descriptor or -1 on error
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_CLOSE 3
Close file; 'Fclose' GDB fileio request.
d1 points to a parameter block containing:
[0] file descriptor
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_READ 4
Read from file; 'Fread' GDB fileio request.
d1 points to a parameter block containing:
[0] file descriptor
[1] pointer to buffer
[2] buffer size
Return values in parameter block:
[0] number of bytes read
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_WRITE 5
Write to file; 'Fwrite' GDB fileio request.
d1 points to a parameter block containing:
[0] file descriptor
[1] pointer to buffer
[2] byte count
Return values in parameter block:
[0] number of bytes written
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_LSEEK 6
File seek; 'Flseek' GDB fileio request.
d1 points to a parameter block containing:
[0] file descriptor
[1] high word of 64-bit offset
[2] low word of 64-bit offset
[3] seek flag, encoded per the GDB RSP documentation
Return values in parameter block:
[0] high word of 64-bit result
[1] low word of 64-bit result
[2] errno, encoded per the GDB RSP documentation
#define HOSTED_RENAME 7
File rename; 'Frename' GDB fileio request.
d1 points to a parameter block containing:
[0] oldname pointer
[1] oldname length
[2] newname pointer
[3] newname length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_UNLINK 8
File unlink/delete; 'Funlink' GDB fileio request.
d1 points to a parameter block containing:
[0] filename pointer
[1] filename length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_STAT 9
File information; 'Fstat' GDB fileio request.
d1 points to a parameter block containing:
[0] filename pointer
[1] filename length
[2] pointer to stat buf, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_FSTAT 10
File information; 'Ffstat' GDB fileio request.
d1 points to a parameter block containing:
[0] file descriptor
[1] pointer to stat buf, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_GETTIMEOFDAY 11
Get current time; 'Fgettimeofday' GDB fileio request.
d1 points to a parameter block containing:
[0] timeval pointer, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_ISATTY 12
Return true if the file descriptor is the GDB console; 'Fisatty' GDB fileio
request.
d1 points to a parameter block containing:
[0] file descriptor
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_SYSTEM 13
System call; 'Fsystem' GDB fileio request.
d1 points to a parameter block containing:
[0] command pointer
[1] command length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation

View File

@ -100,7 +100,12 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -143,6 +148,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -176,6 +182,7 @@ SECTIONS
*(.gnu.linkonce.b.*)
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;
}

View File

@ -55,7 +55,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -98,6 +104,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -49,7 +49,12 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -92,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -129,6 +135,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -49,7 +49,12 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -92,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -129,6 +135,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -49,7 +49,13 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -92,6 +98,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -130,6 +137,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -56,7 +56,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -99,6 +105,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -136,6 +143,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
PROVIDE (end = .);
_end = .;

View File

@ -58,7 +58,12 @@ SECTIONS
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -101,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -138,6 +144,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
PROVIDE (end = .);
_end = .;

View File

@ -59,7 +59,12 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -102,6 +107,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -139,6 +145,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
PROVIDE (end = .);
_end = .;

View File

@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -94,6 +95,7 @@ SECTIONS
*(.gnu.linkonce.b.*)
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;
}

View File

@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -98,6 +99,7 @@ SECTIONS
. = __stack ;
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -48,7 +48,12 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -91,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -131,6 +137,7 @@ SECTIONS
. = __stack ;
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -59,6 +59,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -97,6 +98,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -56,6 +56,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = fdata;
.data : {
*(.data)
*(.data.*)
@ -94,6 +95,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -48,7 +48,12 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -91,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -127,6 +133,7 @@ SECTIONS
*(.gnu.linkonce.b.*)
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;
}

View File

@ -57,7 +57,12 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame : {
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -105,6 +110,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -59,7 +59,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -107,6 +113,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -62,7 +62,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -110,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -62,7 +62,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -110,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -50,7 +50,13 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -93,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -50,7 +50,13 @@ SECTIONS
}
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -93,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -130,6 +137,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
end = .;
_end = .;

View File

@ -57,7 +57,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -100,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -137,6 +144,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
PROVIDE (end = .);
_end = .;

View File

@ -59,7 +59,13 @@ SECTIONS
_etext = .;
.eh_frame_hdr : { *(.eh_frame_hdr) }
.eh_frame : { KEEP (*(.eh_frame)) }
.eh_frame :
{
/* The .eh_frame section from the crtend file contains the
end of eh_frame marker and it must be last. */
KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
KEEP (*(.eh_frame))
}
.gcc_except_table : { *(.gcc_except_table) }
.jcr : { KEEP (*(.jcr)) }
.ctors :
@ -102,6 +108,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)
@ -139,6 +146,7 @@ SECTIONS
*(COMMON)
}
. = ALIGN(4);
PROVIDE (end = .);
_end = .;

View File

@ -61,7 +61,7 @@ SCRIPTS = $(srcdir)/msp430-sim.ld
SCRIPTS += $(srcdir)/msp430xl-sim.ld
SCRIPTS += $(srcdir)/intr_vectors.ld
CRT = gcrt0.o crt0.o crt0-minrt.o crtn.o crtn-minrt.o
CRT = gcrt0.o crt0.o
SIM_BSP = libsim.a
LIB_NOSYS = libnosys.a
LIB_CRT = libcrt.a
@ -85,8 +85,11 @@ CRT_OBJS = \
crt_movedata.o \
crt_move_highdata.o \
crt_main.o \
crt_main_minrt.o \
crt_callexit.o \
crt_run_init_array.o \
crt_run_preinit_array.o \
crt_run_fini_array.o \
crt_run_array.o \
crt_init.o
#### Host specific Makefile fragment comes in here.
@ -98,12 +101,6 @@ all: $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT) copy_scripts_to_objdir
crt_%.o : crt0.S
$(CC) -DL$* -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
crt0-minrt.o : crt0.S
$(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
crtn-minrt.o : crtn.S
$(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
# Override .S.o rule to pass assembler debugging flags
.S.o:
$(CC) -DL0 -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<

View File

@ -52,21 +52,25 @@ __msp430_resetvec_hook:
START_CRT_FUNC 0000 start
.refsym __msp430_resetvec_hook
#ifdef MINRT
.refsym __crt0_call_just_main
#else
.refsym __crt0_call_init_then_main
#endif
.refsym __crt0_call_main
mov_ #__stack, R1
END_CRT_FUNC start
#endif
;; The CRT functions below will only be present in the final linked
;; executable if the assembler decides they are needed. The assembler will
;; only define the symbol necessary to prevent them being garbage collected
;; by the linker if the file being assembled has a specific section,
;; or some other criteria is met.
;; The exception to this is __crt0_call_exit. GCC will include this function
;; if it detects that main() has an epilogue. For example, if main() has a
;; while(1) loop at the end, GCC will not generate an epilogue (since it won't
;; return) and __crt0_call_exit won't be included.
#if Lbss
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for initializing
;; the contents of the .bss section.
;; This function is responsible for initializing the contents of the
;; .bss section.
START_CRT_FUNC 0100 init_bss
@ -84,9 +88,8 @@ END_CRT_FUNC init_bss
#ifdef __MSP430X_LARGE__
#if Lhigh_bss
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for initializing
;; the contents of the .upper.bss section.
;; This function is responsible for initializing the contents of the
;; .upper.bss section.
START_CRT_FUNC 0200 init_highbss
@ -105,8 +108,7 @@ END_CRT_FUNC init_highbss
#if Lmovedata
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for copying the
;; This function is responsible for copying the
;; contents of the .data section from its load address (in ROM) to
;; its run-time address (in RAM).
@ -129,8 +131,7 @@ END_CRT_FUNC movedata
#ifdef __MSP430X_LARGE__
#if Lmove_highdata
;; Note - this section is only included in the startup code of the application
;; if it is needed. It is responsible either for making sure that the
;; This function is responsible for making sure that the
;; contents of the .upper.data section have their correct startup values.
;; If a copy of the .upper.data section is stored in ROM then this means
;; copying the contents into HIFRAM. If a copy of .upper.data is stored in a
@ -168,44 +169,62 @@ END_CRT_FUNC move_highdata
#endif /* Lmove_highdata */
#endif /* __MSP430X_LARGE__ */
#if Lrun_preinit_array
;; This function is responsible for setting up the arguments
;; required for __crt0_run_array, to run the functions in .preinit_array.
START_CRT_FUNC 0500 run_preinit_array
#if Lmain_minrt
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for just calling
;; main. No initialization code is called first, and main is not
;; expected to return.
mov_ #__preinit_array_start, R4
mov_ #__preinit_array_end, R5
mov_ #PTRsz, R6
call_ #__crt0_run_array
START_CRT_FUNC 0600 call_just_main
END_CRT_FUNC run_preinit_array
#endif /* Lrun_preinit_array */
clr.w R12 ; Set argc == 0
call_ #main
END_CRT_FUNC call_just_main
#endif /* Lmain_minrt */
#if Lrun_init_array
;; This function is responsible for setting up the arguments
;; required for __crt0_run_array, to run the functions in .init_array.
START_CRT_FUNC 0600 run_init_array
mov_ #__init_array_start, R4
mov_ #__init_array_end, R5
mov_ #PTRsz, R6
call_ #__crt0_run_array
END_CRT_FUNC run_init_array
#endif /* Lrun_init_array */
;; FIXME: There are currently no program termination routines executed for
;; msp430.
#if 0
#if Lrun_fini_array
;; Ensure global C++ destructors in .fini_array are called on exit
;; by registering __crt0_run_fini_array with atexit.
START_CRT_FUNC 0700 register_fini_array
mov_ #__crt0_run_fini_array, R12
call_ #atexit
END_CRT_FUNC register_fini_array
#endif /* Lrun_fini_array */
#endif /* 0 */
#if Lmain
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for calling the
;; initialization code - constructors, etc - and then main. If main
;; returns then the following section should be present to catch it.
;; This function is always included and calls main().
START_CRT_FUNC 0700 call_init_then_main
call_ #__msp430_init
START_CRT_FUNC 0800 call_main
clr.w R12 ; Set argc == 0
call_ #main
END_CRT_FUNC call_init_then_main
END_CRT_FUNC call_main
#endif /* Lmain */
#if Lcallexit
;; Note - this section is only included in the startup code of the
;; application if it is needed. It is responsible for calling exit
;; once main has finished.
;; This function is responsible for calling exit once main has finished.
START_CRT_FUNC 0800 call_exit
START_CRT_FUNC 0900 call_exit
call_ #_exit
@ -214,56 +233,33 @@ END_CRT_FUNC call_exit
;----------------------------------------
#ifndef MINRT
#if L0
.section ".crt_0900main_init", "ax", @progbits
.global _msp430_run_init_array
.type _msp430_run_init_array,@function
_msp430_run_init_array:
mov_ #__init_array_start, R4
mov_ #__init_array_end, R5
mov_ #PTRsz, R6
br_ #_msp430_run_array
#if Lrun_fini_array
;; This function is responsible for setting up the arguments
;; required for __crt0_run_array, to run the functions in .fini_array.
START_CRT_FUNC 1000 run_fini_array
.global _msp430_run_preinit_array
.type _msp430_run_preinit_array,@function
_msp430_run_preinit_array:
mov_ #__preinit_array_start, R4
mov_ #__preinit_array_end, R5
mov_ #PTRsz, R6
br_ #_msp430_run_array
.global _msp430_run_fini_array
.type _msp430_run_fini_array,@function
_msp430_run_fini_array:
mov_ #__fini_array_start, R4
mov_ #__fini_array_end, R5
mov_ #-PTRsz, R6
br_ #_msp430_run_array
call_ #__crt0_run_array
END_CRT_FUNC run_fini_array
#endif /* Lrun_fini_array */
#if Lrun_array
;; Note - this section is only included in the startup code of the application
;; if it is needed by one of the above run_*_array functions.
START_CRT_FUNC 1100 run_array
_msp430_run_array:
cmp_ R4, R5
jeq _msp430_run_done
mov_ @R4, R7
add_ R6, R4
call_ @R7
br_ _msp430_run_array
call_ R7
br_ #__crt0_run_array
END_CRT_FUNC run_array
_msp430_run_done:
ret_
;----------------------------------------
.section .init,"ax"
.global __msp430_init
__msp430_init:
.section .fini,"ax"
.global __msp430_fini
__msp430_fini:
call_ #_msp430_run_fini_array
#endif
#endif /* not MINRT */
#endif /* Lrun_array */

View File

@ -1,32 +0,0 @@
/* Copyright (c) 2013 Red Hat, Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the BSD
License. This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license
is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
are incorporated in the source code or documentation are not subject to the BSD
License and may only be used or replicated with the express permission of
Red Hat, Inc.
*/
#include "memmodel.h"
#ifndef MINRT
.section .init,"ax"
call_ #_msp430_run_preinit_array
call_ #_msp430_run_init_array
ret_
.global __msp430_init_end
__msp430_init_end:
.section .fini,"ax"
ret_
.global __msp430_fini_end
__msp430_fini_end:
.text
#endif

View File

@ -106,8 +106,6 @@ SECTIONS
PROVIDE (_etext = .);
PROVIDE (etext = .);
. = ALIGN(2);
KEEP (*(.init))
KEEP (*(.fini))
KEEP (*(.tm_clone_table))
} > RAM

View File

@ -387,8 +387,6 @@ SECTIONS
PROVIDE (_etext = .);
PROVIDE (etext = .);
. = ALIGN(2);
KEEP (*(.init))
KEEP (*(.fini))
KEEP (*(.tm_clone_table))
} > ROM

View File

@ -16,7 +16,7 @@
#include "cio.h"
static int
write_chunk (int fd, char *buf, int len)
write_chunk (int fd, const char *buf, int len)
{
__CIOBUF__.length[0] = len;
__CIOBUF__.length[1] = len >> 8;
@ -35,10 +35,11 @@ write_chunk (int fd, char *buf, int len)
#include <stdio.h>
int
write (int fd, char *buf, int len)
write (int fd, const char *buf, int len)
{
int rv = 0;
int c;
int i = 0;
#if 0
if (fd == 2)
fprintf (stderr, "%.*s", buf, len);
@ -48,12 +49,12 @@ write (int fd, char *buf, int len)
while (len > 0)
{
int l = (len > CIO_BUF_SIZE) ? CIO_BUF_SIZE : len;
c = write_chunk (fd, buf, l);
c = write_chunk (fd, buf + i, l);
if (c < 0)
return c;
rv += l;
len -= l;
buf += l;
i += l;
}
return rv;
}

View File

@ -1,6 +1,6 @@
/* crt0.S -- startup code for Nios II QEMU generic-nommu board emulation.
Copyright (c) 2018 Mentor Graphics
Copyright (c) 2018-2019 Mentor Graphics
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
@ -81,6 +81,18 @@ __reset:
.size __reset, . - __reset
/* Provide a stub interrupt handler that waits in a busy loop.
The alignment puts it at offset 0x20 from the base of RAM. */
.align 5
.globl __interrupt_handler
.type __interrupt_handler, @function
__interrupt_handler:
0:
br 0b
.size __interrupt_handler, . - __interrupt_handler
/* __start is the ELF entry point. */

View File

@ -0,0 +1,197 @@
Copyright (c) 2006 CodeSourcery Inc
Copyright (c) 2018, 2019 Mentor Graphics
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
Nios II Semihosting Protocol
----------------------------
The runtime (libgloss) indicates a semihosting request to the debug
agent by issuing a "break 1" instruction. r4 and r5 are used to pass
parameters per the normal C ABI on nios2.
r4 contains a request code. r5 is typically a pointer to a 4-word
parameter block, except for the exit operation where it is an
immediate integer value.
The result of the operation is returned in the first word of the
parameter block. The second word is used to return an errno value,
encoded per the "Errno Values" section of the RSP documentation in the
GDB User Manual.
The supported r4 request codes are:
#define HOSTED_EXIT 0
Terminate program execution; send a 'W' stop reply to GDB.
r5 contains the exit code, as an immediate integer rather than indirectly
in a parameter block. This semihosting request isn't expected to return.
#define HOSTED_INIT_SIM 1
Reserved/unimplemented.
#define HOSTED_OPEN 2
Open file; 'Fopen' GDB fileio request.
r5 points to a parameter block containing:
[0] pointer to filename
[1] filename length
[2] open flags, encoded per the GDB RSP documentation
[3] mode, encoded per the GDB RSP documentation
Return values in parameter block:
[0] file descriptor or -1 on error
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_CLOSE 3
Close file; 'Fclose' GDB fileio request.
r5 points to a parameter block containing:
[0] file descriptor
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_READ 4
Read from file; 'Fread' GDB fileio request.
r5 points to a parameter block containing:
[0] file descriptor
[1] pointer to buffer
[2] buffer size
Return values in parameter block:
[0] number of bytes read
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_WRITE 5
Write to file; 'Fwrite' GDB fileio request.
r5 points to a parameter block containing:
[0] file descriptor
[1] pointer to buffer
[2] byte count
Return values in parameter block:
[0] number of bytes written
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_LSEEK 6
File seek; 'Flseek' GDB fileio request.
r5 points to a parameter block containing:
[0] file descriptor
[1] high word of 64-bit offset
[2] low word of 64-bit offset
[3] seek flag, encoded per the GDB RSP documentation
Return values in parameter block:
[0] high word of 64-bit result
[1] low word of 64-bit result
[2] errno, encoded per the GDB RSP documentation
#define HOSTED_RENAME 7
File rename; 'Frename' GDB fileio request.
r5 points to a parameter block containing:
[0] oldname pointer
[1] oldname length
[2] newname pointer
[3] newname length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_UNLINK 8
File unlink/delete; 'Funlink' GDB fileio request.
r5 points to a parameter block containing:
[0] filename pointer
[1] filename length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_STAT 9
File information; 'Fstat' GDB fileio request.
r5 points to a parameter block containing:
[0] filename pointer
[1] filename length
[2] pointer to stat buf, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_FSTAT 10
File information; 'Ffstat' GDB fileio request.
r5 points to a parameter block containing:
[0] file descriptor
[1] pointer to stat buf, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_GETTIMEOFDAY 11
Get current time; 'Fgettimeofday' GDB fileio request.
r5 points to a parameter block containing:
[0] timeval pointer, using the structure definition in the GDB RSP
documentation
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_ISATTY 12
Return true if the file descriptor is the GDB console; 'Fisatty' GDB fileio
request.
r5 points to a parameter block containing:
[0] file descriptor
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation
#define HOSTED_SYSTEM 13
System call; 'Fsystem' GDB fileio request.
r5 points to a parameter block containing:
[0] command pointer
[1] command length
Return values in parameter block:
[0] return status
[1] errno, encoded per the GDB RSP documentation

View File

@ -9,6 +9,8 @@
http://www.opensource.org/licenses.
*/
#include "newlib.h"
#=========================================================================
# crt0.S : Entry point for RISC-V user programs
#=========================================================================
@ -30,9 +32,20 @@ _start:
sub a2, a2, a0
li a1, 0
call memset
#ifdef _LITE_EXIT
# Make reference to atexit weak to avoid unconditionally pulling in
# support code. Refer to comments in __atexit.c for more details.
.weak atexit
la a0, atexit
beqz a0, .Lweak_atexit
.weak __libc_fini_array
#endif
la a0, __libc_fini_array # Register global termination functions
call atexit # to be called upon exit
#ifdef _LITE_EXIT
.Lweak_atexit:
#endif
call __libc_init_array # Run global initialization functions
lw a0, 0(sp) # a0 = argc

View File

@ -1,3 +1,17 @@
*** Major changes in newlib version 3.1.0:
- global stdio streams support added for reent small
- _CLOCKID_T made system configurable
- generated Unicode 10.0 width data, case conversion data,
character category data
- Unicode table generation scripts fixed/enhanced
- performance enhancements for qsort, strstr
- nvptx port added
- sinf/cosf/sincosf/exp/exp2/log/log2/pow rewritten for performance and accuracy
- various gcc warnings fixed
- various standard improvements
*** Major changes in newlib version 3.0.0:
- K&R support removed in code and docs

View File

@ -2,7 +2,7 @@ dnl This provides configure definitions used by all the newlib
dnl configure.in files.
AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[3]))
AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[0]))
AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[1]))
AC_DEFUN([DEF_NEWLIB_PATCHLEVEL_VERSION],m4_define([NEWLIB_PATCHLEVEL_VERSION],[0]))
AC_DEFUN([DEF_NEWLIB_VERSION],m4_define([NEWLIB_VERSION],[NEWLIB_MAJOR_VERSION.NEWLIB_MINOR_VERSION.NEWLIB_PATCHLEVEL_VERSION]))

24
newlib/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1379,7 +1379,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1449,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1584,7 +1584,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1862,7 +1862,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -3222,7 +3222,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -12424,13 +12424,13 @@ _ACEOF
fi
$as_echo "#define _NEWLIB_VERSION \"3.0.0\"" >>confdefs.h
$as_echo "#define _NEWLIB_VERSION \"3.1.0\"" >>confdefs.h
$as_echo "#define __NEWLIB__ 3" >>confdefs.h
$as_echo "#define __NEWLIB_MINOR__ 0" >>confdefs.h
$as_echo "#define __NEWLIB_MINOR__ 1" >>confdefs.h
$as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h
@ -13363,7 +13363,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -13429,7 +13429,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -118,6 +118,11 @@ case "${host_cpu}" in
machine_dir=aarch64
libm_machine_dir=aarch64
;;
amdgcn*)
newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__"
machine_dir=amdgcn
libc_cv_initfinit_array=yes
;;
arc*)
machine_dir=arc
;;
@ -449,6 +454,10 @@ case "${host}" in
aarch64*-*-*)
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
;;
amdgcn*)
sys_dir=amdgcn
have_crt0="no"
;;
arm*-*-*)
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
sys_dir=arm

36
newlib/doc/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -691,6 +691,7 @@ enable_newlib_iconv
enable_newlib_elix_level
enable_newlib_io_float
enable_newlib_supplied_syscalls
enable_newlib_fno_builtin
enable_dependency_tracking
enable_maintainer_mode
'
@ -1241,7 +1242,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1311,7 +1312,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1327,6 +1328,7 @@ Optional Features:
--enable-newlib-elix-level supply desired elix library level (1-4)
--disable-newlib-io-float disable printf/scanf family float support
--disable-newlib-supplied-syscalls disable newlib from supplying syscalls
--disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@ -1402,7 +1404,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1459,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2491,6 +2493,18 @@ else
fi
# Check whether --enable-newlib-fno-builtin was given.
if test "${enable_newlib_fno_builtin+set}" = set; then :
enableval=$enable_newlib_fno_builtin; case "${enableval}" in
yes) newlib_fno_builtin=yes ;;
no) newlib_fno_builtin=no ;;
*) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;;
esac
else
newlib_fno_builtin=
fi
test -z "${with_target_subdir}" && with_target_subdir=.
@ -2529,7 +2543,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -3337,8 +3351,6 @@ fi
. ${newlib_basedir}/configure.host
newlib_cflags="${newlib_cflags} -fno-builtin"
NEWLIB_CFLAGS=${newlib_cflags}
@ -4051,7 +4063,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4108,7 +4120,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -760,6 +760,7 @@ enable_newlib_iconv
enable_newlib_elix_level
enable_newlib_io_float
enable_newlib_supplied_syscalls
enable_newlib_fno_builtin
enable_dependency_tracking
enable_maintainer_mode
enable_shared
@ -1322,7 +1323,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1392,7 +1393,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1408,6 +1409,7 @@ Optional Features:
--enable-newlib-elix-level supply desired elix library level (1-4)
--disable-newlib-io-float disable printf/scanf family float support
--disable-newlib-supplied-syscalls disable newlib from supplying syscalls
--disable-newlib-fno-builtin disable -fno-builtin flag to allow compiler to use builtin library functions
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-maintainer-mode enable make rules and dependencies not useful
@ -1503,7 +1505,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1781,7 +1783,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2815,6 +2817,18 @@ else
fi
# Check whether --enable-newlib-fno-builtin was given.
if test "${enable_newlib_fno_builtin+set}" = set; then :
enableval=$enable_newlib_fno_builtin; case "${enableval}" in
yes) newlib_fno_builtin=yes ;;
no) newlib_fno_builtin=no ;;
*) as_fn_error $? "bad value ${enableval} for newlib-fno-builtin option" "$LINENO" 5 ;;
esac
else
newlib_fno_builtin=
fi
test -z "${with_target_subdir}" && with_target_subdir=.
@ -2853,7 +2867,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -3661,8 +3675,6 @@ fi
. ${newlib_basedir}/configure.host
newlib_cflags="${newlib_cflags} -fno-builtin"
NEWLIB_CFLAGS=${newlib_cflags}
@ -11431,7 +11443,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11434 "configure"
#line 11446 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11537,7 +11549,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11540 "configure"
#line 11552 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12384,7 +12396,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -12441,7 +12453,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

20
newlib/libc/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1441,7 +1441,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1557,7 +1557,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1835,7 +1835,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2982,7 +2982,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -12795,7 +12795,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -12852,7 +12852,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -165,6 +165,8 @@
{0x10A0, 37, TOLO, 7264},
{0x10C7, 0, TOLO, 7264},
{0x10CD, 0, TOLO, 7264},
{0x10D0, 42, TOUP, 3008},
{0x10FD, 2, TOUP, 3008},
{0x13A0, 79, TOLO, 38864},
{0x13F0, 5, TOLO, 8},
{0x13F8, 5, TOUP, -8},
@ -176,6 +178,8 @@
{0x1C86, 0, TOUP, -6236},
{0x1C87, 0, TOUP, -6181},
{0x1C88, 0, TOUP, 35266},
{0x1C90, 42, TOLO, -3008},
{0x1CBD, 2, TOLO, -3008},
{0x1D79, 0, TOUP, 35332},
{0x1D7D, 0, TOUP, 3814},
{0x1E00, 149, TO1, EVENCAP},
@ -287,7 +291,7 @@
{0xA7B1, 0, TOLO, -42282},
{0xA7B2, 0, TOLO, -42261},
{0xA7B3, 0, TOLO, 928},
{0xA7B4, 3, TO1, EVENCAP},
{0xA7B4, 5, TO1, EVENCAP},
{0xAB53, 0, TOUP, -928},
{0xAB70, 79, TOUP, -38864},
{0xFF21, 25, TOLO, 32},
@ -300,5 +304,7 @@
{0x10CC0, 50, TOUP, -64},
{0x118A0, 31, TOLO, 32},
{0x118C0, 31, TOUP, -32},
{0x16E40, 31, TOLO, 32},
{0x16E60, 31, TOUP, -32},
{0x1E900, 33, TOLO, 34},
{0x1E922, 33, TOUP, -34},

View File

@ -19,7 +19,7 @@ bisearch_cat(wint_t ucs, const struct _category *table, int max)
int mid;
if (ucs < table[0].first || ucs > table[max].first + table[max].delta)
return 0;
return -1;
while (max >= min)
{
mid = (min + max) / 2;

View File

@ -168,8 +168,9 @@
{CAT_LC, 0x0531, 37},
{CAT_Lm, 0x0559, 0},
{CAT_Po, 0x055A, 5},
{CAT_Ll, 0x0560, 0},
{CAT_LC, 0x0561, 37},
{CAT_Ll, 0x0587, 0},
{CAT_Ll, 0x0587, 1},
{CAT_Po, 0x0589, 0},
{CAT_Pd, 0x058A, 0},
{CAT_So, 0x058D, 1},
@ -184,7 +185,7 @@
{CAT_Po, 0x05C6, 0},
{CAT_Mn, 0x05C7, 0},
{CAT_Lo, 0x05D0, 26},
{CAT_Lo, 0x05F0, 2},
{CAT_Lo, 0x05EF, 3},
{CAT_Po, 0x05F3, 1},
{CAT_Cf, 0x0600, 5},
{CAT_Sm, 0x0606, 2},
@ -236,6 +237,8 @@
{CAT_So, 0x07F6, 0},
{CAT_Po, 0x07F7, 2},
{CAT_Lm, 0x07FA, 0},
{CAT_Mn, 0x07FD, 0},
{CAT_Sc, 0x07FE, 1},
{CAT_Lo, 0x0800, 21},
{CAT_Mn, 0x0816, 3},
{CAT_Lm, 0x081A, 0},
@ -251,7 +254,7 @@
{CAT_Lo, 0x0860, 10},
{CAT_Lo, 0x08A0, 20},
{CAT_Lo, 0x08B6, 7},
{CAT_Mn, 0x08D4, 13},
{CAT_Mn, 0x08D3, 14},
{CAT_Cf, 0x08E2, 0},
{CAT_Mn, 0x08E3, 31},
{CAT_Mc, 0x0903, 0},
@ -302,6 +305,7 @@
{CAT_Sc, 0x09FB, 0},
{CAT_Lo, 0x09FC, 0},
{CAT_Po, 0x09FD, 0},
{CAT_Mn, 0x09FE, 0},
{CAT_Mn, 0x0A01, 1},
{CAT_Mc, 0x0A03, 0},
{CAT_Lo, 0x0A05, 5},
@ -323,6 +327,7 @@
{CAT_Mn, 0x0A70, 1},
{CAT_Lo, 0x0A72, 2},
{CAT_Mn, 0x0A75, 0},
{CAT_Po, 0x0A76, 0},
{CAT_Mn, 0x0A81, 1},
{CAT_Mc, 0x0A83, 0},
{CAT_Lo, 0x0A85, 8},
@ -399,6 +404,7 @@
{CAT_So, 0x0BFA, 0},
{CAT_Mn, 0x0C00, 0},
{CAT_Mc, 0x0C01, 2},
{CAT_Mn, 0x0C04, 0},
{CAT_Lo, 0x0C05, 7},
{CAT_Lo, 0x0C0E, 2},
{CAT_Lo, 0x0C12, 22},
@ -418,6 +424,7 @@
{CAT_Lo, 0x0C80, 0},
{CAT_Mn, 0x0C81, 0},
{CAT_Mc, 0x0C82, 1},
{CAT_Po, 0x0C84, 0},
{CAT_Lo, 0x0C85, 7},
{CAT_Lo, 0x0C8E, 2},
{CAT_Lo, 0x0C92, 22},
@ -584,10 +591,11 @@
{CAT_LC, 0x10A0, 37},
{CAT_LC, 0x10C7, 0},
{CAT_LC, 0x10CD, 0},
{CAT_Lo, 0x10D0, 42},
{CAT_LC, 0x10D0, 42},
{CAT_Po, 0x10FB, 0},
{CAT_Lm, 0x10FC, 0},
{CAT_Lo, 0x10FD, 331},
{CAT_LC, 0x10FD, 2},
{CAT_Lo, 0x1100, 328},
{CAT_Lo, 0x124A, 3},
{CAT_Lo, 0x1250, 6},
{CAT_Lo, 0x1258, 0},
@ -657,7 +665,7 @@
{CAT_Nd, 0x1810, 9},
{CAT_Lo, 0x1820, 34},
{CAT_Lm, 0x1843, 0},
{CAT_Lo, 0x1844, 51},
{CAT_Lo, 0x1844, 52},
{CAT_Lo, 0x1880, 4},
{CAT_Mn, 0x1885, 1},
{CAT_Lo, 0x1887, 33},
@ -759,6 +767,8 @@
{CAT_Lm, 0x1C78, 5},
{CAT_Po, 0x1C7E, 1},
{CAT_LC, 0x1C80, 8},
{CAT_LC, 0x1C90, 42},
{CAT_LC, 0x1CBD, 2},
{CAT_Po, 0x1CC0, 7},
{CAT_Mn, 0x1CD0, 2},
{CAT_Po, 0x1CD3, 0},
@ -1066,10 +1076,8 @@
{CAT_Sm, 0x2B47, 5},
{CAT_So, 0x2B4D, 38},
{CAT_So, 0x2B76, 31},
{CAT_So, 0x2B98, 33},
{CAT_So, 0x2BBD, 11},
{CAT_So, 0x2BCA, 8},
{CAT_So, 0x2BEC, 3},
{CAT_So, 0x2B98, 48},
{CAT_So, 0x2BCA, 52},
{CAT_LC, 0x2C00, 46},
{CAT_LC, 0x2C30, 46},
{CAT_LC, 0x2C60, 16},
@ -1142,7 +1150,7 @@
{CAT_Pd, 0x2E40, 0},
{CAT_Po, 0x2E41, 0},
{CAT_Ps, 0x2E42, 0},
{CAT_Po, 0x2E43, 6},
{CAT_Po, 0x2E43, 11},
{CAT_So, 0x2E80, 25},
{CAT_So, 0x2E9B, 88},
{CAT_So, 0x2F00, 213},
@ -1197,7 +1205,7 @@
{CAT_Po, 0x30FB, 0},
{CAT_Lm, 0x30FC, 2},
{CAT_Lo, 0x30FF, 0},
{CAT_Lo, 0x3105, 41},
{CAT_Lo, 0x3105, 42},
{CAT_Lo, 0x3131, 93},
{CAT_So, 0x3190, 1},
{CAT_No, 0x3192, 3},
@ -1219,7 +1227,7 @@
{CAT_So, 0x3300, 255},
{CAT_Lo, 0x3400, 6581},
{CAT_So, 0x4DC0, 63},
{CAT_Lo, 0x4E00, 20970},
{CAT_Lo, 0x4E00, 20975},
{CAT_Lo, 0xA000, 20},
{CAT_Lm, 0xA015, 0},
{CAT_Lo, 0xA016, 1142},
@ -1265,7 +1273,8 @@
{CAT_LC, 0xA790, 3},
{CAT_Ll, 0xA794, 1},
{CAT_LC, 0xA796, 24},
{CAT_LC, 0xA7B0, 7},
{CAT_Ll, 0xA7AF, 0},
{CAT_LC, 0xA7B0, 9},
{CAT_Lo, 0xA7F7, 0},
{CAT_Lm, 0xA7F8, 1},
{CAT_Ll, 0xA7FA, 0},
@ -1297,7 +1306,8 @@
{CAT_Po, 0xA8F8, 2},
{CAT_Lo, 0xA8FB, 0},
{CAT_Po, 0xA8FC, 0},
{CAT_Lo, 0xA8FD, 0},
{CAT_Lo, 0xA8FD, 1},
{CAT_Mn, 0xA8FF, 0},
{CAT_Nd, 0xA900, 9},
{CAT_Lo, 0xA90A, 27},
{CAT_Mn, 0xA926, 7},
@ -1599,10 +1609,10 @@
{CAT_Mn, 0x10A0C, 3},
{CAT_Lo, 0x10A10, 3},
{CAT_Lo, 0x10A15, 2},
{CAT_Lo, 0x10A19, 26},
{CAT_Lo, 0x10A19, 28},
{CAT_Mn, 0x10A38, 2},
{CAT_Mn, 0x10A3F, 0},
{CAT_No, 0x10A40, 7},
{CAT_No, 0x10A40, 8},
{CAT_Po, 0x10A50, 8},
{CAT_Lo, 0x10A60, 28},
{CAT_No, 0x10A7D, 1},
@ -1628,7 +1638,17 @@
{CAT_LC, 0x10C80, 50},
{CAT_LC, 0x10CC0, 50},
{CAT_No, 0x10CFA, 5},
{CAT_Lo, 0x10D00, 35},
{CAT_Mn, 0x10D24, 3},
{CAT_Nd, 0x10D30, 9},
{CAT_No, 0x10E60, 30},
{CAT_Lo, 0x10F00, 28},
{CAT_No, 0x10F1D, 9},
{CAT_Lo, 0x10F27, 0},
{CAT_Lo, 0x10F30, 21},
{CAT_Mn, 0x10F46, 10},
{CAT_No, 0x10F51, 3},
{CAT_Po, 0x10F55, 4},
{CAT_Mc, 0x11000, 0},
{CAT_Mn, 0x11001, 0},
{CAT_Mc, 0x11002, 0},
@ -1647,6 +1667,7 @@
{CAT_Po, 0x110BB, 1},
{CAT_Cf, 0x110BD, 0},
{CAT_Po, 0x110BE, 3},
{CAT_Cf, 0x110CD, 0},
{CAT_Lo, 0x110D0, 24},
{CAT_Nd, 0x110F0, 9},
{CAT_Mn, 0x11100, 2},
@ -1656,6 +1677,8 @@
{CAT_Mn, 0x1112D, 7},
{CAT_Nd, 0x11136, 9},
{CAT_Po, 0x11140, 3},
{CAT_Lo, 0x11144, 0},
{CAT_Mc, 0x11145, 1},
{CAT_Lo, 0x11150, 34},
{CAT_Mn, 0x11173, 0},
{CAT_Po, 0x11174, 1},
@ -1667,8 +1690,8 @@
{CAT_Mn, 0x111B6, 8},
{CAT_Mc, 0x111BF, 1},
{CAT_Lo, 0x111C1, 3},
{CAT_Po, 0x111C5, 4},
{CAT_Mn, 0x111CA, 2},
{CAT_Po, 0x111C5, 3},
{CAT_Mn, 0x111C9, 3},
{CAT_Po, 0x111CD, 0},
{CAT_Nd, 0x111D0, 9},
{CAT_Lo, 0x111DA, 0},
@ -1705,7 +1728,7 @@
{CAT_Lo, 0x1132A, 6},
{CAT_Lo, 0x11332, 1},
{CAT_Lo, 0x11335, 4},
{CAT_Mn, 0x1133C, 0},
{CAT_Mn, 0x1133B, 1},
{CAT_Lo, 0x1133D, 0},
{CAT_Mc, 0x1133E, 1},
{CAT_Mn, 0x11340, 0},
@ -1730,6 +1753,7 @@
{CAT_Nd, 0x11450, 9},
{CAT_Po, 0x1145B, 0},
{CAT_Po, 0x1145D, 0},
{CAT_Mn, 0x1145E, 0},
{CAT_Lo, 0x11480, 47},
{CAT_Mc, 0x114B0, 2},
{CAT_Mn, 0x114B3, 5},
@ -1773,7 +1797,7 @@
{CAT_Mc, 0x116B6, 0},
{CAT_Mn, 0x116B7, 0},
{CAT_Nd, 0x116C0, 9},
{CAT_Lo, 0x11700, 25},
{CAT_Lo, 0x11700, 26},
{CAT_Mn, 0x1171D, 2},
{CAT_Mc, 0x11720, 1},
{CAT_Mn, 0x11722, 3},
@ -1783,14 +1807,18 @@
{CAT_No, 0x1173A, 1},
{CAT_Po, 0x1173C, 2},
{CAT_So, 0x1173F, 0},
{CAT_Lo, 0x11800, 43},
{CAT_Mc, 0x1182C, 2},
{CAT_Mn, 0x1182F, 8},
{CAT_Mc, 0x11838, 0},
{CAT_Mn, 0x11839, 1},
{CAT_Po, 0x1183B, 0},
{CAT_LC, 0x118A0, 63},
{CAT_Nd, 0x118E0, 9},
{CAT_No, 0x118EA, 8},
{CAT_Lo, 0x118FF, 0},
{CAT_Lo, 0x11A00, 0},
{CAT_Mn, 0x11A01, 5},
{CAT_Mc, 0x11A07, 1},
{CAT_Mn, 0x11A09, 1},
{CAT_Mn, 0x11A01, 9},
{CAT_Lo, 0x11A0B, 39},
{CAT_Mn, 0x11A33, 5},
{CAT_Mc, 0x11A39, 0},
@ -1808,6 +1836,7 @@
{CAT_Mc, 0x11A97, 0},
{CAT_Mn, 0x11A98, 1},
{CAT_Po, 0x11A9A, 2},
{CAT_Lo, 0x11A9D, 0},
{CAT_Po, 0x11A9E, 4},
{CAT_Lo, 0x11AC0, 56},
{CAT_Lo, 0x11C00, 8},
@ -1840,6 +1869,21 @@
{CAT_Lo, 0x11D46, 0},
{CAT_Mn, 0x11D47, 0},
{CAT_Nd, 0x11D50, 9},
{CAT_Lo, 0x11D60, 5},
{CAT_Lo, 0x11D67, 1},
{CAT_Lo, 0x11D6A, 31},
{CAT_Mc, 0x11D8A, 4},
{CAT_Mn, 0x11D90, 1},
{CAT_Mc, 0x11D93, 1},
{CAT_Mn, 0x11D95, 0},
{CAT_Mc, 0x11D96, 0},
{CAT_Mn, 0x11D97, 0},
{CAT_Lo, 0x11D98, 0},
{CAT_Nd, 0x11DA0, 9},
{CAT_Lo, 0x11EE0, 18},
{CAT_Mn, 0x11EF3, 1},
{CAT_Mc, 0x11EF5, 1},
{CAT_Po, 0x11EF7, 1},
{CAT_Lo, 0x12000, 921},
{CAT_Nl, 0x12400, 110},
{CAT_Po, 0x12470, 4},
@ -1864,13 +1908,16 @@
{CAT_No, 0x16B5B, 6},
{CAT_Lo, 0x16B63, 20},
{CAT_Lo, 0x16B7D, 18},
{CAT_LC, 0x16E40, 63},
{CAT_No, 0x16E80, 22},
{CAT_Po, 0x16E97, 3},
{CAT_Lo, 0x16F00, 68},
{CAT_Lo, 0x16F50, 0},
{CAT_Mc, 0x16F51, 45},
{CAT_Mn, 0x16F8F, 3},
{CAT_Lm, 0x16F93, 12},
{CAT_Lm, 0x16FE0, 1},
{CAT_Lo, 0x17000, 6124},
{CAT_Lo, 0x17000, 6129},
{CAT_Lo, 0x18800, 754},
{CAT_Lo, 0x1B000, 286},
{CAT_Lo, 0x1B170, 395},
@ -1899,8 +1946,9 @@
{CAT_So, 0x1D200, 65},
{CAT_Mn, 0x1D242, 2},
{CAT_So, 0x1D245, 0},
{CAT_No, 0x1D2E0, 19},
{CAT_So, 0x1D300, 86},
{CAT_No, 0x1D360, 17},
{CAT_No, 0x1D360, 24},
{CAT_Lu, 0x1D400, 25},
{CAT_Ll, 0x1D41A, 25},
{CAT_Lu, 0x1D434, 25},
@ -1995,6 +2043,11 @@
{CAT_Mn, 0x1E944, 6},
{CAT_Nd, 0x1E950, 9},
{CAT_Po, 0x1E95E, 1},
{CAT_No, 0x1EC71, 58},
{CAT_So, 0x1ECAC, 0},
{CAT_No, 0x1ECAD, 2},
{CAT_Sc, 0x1ECB0, 0},
{CAT_No, 0x1ECB1, 3},
{CAT_Lo, 0x1EE00, 3},
{CAT_Lo, 0x1EE05, 26},
{CAT_Lo, 0x1EE21, 1},
@ -2036,8 +2089,7 @@
{CAT_So, 0x1F0C1, 14},
{CAT_So, 0x1F0D1, 36},
{CAT_No, 0x1F100, 12},
{CAT_So, 0x1F110, 30},
{CAT_So, 0x1F130, 59},
{CAT_So, 0x1F110, 91},
{CAT_So, 0x1F170, 60},
{CAT_So, 0x1F1E6, 28},
{CAT_So, 0x1F210, 43},
@ -2048,9 +2100,9 @@
{CAT_Sk, 0x1F3FB, 4},
{CAT_So, 0x1F400, 724},
{CAT_So, 0x1F6E0, 12},
{CAT_So, 0x1F6F0, 8},
{CAT_So, 0x1F6F0, 9},
{CAT_So, 0x1F700, 115},
{CAT_So, 0x1F780, 84},
{CAT_So, 0x1F780, 88},
{CAT_So, 0x1F800, 11},
{CAT_So, 0x1F810, 55},
{CAT_So, 0x1F850, 9},
@ -2058,11 +2110,14 @@
{CAT_So, 0x1F890, 29},
{CAT_So, 0x1F900, 11},
{CAT_So, 0x1F910, 46},
{CAT_So, 0x1F940, 12},
{CAT_So, 0x1F950, 27},
{CAT_So, 0x1F980, 23},
{CAT_So, 0x1F9C0, 0},
{CAT_So, 0x1F9D0, 22},
{CAT_So, 0x1F940, 48},
{CAT_So, 0x1F973, 3},
{CAT_So, 0x1F97A, 0},
{CAT_So, 0x1F97C, 38},
{CAT_So, 0x1F9B0, 9},
{CAT_So, 0x1F9C0, 2},
{CAT_So, 0x1F9D0, 47},
{CAT_So, 0x1FA60, 13},
{CAT_Lo, 0x20000, 42710},
{CAT_Lo, 0x2A700, 4148},
{CAT_Lo, 0x2B740, 221},

View File

@ -5,7 +5,7 @@
#include <sys/cdefs.h>
#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_COMPILING_NEWLIB)
#include <xlocale.h>
#include <sys/_locale.h>
#endif
_BEGIN_STD_C

View File

@ -22,7 +22,7 @@
#include <stddef.h>
#if __BSD_VISIBLE
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#define __STRINGIFY(a) #a

View File

@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#ifndef _NL_ITEM_DECLARED

View File

@ -23,7 +23,7 @@
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
#include <xlocale.h>
#include <sys/_locale.h>
#define LC_ALL_MASK (1 << LC_ALL)
#define LC_COLLATE_MASK (1 << LC_COLLATE)

View File

@ -452,6 +452,10 @@
#define __IEEE_BIG_ENDIAN
#endif
#ifdef __AMDGCN__
#define __IEEE_LITTLE_ENDIAN
#endif
#ifdef __CYGWIN__
#define __OBSOLETE_MATH_DEFAULT 0
#endif

View File

@ -2,7 +2,10 @@
_BEGIN_STD_C
#if defined(__or1k__) || defined(__or1knd__)
#define _JBLEN 31 /* 32 GPRs - r0 */
/*
* r1, r2, r9, r14, r16 .. r30, SR.
*/
#define _JBLEN 13
#define _JBTYPE unsigned long
#endif

View File

@ -5,3 +5,9 @@
#ifndef _SYS_TYPES_H
#error "must be included via <sys/types.h>"
#endif /* !_SYS_TYPES_H */
#if defined(__XMK__) && defined(___int64_t_defined)
typedef __uint64_t u_quad_t;
typedef __int64_t quad_t;
typedef quad_t * qaddr_t;
#endif

View File

@ -568,41 +568,6 @@ extern int *__signgam (void);
#define __signgam_r(ptr) _REENT_SIGNGAM(ptr)
#endif /* __MISC_VISIBLE || __XSI_VISIBLE */
#if __SVID_VISIBLE
/* The exception structure passed to the matherr routine. */
/* We have a problem when using C++ since `exception' is a reserved
name in C++. */
#ifdef __cplusplus
struct __exception
#else
struct exception
#endif
{
int type;
char *name;
double arg1;
double arg2;
double retval;
int err;
};
#ifdef __cplusplus
extern int matherr (struct __exception *e);
#else
extern int matherr (struct exception *e);
#endif
/* Values for the type field of struct exception. */
#define DOMAIN 1
#define SING 2
#define OVERFLOW 3
#define UNDERFLOW 4
#define TLOSS 5
#define PLOSS 6
#endif /* __SVID_VISIBLE */
/* Useful constants. */
#if __BSD_VISIBLE || __XSI_VISIBLE
@ -642,8 +607,6 @@ extern int matherr (struct exception *e);
enum __fdlibm_version
{
__fdlibm_ieee = -1,
__fdlibm_svid,
__fdlibm_xopen,
__fdlibm_posix
};
@ -653,8 +616,6 @@ enum __fdlibm_version
extern __IMPORT _LIB_VERSION_TYPE _LIB_VERSION;
#define _IEEE_ __fdlibm_ieee
#define _SVID_ __fdlibm_svid
#define _XOPEN_ __fdlibm_xopen
#define _POSIX_ __fdlibm_posix
#endif /* __BSD_VISIBLE */

View File

@ -0,0 +1,90 @@
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Margo Seltzer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ndbm.h 8.1 (Berkeley) 6/2/93
* $FreeBSD$ : src/include/ndbm.h
* Nov 20 19:45:28 2017 UTC by pfg
* SVN Revision 326024
*/
#ifndef _NDBM_H_
#define _NDBM_H_
/* #include <db.h> */
/*
* The above header-file is directly included in `newlib/libc/search/ndbm.c`
* as `db.h` is present in form of `db_local.h`, inside `newlib/libc/search`
* directory and not in `newlib/libc/include`.
* Necessary data-types are mentioned in form of forward-declarations
*/
/* Map dbm interface onto db(3). */
#define DBM_RDONLY O_RDONLY
/* Flags to dbm_store(). */
#define DBM_INSERT 0
#define DBM_REPLACE 1
/*
* The db(3) support for ndbm always appends this suffix to the
* file name to avoid overwriting the user's original database.
*/
#define DBM_SUFFIX ".db"
typedef struct {
void *dptr;
int dsize; /* XXX Should be size_t according to 1003.1-2008. */
} datum;
struct __db; /* Forward-declaration */
typedef struct __db DB; /* Forward-declaration */
typedef DB DBM;
#define dbm_pagfno(a) DBM_PAGFNO_NOT_AVAILABLE
__BEGIN_DECLS
int dbm_clearerr(DBM *);
void dbm_close(DBM *);
int dbm_delete(DBM *, datum);
int dbm_error(DBM *);
datum dbm_fetch(DBM *, datum);
datum dbm_firstkey(DBM *);
datum dbm_nextkey(DBM *);
DBM *dbm_open(const char *, int, mode_t);
int dbm_store(DBM *, datum, datum, int);
#if __BSD_VISIBLE
int dbm_dirfno(DBM *);
#endif
__END_DECLS
#endif /* !_NDBM_H_ */

View File

@ -92,6 +92,11 @@ int sched_yield( void );
#if __GNU_VISIBLE
int sched_getcpu(void);
int sched_getaffinity (pid_t, size_t, cpu_set_t *);
int sched_get_thread_affinity (void *, size_t, cpu_set_t *);
int sched_setaffinity (pid_t, size_t, const cpu_set_t *);
int sched_set_thread_affinity (void *, size_t, const cpu_set_t *);
#endif
#ifdef __cplusplus

View File

@ -180,7 +180,7 @@ typedef _fpos64_t fpos64_t;
#if __POSIX_VISIBLE
char * ctermid (char *);
#endif
#if __XSI_VISIBLE && __XSI_VISIBLE < 600
#if __GNU_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)
char * cuserid (char *);
#endif
FILE * tmpfile (void);

View File

@ -27,7 +27,7 @@
#endif
#if __GNU_VISIBLE
#include <xlocale.h>
#include <sys/_locale.h>
#endif
_BEGIN_STD_C
@ -94,6 +94,9 @@ void exit (int __status) _ATTRIBUTE ((__noreturn__));
void free (void *) _NOTHROW;
char * getenv (const char *__string);
char * _getenv_r (struct _reent *, const char *__string);
#if __GNU_VISIBLE
char * secure_getenv (const char *__string);
#endif
char * _findenv (const char *, int *);
char * _findenv_r (struct _reent *, const char *, int *);
#if __POSIX_VISIBLE >= 200809

View File

@ -17,7 +17,7 @@
#include <stddef.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#if __BSD_VISIBLE

View File

@ -33,7 +33,7 @@
#include <sys/_types.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#ifndef _SIZE_T_DECLARED

View File

@ -35,6 +35,7 @@ extern "C" {
#if defined (__CYGWIN__)
#define _FTMPFILE 0x800000
#define _FNOATIME 0x1000000
#define _FPATH 0x2000000
#endif
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
@ -80,6 +81,7 @@ extern "C" {
#if __GNU_VISIBLE
#define O_TMPFILE _FTMPFILE
#define O_NOATIME _FNOATIME
#define O_PATH _FPATH
#endif
#endif
@ -164,6 +166,9 @@ extern "C" {
#define AT_SYMLINK_NOFOLLOW 2
#define AT_SYMLINK_FOLLOW 4
#define AT_REMOVEDIR 8
#if __GNU_VISIBLE
#define AT_EMPTY_PATH 16
#endif
#endif
#if __BSD_VISIBLE

View File

@ -37,6 +37,7 @@
#pragma push_macro("char")
#pragma push_macro("short")
#pragma push_macro("__int20")
#pragma push_macro("__int20__")
#pragma push_macro("int")
#pragma push_macro("long")
#undef signed
@ -45,12 +46,14 @@
#undef short
#undef int
#undef __int20
#undef __int20__
#undef long
#define signed +0
#define unsigned +0
#define char +0
#define short +1
#define __int20 +2
#define __int20__ +2
#define int +2
#define long +4
#if (__INTPTR_TYPE__ == 8 || __INTPTR_TYPE__ == 10)
@ -189,6 +192,7 @@
#pragma pop_macro("char")
#pragma pop_macro("short")
#pragma pop_macro("__int20")
#pragma pop_macro("__int20__")
#pragma pop_macro("int")
#pragma pop_macro("long")

View File

@ -1,7 +1,7 @@
/* Definition of opaque POSIX-1.2008 type locale_t for userspace. */
#ifndef _XLOCALE_H
#define _XLOCALE_H
#ifndef _SYS__LOCALE_H
#define _SYS__LOCALE_H
#include <newlib.h>
#include <sys/config.h>
@ -9,4 +9,4 @@
struct __locale_t;
typedef struct __locale_t *locale_t;
#endif /* _XLOCALE_H */
#endif /* _SYS__LOCALE_H */

View File

@ -19,10 +19,12 @@
#ifndef _SYS__TYPES_H
#define _SYS__TYPES_H
#define __need_size_t
#define __need_wint_t
#include <stddef.h>
#include <newlib.h>
#include <sys/config.h>
#include <machine/_types.h>
#include <sys/lock.h>
#ifndef __machine_blkcnt_t_defined
typedef long __blkcnt_t;
@ -155,9 +157,6 @@ typedef long _ssize_t;
typedef _ssize_t __ssize_t;
#define __need_wint_t
#include <stddef.h>
#ifndef __machine_mbstate_t_defined
/* Conversion state information. */
typedef struct
@ -171,10 +170,6 @@ typedef struct
} _mbstate_t;
#endif
#ifndef __machine_flock_t_defined
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
#ifndef __machine_iconv_t_defined
/* Iconv descriptor type */
typedef void *_iconv_t;
@ -215,10 +210,15 @@ typedef unsigned short __nlink_t;
typedef long __suseconds_t; /* microseconds (signed) */
typedef unsigned long __useconds_t; /* microseconds (unsigned) */
#ifdef __GNUCLIKE_BUILTIN_VARARGS
/*
* Must be identical to the __GNUCLIKE_BUILTIN_VAALIST definition in
* <sys/cdefs.h>. The <sys/cdefs.h> must not be included here to avoid cyclic
* header dependencies.
*/
#if __GNUC_MINOR__ > 95 || __GNUC__ >= 3
typedef __builtin_va_list __va_list;
#else
typedef char * __va_list;
#endif /* __GNUCLIKE_BUILTIN_VARARGS */
#endif
#endif /* _SYS__TYPES_H */

View File

@ -8,6 +8,10 @@
#define MALLOC_ALIGNMENT 16
#endif
#ifdef __AMDGCN__
#define __DYNAMIC_REENT__
#endif
/* exceptions first */
#if defined(__H8500__) || defined(__W65__)
#define __SMALL_BITFIELDS

View File

@ -30,6 +30,11 @@ typedef unsigned __Long __ULong;
#include <sys/types.h>
#endif
#ifndef __machine_flock_t_defined
#include <sys/lock.h>
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
#ifndef __Long
#define __Long __int32_t
typedef __uint32_t __ULong;

View File

@ -3,6 +3,8 @@
Public domain; no rights reserved. */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
*
@ -14,7 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@ -31,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* $FreeBSD$
* $FreeBSD: head/sys/sys/time.h 340664 2018-11-20 07:11:23Z imp $
*/
#ifndef _SYS_TIME_H_
@ -138,7 +140,7 @@ bintime_shift(struct bintime *_bt, int _exp)
#define SBT_1M (SBT_1S * 60)
#define SBT_1MS (SBT_1S / 1000)
#define SBT_1US (SBT_1S / 1000000)
#define SBT_1NS (SBT_1S / 1000000000)
#define SBT_1NS (SBT_1S / 1000000000) /* beware rounding, see nstosbt() */
#define SBT_MAX 0x7fffffffffffffffLL
static __inline int
@ -165,6 +167,90 @@ sbttobt(sbintime_t _sbt)
return (_bt);
}
/*
* Decimal<->sbt conversions. Multiplying or dividing by SBT_1NS results in
* large roundoff errors which sbttons() and nstosbt() avoid. Millisecond and
* microsecond functions are also provided for completeness.
*
* These functions return the smallest sbt larger or equal to the
* number of seconds requested so that sbttoX(Xtosbt(y)) == y. Unlike
* top of second computations below, which require that we tick at the
* top of second, these need to be rounded up so we do whatever for at
* least as long as requested.
*
* The naive computation we'd do is this
* ((unit * 2^64 / SIFACTOR) + 2^32-1) >> 32
* However, that overflows. Instead, we compute
* ((unit * 2^63 / SIFACTOR) + 2^31-1) >> 32
* and use pre-computed constants that are the ceil of the 2^63 / SIFACTOR
* term to ensure we are using exactly the right constant. We use the lesser
* evil of ull rather than a uint64_t cast to ensure we have well defined
* right shift semantics. With these changes, we get all the ns, us and ms
* conversions back and forth right.
*/
static __inline int64_t
sbttons(sbintime_t _sbt)
{
return ((1000000000 * _sbt) >> 32);
}
static __inline sbintime_t
nstosbt(int64_t _ns)
{
sbintime_t sb = 0;
if (_ns >= SBT_1S) {
sb = (_ns / 1000000000) * SBT_1S;
_ns = _ns % 1000000000;
}
/* 9223372037 = ceil(2^63 / 1000000000) */
sb += ((_ns * 9223372037ull) + 0x7fffffff) >> 31;
return (sb);
}
static __inline int64_t
sbttous(sbintime_t _sbt)
{
return ((1000000 * _sbt) >> 32);
}
static __inline sbintime_t
ustosbt(int64_t _us)
{
sbintime_t sb = 0;
if (_us >= SBT_1S) {
sb = (_us / 1000000) * SBT_1S;
_us = _us % 1000000;
}
/* 9223372036855 = ceil(2^63 / 1000000) */
sb += ((_us * 9223372036855ull) + 0x7fffffff) >> 31;
return (sb);
}
static __inline int64_t
sbttoms(sbintime_t _sbt)
{
return ((1000 * _sbt) >> 32);
}
static __inline sbintime_t
mstosbt(int64_t _ms)
{
sbintime_t sb = 0;
if (_ms >= SBT_1S) {
sb = (_ms / 1000) * SBT_1S;
_ms = _ms % 1000;
}
/* 9223372036854776 = ceil(2^63 / 1000) */
sb += ((_ms * 9223372036854776ull) + 0x7fffffff) >> 31;
return (sb);
}
/*-
* Background information:
*
@ -220,7 +306,7 @@ sbttots(sbintime_t _sbt)
struct timespec _ts;
_ts.tv_sec = _sbt >> 32;
_ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32;
_ts.tv_nsec = sbttons((uint32_t)_sbt);
return (_ts);
}
@ -228,8 +314,7 @@ static __inline sbintime_t
tstosbt(struct timespec _ts)
{
return (((sbintime_t)_ts.tv_sec << 32) +
(_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32));
return (((sbintime_t)_ts.tv_sec << 32) + nstosbt(_ts.tv_nsec));
}
static __inline struct timeval
@ -238,7 +323,7 @@ sbttotv(sbintime_t _sbt)
struct timeval _tv;
_tv.tv_sec = _sbt >> 32;
_tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32;
_tv.tv_usec = sbttous((uint32_t)_sbt);
return (_tv);
}
@ -246,8 +331,7 @@ static __inline sbintime_t
tvtosbt(struct timeval _tv)
{
return (((sbintime_t)_tv.tv_sec << 32) +
(_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32));
return (((sbintime_t)_tv.tv_sec << 32) + ustosbt(_tv.tv_usec));
}
#endif /* __BSD_VISIBLE */

View File

@ -1,8 +1,10 @@
/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
/* $FreeBSD$ */
/* $FreeBSD: head/sys/sys/tree.h 347360 2019-05-08 18:47:00Z trasz $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
*
@ -88,7 +90,7 @@ struct { \
SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
(head)->sph_root = tmp; \
} while (/*CONSTCOND*/ 0)
#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
SPLAY_LEFT(tmp, field) = (head)->sph_root; \
@ -123,7 +125,7 @@ struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
\
/* Finds the node with the same key as elm */ \
static __inline struct type * \
static __unused __inline struct type * \
name##_SPLAY_FIND(struct name *head, struct type *elm) \
{ \
if (SPLAY_EMPTY(head)) \
@ -134,7 +136,7 @@ name##_SPLAY_FIND(struct name *head, struct type *elm) \
return (NULL); \
} \
\
static __inline struct type * \
static __unused __inline struct type * \
name##_SPLAY_NEXT(struct name *head, struct type *elm) \
{ \
name##_SPLAY(head, elm); \
@ -148,7 +150,7 @@ name##_SPLAY_NEXT(struct name *head, struct type *elm) \
return (elm); \
} \
\
static __inline struct type * \
static __unused __inline struct type * \
name##_SPLAY_MIN_MAX(struct name *head, int val) \
{ \
name##_SPLAY_MINMAX(head, val); \

View File

@ -36,30 +36,12 @@ typedef __uint32_t u_int32_t;
#if ___int64_t_defined
typedef __uint64_t u_int64_t;
#endif
typedef int register_t;
typedef __intptr_t register_t;
#define __BIT_TYPES_DEFINED__ 1
#if defined(__rtems__) || defined(__XMK__)
/*
* The following section is RTEMS specific and is needed to more
* closely match the types defined in the BSD sys/types.h.
* This is needed to let the RTEMS/BSD TCP/IP stack compile.
*/
/* deprecated */
#if ___int64_t_defined
typedef __uint64_t u_quad_t;
typedef __int64_t quad_t;
typedef quad_t * qaddr_t;
#endif
#endif /* __rtems__ || __XMK__ */
#ifndef __need_inttypes
#define _SYS_TYPES_H
/* <stddef.h> must be before <sys/_types.h> for __size_t considerations */
#include <stddef.h>
#include <sys/_types.h>
#include <sys/_stdint.h>
@ -78,6 +60,8 @@ typedef __uint32_t in_addr_t; /* base type for internet address */
typedef __uint16_t in_port_t;
#define _IN_PORT_T_DECLARED
#endif
typedef __uintptr_t u_register_t;
#endif /* __BSD_VISIBLE */
#if __MISC_VISIBLE
@ -101,7 +85,7 @@ typedef unsigned long u_long;
#endif
#define _BSDTYPES_DEFINED
#endif
#endif /*__BSD_VISIBLE || __CYGWIN__ */
#endif /* __MISC_VISIBLE */
#if __MISC_VISIBLE
typedef unsigned short ushort; /* System V compatibility */

View File

@ -29,7 +29,7 @@
#include <sys/timespec.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
_BEGIN_STD_C
@ -249,15 +249,19 @@ extern "C" {
/* thread shall not have a CPU-time clock */
/* accessible. */
/* Manifest Constants, P1003.1b-1993, p. 262 */
#define CLOCK_REALTIME (clockid_t)1
/* Flag indicating time is "absolute" with respect to the clock
associated with a time. */
associated with a time. Value 4 is historic. */
#define TIMER_ABSTIME 4
/* Manifest Constants, P1003.1b-1993, p. 262 */
#if __GNU_VISIBLE
#define CLOCK_REALTIME_COARSE ((clockid_t) 0)
#endif
#define CLOCK_REALTIME ((clockid_t) 1)
/* Manifest Constants, P1003.4b/D8, p. 55 */
#if defined(_POSIX_CPUTIME)
@ -266,7 +270,7 @@ extern "C" {
the identifier of the CPU_time clock associated with the PROCESS
making the function call. */
#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2
#define CLOCK_PROCESS_CPUTIME_ID ((clockid_t) 2)
#endif
@ -276,17 +280,31 @@ extern "C" {
the identifier of the CPU_time clock associated with the THREAD
making the function call. */
#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3
#define CLOCK_THREAD_CPUTIME_ID ((clockid_t) 3)
#endif
#if defined(_POSIX_MONOTONIC_CLOCK)
/* The identifier for the system-wide monotonic clock, which is defined
* as a clock whose value cannot be set via clock_settime() and which
* cannot have backward clock jumps. */
* as a clock whose value cannot be set via clock_settime() and which
* cannot have backward clock jumps. */
#define CLOCK_MONOTONIC (clockid_t)4
#define CLOCK_MONOTONIC ((clockid_t) 4)
#endif
#if __GNU_VISIBLE
#define CLOCK_MONOTONIC_RAW ((clockid_t) 5)
#define CLOCK_MONOTONIC_COARSE ((clockid_t) 6)
#define CLOCK_BOOTTIME ((clockid_t) 7)
#define CLOCK_REALTIME_ALARM ((clockid_t) 8)
#define CLOCK_BOOTTIME_ALARM ((clockid_t) 9)
#endif

View File

@ -64,7 +64,7 @@ typedef __gnuc_va_list va_list;
#endif
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
_BEGIN_STD_C

View File

@ -8,7 +8,7 @@
#include <stddef.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#ifndef WEOF

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -0,0 +1,15 @@
## Process this file with automake to generate Makefile.in
AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
lib_a_SOURCES = abort.c exit.c atexit.c malloc_support.c getreent.c signal.c
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host

View File

@ -0,0 +1,469 @@
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/../../../../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
am_lib_a_OBJECTS = lib_a-abort.$(OBJEXT) lib_a-exit.$(OBJEXT) \
lib_a-atexit.$(OBJEXT) lib_a-malloc_support.$(OBJEXT) \
lib_a-getreent.$(OBJEXT) lib_a-signal.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(lib_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
READELF = @READELF@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
aext = @aext@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libm_machine_dir = @libm_machine_dir@
localedir = @localedir@
localstatedir = @localstatedir@
lpfx = @lpfx@
machine_dir = @machine_dir@
mandir = @mandir@
mkdir_p = @mkdir_p@
newlib_basedir = @newlib_basedir@
oext = @oext@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sys_dir = @sys_dir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
lib_a_SOURCES = abort.c exit.c atexit.c malloc_support.c getreent.c signal.c
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --cygnus Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
-rm -f lib.a
$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
$(RANLIB) lib.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
lib_a-abort.o: abort.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abort.o `test -f 'abort.c' || echo '$(srcdir)/'`abort.c
lib_a-abort.obj: abort.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-abort.obj `if test -f 'abort.c'; then $(CYGPATH_W) 'abort.c'; else $(CYGPATH_W) '$(srcdir)/abort.c'; fi`
lib_a-exit.o: exit.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exit.o `test -f 'exit.c' || echo '$(srcdir)/'`exit.c
lib_a-exit.obj: exit.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exit.obj `if test -f 'exit.c'; then $(CYGPATH_W) 'exit.c'; else $(CYGPATH_W) '$(srcdir)/exit.c'; fi`
lib_a-atexit.o: atexit.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atexit.o `test -f 'atexit.c' || echo '$(srcdir)/'`atexit.c
lib_a-atexit.obj: atexit.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atexit.obj `if test -f 'atexit.c'; then $(CYGPATH_W) 'atexit.c'; else $(CYGPATH_W) '$(srcdir)/atexit.c'; fi`
lib_a-malloc_support.o: malloc_support.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malloc_support.o `test -f 'malloc_support.c' || echo '$(srcdir)/'`malloc_support.c
lib_a-malloc_support.obj: malloc_support.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-malloc_support.obj `if test -f 'malloc_support.c'; then $(CYGPATH_W) 'malloc_support.c'; else $(CYGPATH_W) '$(srcdir)/malloc_support.c'; fi`
lib_a-getreent.o: getreent.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getreent.o `test -f 'getreent.c' || echo '$(srcdir)/'`getreent.c
lib_a-getreent.obj: getreent.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getreent.obj `if test -f 'getreent.c'; then $(CYGPATH_W) 'getreent.c'; else $(CYGPATH_W) '$(srcdir)/getreent.c'; fi`
lib_a-signal.o: signal.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c
lib_a-signal.obj: signal.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am:
check: check-am
all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-noinstLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-tags dvi dvi-am \
html html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,25 @@
/*
* Support file for amdgcn in newlib.
* Copyright (c) 2014-2017 Mentor Graphics.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#include <unistd.h>
#include <signal.h>
#include "exit-value.h"
void __attribute__((noreturn))
abort (void)
{
write (2, "GCN Kernel Aborted\n", 19);
exit_with_status_and_signal (0, SIGABRT);
}

1012
newlib/libc/machine/amdgcn/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
/*
* Support file for amdgcn in newlib.
* Copyright (c) 2014-2017 Mentor Graphics.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#include <stdlib.h>
int
atexit (void (*function)(void))
{
/* Our current implementation of exit does not run functions registered with
atexit, so fail here. */
abort ();
return 1;
}

4766
newlib/libc/machine/amdgcn/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
dnl This is the newlib/libc/machine/amdgcn configure.in file.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([newlib],[NEWLIB_VERSION])
AC_CONFIG_SRCDIR([Makefile.am])
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -0,0 +1,48 @@
/*
* Support file for amdgcn in newlib.
* Copyright (c) 2017 Mentor Graphics.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#ifndef _AMDGCN_EXIT_VALUE_H_
#define _AMDGCN_EXIT_VALUE_H_
static inline void __attribute__((noreturn))
exit_with_int (int val)
{
/* Write the exit value to the conventional place. */
int *return_value;
asm ("s_load_dwordx2 %0, s[8:9], 16 glc\n\t"
"s_waitcnt 0" : "=Sg"(return_value));
*return_value = val;
/* Terminate the current kernel. */
asm ("s_dcache_wb");
asm ("s_endpgm");
__builtin_unreachable ();
}
static inline void __attribute__((noreturn))
exit_with_status_and_signal (int val, int signal)
{
if (signal == 0)
val = val & 0xff;
else
{
val = (128 + signal) & 0xff;
signal = signal & 0xff;
}
exit_with_int ((0xffff << 16) | (signal << 8) | val);
}
#endif

View File

@ -0,0 +1,23 @@
/*
* Support file for amdgcn in newlib.
* Copyright (c) 2014-2017 Mentor Graphics.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#include <stdlib.h>
#include "exit-value.h"
void __attribute__((noreturn))
exit (int val)
{
exit_with_status_and_signal (val, 0);
}

View File

@ -0,0 +1,80 @@
/* get thread-specific reentrant pointer */
#include <reent.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
/* Copied from the HSA documentation. */
typedef struct hsa_signal_s {
uint64_t handle;
} hsa_signal_t;
typedef struct hsa_kernel_dispatch_packet_s {
uint16_t header ;
uint16_t setup;
uint16_t workgroup_size_x ;
uint16_t workgroup_size_y ;
uint16_t workgroup_size_z;
uint16_t reserved0;
uint32_t grid_size_x ;
uint32_t grid_size_y ;
uint32_t grid_size_z;
uint32_t private_segment_size;
uint32_t group_segment_size;
uint64_t kernel_object;
uint64_t reserved2;
hsa_signal_t completion_signal;
} hsa_kernel_dispatch_packet_t;
struct _reent *
__getreent (void)
{
/* Place the reent data at the top of the stack allocation.
s[0:1] contains a 48-bit private segment base address.
s11 contains the offset to the base of the stack.
s[4:5] contains the dispatch pointer.
WARNING: this code will break if s[0:3] is ever used for anything! */
const register unsigned long buffer_descriptor asm("s0");
unsigned long private_segment = buffer_descriptor & 0x0000ffffffffffff;
const register unsigned int stack_offset asm("s11");
const register hsa_kernel_dispatch_packet_t *dispatch_ptr asm("s4");
struct data {
int marker;
struct _reent reent;
} *data;
unsigned long stack_base = private_segment + stack_offset;
unsigned long stack_end = stack_base + dispatch_ptr->private_segment_size * 64;
unsigned long addr = (stack_end - sizeof(struct data)) & ~7;
data = (struct data *)addr;
register long sp asm("s16");
if (sp >= addr)
goto stackoverflow;
/* Place a marker in s3 to indicate that the reent data is initialized.
The register is known to hold part of an unused buffer descriptor
when the kernel is launched. This may not be unused forever, but
we already used s0 and s1 above, so this doesn't do extra harm. */
register int s3 asm("s3");
if (s3 != 123456)
{
asm("s_mov_b32 s3, 123456");
data->marker = 123456;
__builtin_memset (&data->reent, 0, sizeof(struct _reent));
_REENT_INIT_PTR_ZEROED (&data->reent);
}
else if (data->marker != 123456)
goto stackoverflow;
return &data->reent;
stackoverflow:
write (2, "GCN Stack Overflow!\n", 20);
abort ();
}

View File

@ -0,0 +1,111 @@
/*
* Support file for AMDGCN in newlib.
* Copyright (c) 2017 Mentor Graphics.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#include <stdlib.h>
#include <stdint.h>
#include <reent.h>
/* _sbrk_r expects us to use the real errno, not the reentrant one. */
#include <errno.h>
#undef errno
extern int errno;
/* The runtime passes in heap space like this. */
struct heap {
int64_t size;
char data[0];
};
static char *__heap_ptr = (char*)-1;
static char *__heap_end = (char*)-1;
static int __heap_lock = 0;
static void *__heap_lock_id = NULL;
static int __heap_lock_cnt = 0;
void *
sbrk (ptrdiff_t nbytes)
{
if (__heap_ptr == (char *)-1)
{
/* Find the heap from kernargs.
The kernargs pointer is in s[8:9].
This will break if the enable_sgpr_* flags are ever changed. */
char *kernargs;
asm ("s_mov_b64 %0, s[8:9]" : "=Sg"(kernargs));
/* The heap data is at kernargs[3]. */
struct heap *heap = *(struct heap **)(kernargs + 24);
__heap_ptr = heap->data;
__heap_end = __heap_ptr + heap->size;
}
if ((__heap_ptr + nbytes) >= __heap_end)
{
errno = ENOMEM;
return (void*)-1;
}
char *base = __heap_ptr;
__heap_ptr += nbytes;
return base;
}
void
__malloc_lock (struct _reent *reent)
{
void *id = reent;
if (id == __heap_lock_id)
{
if (__heap_lock_cnt < 1)
abort ();
++__heap_lock_cnt;
return;
}
while (__sync_lock_test_and_set (&__heap_lock, 1))
/* A sleep seems like it should allow the wavefront to yeild (maybe?)
Use the shortest possible sleep time of 1*64 cycles. */
asm volatile ("s_sleep\t1" ::: "memory");
if (__heap_lock_id != NULL)
abort ();
if (__heap_lock_cnt != 0)
abort ();
__heap_lock_cnt = 1;
__heap_lock_id = id;
}
void
__malloc_unlock (struct _reent *reent)
{
void *id = reent;
if (id != __heap_lock_id)
abort ();
if (__heap_lock_cnt < 1)
abort ();
--__heap_lock_cnt;
if (__heap_lock_cnt > 0)
return;
__heap_lock_id = NULL;
__sync_lock_release (&__heap_lock);
}

View File

@ -0,0 +1,10 @@
#include <signal.h>
#include <errno.h>
_sig_func_ptr
signal (int sig,
_sig_func_ptr func)
{
errno = EINVAL;
return NULL;
}

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1311,7 +1311,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1403,7 +1403,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1458,7 +1458,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2542,7 +2542,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4028,7 +4028,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4085,7 +4085,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -787,6 +787,7 @@ CPPFLAGS
CPP'
ac_subdirs_all='a29k
aarch64
amdgcn
arc
arm
bfin
@ -1382,7 +1383,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1452,7 +1453,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1564,7 +1565,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1842,7 +1843,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2926,7 +2927,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -11502,7 +11503,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11505 "configure"
#line 11506 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11608,7 +11609,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11611 "configure"
#line 11612 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11854,6 +11855,8 @@ if test -n "${machine_dir}"; then
subdirs="$subdirs a29k"
;;
aarch64) subdirs="$subdirs aarch64"
;;
amdgcn) subdirs="$subdirs amdgcn"
;;
arc) subdirs="$subdirs arc"
;;
@ -12587,7 +12590,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -12644,7 +12647,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -25,6 +25,7 @@ if test -n "${machine_dir}"; then
case ${machine_dir} in
a29k) AC_CONFIG_SUBDIRS(a29k) ;;
aarch64) AC_CONFIG_SUBDIRS(aarch64) ;;
amdgcn) AC_CONFIG_SUBDIRS(amdgcn) ;;
arc) AC_CONFIG_SUBDIRS(arc) ;;
arm) AC_CONFIG_SUBDIRS(arm) ;;
bfin) AC_CONFIG_SUBDIRS(bfin) ;;

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for newlib 3.0.0.
# Generated by GNU Autoconf 2.68 for newlib 3.1.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
PACKAGE_VERSION='3.0.0'
PACKAGE_STRING='newlib 3.0.0'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='newlib 3.1.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures newlib 3.0.0 to adapt to many kinds of systems.
\`configure' configures newlib 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of newlib 3.0.0:";;
short | recursive ) echo "Configuration of newlib 3.1.0:";;
esac
cat <<\_ACEOF
@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
newlib configure 3.0.0
newlib configure 3.1.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by newlib $as_me 3.0.0, which was
It was created by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@ -2541,7 +2541,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
VERSION='3.0.0'
VERSION='3.1.0'
# Some tools Automake needs.
@ -4025,7 +4025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by newlib $as_me 3.0.0, which was
This file was extended by newlib $as_me 3.1.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4082,7 +4082,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
newlib config.status 3.0.0
newlib config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"

Some files were not shown because too many files have changed in this diff Show More