native_client/nacl-newlib.git
2 months agoFix fopen.c when REENTRANT_SYSCALLS_PROVIDED is defined. master
Sam Clegg [Mon, 10 Feb 2014 17:54:17 +0000 (09:54 -0800)]
Fix fopen.c when REENTRANT_SYSCALLS_PROVIDED is defined.

Always in include <fcntl.h> in fopen.c so the that the forward
declation of open(2) is present.

This is needed for any platform that uses
REENTRANT_SYSCALLS_PROVIDED, because in this mode
_open_r is defined to open.

For whatever reason this ended up effecting the PNaCl
toolchain but not the NaCl one.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3782
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/137813007

2 months agoRemove isatty and rename symbols from newlib NaCl build.
Sam Clegg [Thu, 6 Feb 2014 21:21:25 +0000 (13:21 -0800)]
Remove isatty and rename symbols from newlib NaCl build.

The net effect of this change is that libcrt_common.a ends
up having undefined references to isatty and rename that
can then be provided by libnacl, just like the other
syscalls.

This is achieved by defining HAVE_ISATTY and HAVE_RENAME
in configure.host and honoring these in isatty.c and
rename.c.

Also, add _rename to _syslist.h when MISSING_SYSCALL_NAMES
is defined.  This means that just like of the _r function,
when _rename_r calls _rename it will really be calling
rename (without the underscore).

TEST= toolchain trybots
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3776
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/138423004

2 months agoDefine REENTRANT_SYSCALLS_PROVIDED when building for NaCl.
Sam Clegg [Tue, 4 Feb 2014 19:10:36 +0000 (11:10 -0800)]
Define REENTRANT_SYSCALLS_PROVIDED when building for NaCl.

The effect of this change is to remove the _<syscall>_r
wrapper functions and have the syscalls invoked directly
when called from within newlib.

After consulting the documentation in reent.h it seems
to me that NaCl should be defining both
REENTRANT_SYSCALLS_PROVIDED and MISSING_SYSCALL_NAMES.
The _<syscall>_r function in libc/reent and used for
cases where the actual syscall function are not build
against newlib and therefore don't correctly set its
TLS-based errno value.

Since libnacl (where the NaCl syscalls live) is built
against newlib all the NaCl syscalls are already
reentrant in that sense and there is no need for the
_<syscall>_r wrappers.

syscall invocations from outside the newlib were already
calling the libnacl syscalls directly so this change
only effects internal syscalls from within newlib.

TEST= toolchain trybots
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3782
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/148213015

2 months agoRevert "Fix race condition in concurrent printf and fopen."
Sam Clegg [Thu, 30 Jan 2014 00:12:00 +0000 (16:12 -0800)]
Revert "Fix race condition in concurrent printf and fopen."

This reverts commit a46dfff66f8c8f13a7be3b78bd4c81ba0b94ccb0
since it introduced a possible deadlock between two threads
calling fopen() and fclose().  See: http://codereview.chromium.org/7604003

fclose() takes two locks using _flockfile() and then later
on __sfp_lock_acquire().  __sfp previously only took one
lock using __sfp_lock_acquire but this change added an inner
call to _flockfile() which causes deadlock.

Although accessing the fp->flags in __sfp to check it
against zero is technically a data race with any function
that writes to it, this seems to be by design here.

Specifically, AFAICT, the race with printf() can't change
the outcome of the zero test since flags is guarantees to
be non-zero both before and after the call or ORIENT().
So my conclusion is that tsan found a false positive here.

BUG=338220
R=mcgrathr@chromium.org

Committed: https://git.chromium.org/gitweb?p=native_client/nacl-newlib.git;a=commit;h=d28ae86

Review URL: https://codereview.chromium.org/145953007

3 months agoAdd -D_I386MACH_ALLOW_HW_INTERRUPTS in configure.host for nacl
Roland McGrath [Fri, 17 Jan 2014 21:59:28 +0000 (13:59 -0800)]
Add -D_I386MACH_ALLOW_HW_INTERRUPTS in configure.host for nacl

Add this predefine in the configure stage, so that it's no longer
necessary to pass it on the configure command line in CFLAGS_FOR_TARGET.

BUG= none
TEST= none
R=bradnelson@google.com

Review URL: https://codereview.chromium.org/141923002

4 months agoInclude more of sys/types.h and sys/signal.h under NaCl
Sam Clegg [Mon, 25 Nov 2013 18:49:03 +0000 (10:49 -0800)]
Include more of sys/types.h and sys/signal.h under NaCl

sys/types.h: define types needed to for BSD socket headers.
sys/socket.h: include sigaction declaration.

These files are currently forked in the NaCl SDK.  Landing
this change upstream in newlib will allows us to unfork them.

BUG= https://code.google.com/p/chromium/issues/detail?id=315196
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/79003002

4 months agoDefine _POSIX_THREADS under NaCl.
Sam Clegg [Sat, 23 Nov 2013 00:59:20 +0000 (16:59 -0800)]
Define _POSIX_THREADS under NaCl.

Previously this was not being defined at all, and when it
was defined things would break because the types in
sys/types.h are not compatible with NaCl's pthread.h.

This will allow for the simplification of the python
port in naclports, which relies on _POSIX_THREADS being
defined (if not in features.h then at least in pthread.h).

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3551
TEST= trybots + manual testing
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/82523004

4 months agoFix computed jump calculations in ARM memcpy
Roland McGrath [Fri, 22 Nov 2013 00:05:36 +0000 (16:05 -0800)]
Fix computed jump calculations in ARM memcpy

phosek@ diagnosed the bug: the calculation of computed jumps was not
correctly accounting for the expansion of sfi_bx into two instructions.
The new method is more resilient to variation in the exact instruction
sequence (after macro expansion and bundle padding) and also replaces
two execute nops with two jumped-over nops.

BUG= none
TEST= manual testing of glibc version (identical object code) with glibc test suite

Change-Id: Ia474ea1d5f7188d5ac433f0b6464a6363b747229

R=jfb@chromium.org, phosek@chromium.org

Review URL: https://codereview.chromium.org/81913002

5 months agoUpdate newlib so that it passes libc++'s tests.
JF Bastien [Mon, 28 Oct 2013 23:18:07 +0000 (16:18 -0700)]
Update newlib so that it passes libc++'s tests.

Most of these changes are inconsistencies with existing standards, lack of testing on LLVM, or lack of C99/C11/C++11 support. The fixes aren't thorough, but they allow PNaCl's libc++ tests to pass (though other PNaCl bugs may be hiding further newlib issues).

- limits.h: define LLONG_MIN, LLONG_MAX and ULLONG_MAX for C++11 too.
- stdint.h: define WCHAR_MIN and WCHAR_MAX according to __WCHAR_UNSIGNED__ if it is provided, and correct the limit when unsigned (to 32 all-1 bits, not 31). Make sure stdint.h and wchar.h are in sync.
- stdint.h: similarly for WINT_MIN and WINT_MAX according to __WINT_UNSIGNED__.
- stdlib.h: define struct lldiv_t, _Exit, atoll, llabs and lldiv for C99 and C++11.
- stdlib.h: move wcstold to wchar.h.
- wchar.h: define WCHAR_MIN and WCHAR_MAX according to __WCHAR_UNSIGNED__ if it is provided, and correct the limit when unsigned (to 32 all-1 bits, not 31). Make sure stdint.h and wchar.h are in sync.
- wchar.h: define file as in stdio.h.
- stdlib.h: move wcstold from stdlib.h.

R=mcgrathr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3623
TEST= ./pnacl/scripts/llvm-test.py --libcxx-tests

Review URL: https://codereview.chromium.org/41453002

5 months agoDeclare posix_memalign for NaCl too in Newlib.
Jan Voung [Thu, 24 Oct 2013 23:38:05 +0000 (16:38 -0700)]
Declare posix_memalign for NaCl too in Newlib.

TEST= https://codereview.chromium.org/41683003/

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3718
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/41503005

6 months agoAdd NaCl sandboxing to new ARM assembly code
Roland McGrath [Mon, 30 Sep 2013 21:08:35 +0000 (14:08 -0700)]
Add NaCl sandboxing to new ARM assembly code

The upstream merge brought in new ARM assembly code.  It needs
adjustments to conform to the NaCl ABI.  The memcpy and strlen
implementations are identical to ones already incorporated into
glibc and for which I'd already done the NaCl SFI changes and
done thorough testing with the glibc test suite for those
functions.  The strcmp implementation is new but the sandboxing
changes there are relatively simple.  I'm fairly confident of
these sandboxing changes (and they certainly pass validation).
Testing the new newlib on ARM has many failures not yet
understood, but there was no testing on ARM done before these
changes so the problems may well be unrelated to this assembly.

BUG= none
TEST= none
R=phosek@chromium.org

Review URL: https://codereview.chromium.org/25112006

Change-Id: Ied8f7c39831ed439e34ba9a3d2402a168c04ce96

6 months agoMerge remote-tracking branch 'upstream/master'
Petr Hosek [Fri, 27 Sep 2013 07:13:24 +0000 (00:13 -0700)]
Merge remote-tracking branch 'upstream/master'

7 months agoMake ARM setjmp/longjmp save/restore VFP registers
Roland McGrath [Fri, 13 Sep 2013 19:54:31 +0000 (12:54 -0700)]
Make ARM setjmp/longjmp save/restore VFP registers

Half the VFP/NEON registers are call-saved in the ABI, so
setjmp needs to save them.  Note that the jmp_buf size was
already large enough, because it's set uniformly to 1024
bytes under #ifdef __native_client__.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=3677
TEST= toolchain trybots + manually tested run_longjmp_float_test
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/23475045

Change-Id: Idb5c48968e67c177b4bd320d96a201d541667c1d

7 months agosys/signal.h: Declare kill/sigset/etc under nacl
Sam Clegg [Thu, 12 Sep 2013 00:21:11 +0000 (17:21 -0700)]
sys/signal.h: Declare kill/sigset/etc under nacl

These functions already exist in libnosys, and in glibc
headers and libc, and we want to override them in nacl_io.

TEST= toolchain trybots
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3628
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/23118005

7 months agoBuild unix_dir for NaCl.
Sam Clegg [Tue, 27 Aug 2013 21:25:58 +0000 (14:25 -0700)]
Build unix_dir for NaCl.

There are several functions in the 'unix' subfolder which
we currently ship headers for, but not implementions. e.g
dirname(3) and basename(3).

This change adds the 'unix' directory to the NaCl build
of newlib and excludes the 4 functions which don't
currently compile.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3651
TEST= pnacl/build.sh
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/23470002

7 months agoAdd -DSIGNAL_PROVIDED to NaCl build.
Sam Clegg [Fri, 23 Aug 2013 17:04:58 +0000 (10:04 -0700)]
Add -DSIGNAL_PROVIDED to NaCl build.

This change makes -DSIGNAL_PROVIDED the default for the NaCl
target which will bring the PNaCl build inline with the
x86 and arm builds which define this on the command line.

This define tells newlib to assume that the OS provides the
signal/raise/kill functions and newlib should not include
its own internal versions of these.

Once this lands that command line flags can be removed from
the other builds.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3646
TEST= ./build.sh libs and manual verification
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/22929038

7 months ago * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify upstream/master
Corinna Vinschen [Mon, 19 Aug 2013 09:03:42 +0000 (09:03 +0000)]
* libc/stdlib/__atexit.c (__register_exitproc): NULL-ify
_on_exit_args_ptr when creating a new _atexit structure while
_REENT_SMALL is defined.

8 months agosrc-release: Strip "-cvs" from GDB source dir and tarball.
brobecke [Sat, 17 Aug 2013 01:07:52 +0000 (01:07 +0000)]
src-release: Strip "-cvs" from GDB source dir and tarball.

The nightly snapshots we have been creating in the past did not
include the "-cvs" suffix at the end of the version number. Snapshot
packaging started breaking ever since GDB switched to using BFD's
version number. Things got partially fixed with the previous change
to this file, but the change missed the fact that the "-cvs" suffix
in the tarball name (Eg: gdb-7.6.50-20130816-cvs.tar) is undesirable.
This patch removes it.

ChangeLog:

        * src-release (VER): When using $(TOOL)/common/create-version.sh,
        strip the "-cvs" suffix from the version number if present.

8 months ago2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de>
jbglaw [Mon, 12 Aug 2013 11:36:35 +0000 (11:36 +0000)]
2013-08-12  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* configure.ac: Sync with GCC repo.
* Makefile.def: Ditto.
* configure: Regenerate.
* Makefile.in: Ditto.

8 months ago * libc/configure.in (--enable-newlib-wchar-orient): Remove.
Corinna Vinschen [Mon, 12 Aug 2013 11:31:52 +0000 (11:31 +0000)]
* libc/configure.in (--enable-newlib-wchar-orient): Remove.
* libc/configure: Regenerated.
* libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Remove.
* libc/stdio/Makefile.in: Regenerated.

8 months agoFix space
Corinna Vinschen [Mon, 12 Aug 2013 11:29:07 +0000 (11:29 +0000)]
Fix space

8 months ago * libc/sys/arm/crt0.S: Remove 'start'.
Corinna Vinschen [Mon, 12 Aug 2013 11:28:28 +0000 (11:28 +0000)]
* libc/sys/arm/crt0.S: Remove 'start'.

8 months ago * aarch64/crt0.S: Remove 'start'.
Corinna Vinschen [Mon, 12 Aug 2013 11:27:36 +0000 (11:27 +0000)]
* aarch64/crt0.S: Remove 'start'.
* arm/crt0.S: Ditto.
* arm/redboot-crt0.S: Ditto.

8 months ago2013-08-08 Freddie Chopin <freddie_chopin@op.pl>
Joel Sherrill [Thu, 8 Aug 2013 15:17:09 +0000 (15:17 +0000)]
2013-08-08  Freddie Chopin  <freddie_chopin@op.pl>

* libc/string/strncat.c: Fix typo in documentation.

8 months agoRemove:
mrs [Mon, 5 Aug 2013 16:05:31 +0000 (16:05 +0000)]
Remove:
2013-07-10  Jack Howarth  <howarth@bromo.med.uc.edu>

       PR target/57792
       * configure.ac: Use --with-sysroot=\"`xcrun --show-sdk-path`\" on darwin13 and later.
       * configure: Regenerated.

8 months ago * libc/include/stdio_ext.h (__fbufsize): Define as inline function for
Corinna Vinschen [Fri, 2 Aug 2013 07:52:09 +0000 (07:52 +0000)]
* libc/include/stdio_ext.h (__fbufsize): Define as inline function for
gcc, as macro otherwise.
(__freading): Ditto.
(__fwriting): Ditto.
(__freadable): Ditto.
(__fwriteable): Ditto.
(__flbf): Ditto.
(__fpending): Ditto.

8 months ago2013-07-24 Steve Ellcey <sellcey@mips.com>
Steve Ellcey [Wed, 24 Jul 2013 22:32:50 +0000 (22:32 +0000)]
2013-07-24  Steve Ellcey  <sellcey@mips.com>

* mips/idtmon.S (unlink, lseek, stat): Add new functions.

8 months ago * microblaze/_exception_handler.S: Adjust to be weak.
Corinna Vinschen [Tue, 23 Jul 2013 09:11:17 +0000 (09:11 +0000)]
* microblaze/_exception_handler.S: Adjust to be weak.

* microblaze/Makefile.in: Add LINUX_BSP.
* microblaze/elf-gloss-linux.ld: New file.
* microblaze/elf-gloss-linux.specs: Likewise.
* microblaze/linux-crt0.S: Likewise.
* microblaze/linux-inbyte.c: Likewise.
* microblaze/linux-outbyte.c: Likewise.
* microblaze/linux-syscalls-wrap.c: Likewise.
* microblaze/linux-syscalls.S: Likewise.
* microblaze/linux-syscalls.h: Likewise.

8 months ago * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
Corinna Vinschen [Tue, 23 Jul 2013 07:05:30 +0000 (07:05 +0000)]
* libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo()
and getaddrinfo() to increase standards compliance and match glibc.

* libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c,
libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c,
libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c,
libc/string/strtok_r.c, libc/string/strxfrm.c
libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c,
libc/machine/cris/memcpy.c: Add __restrict to prototype to
increase standards compliance.

8 months agosrc-release: Fix VER computation for TOOL=gdb
brobecke [Mon, 22 Jul 2013 15:17:20 +0000 (15:17 +0000)]
src-release: Fix VER computation for TOOL=gdb

Without this patch, the DATE marker in gdb/version.in does not get
replaced by the source packaging date, causing the name of the
tarball being created to: have the DATE marker in the tarball
name and the name of the directory the sources unpack to (Eg:
gdb-7.6.50-DATE-cvs.tar instead of gdb-7.6.50-20130710-cvs.tar).

ChangeLog:

        * src-release (VER): Use $(TOOL)/common/create-version.sh
        if it exists.

9 months ago * libc/sys/arm/syscalls.c (do_AngelSWI): Delete.
Corinna Vinschen [Fri, 19 Jul 2013 09:57:50 +0000 (09:57 +0000)]
* libc/sys/arm/syscalls.c (do_AngelSWI): Delete.
* libc/sys/arm/libcfuncs.c (do_AngelSWI): Delete.
* libc/sys/arm/swi.h: Copy over from libgloss.

9 months ago2013-07-17 Janis Johnson <janisjo@codesourcery.com>
Jeff Johnston [Wed, 17 Jul 2013 16:38:03 +0000 (16:38 +0000)]
2013-07-17  Janis Johnson  <janisjo@codesourcery.com>

        * libc/machine/powerpc/configure.in: Remove extra_sources; fix
        extra_objs for powerpc*-*altivec.
        * libc/machine/powerpc/Makefile.am: Define EXTRA_lib_a_SOURCES.
        * libc/machine/powerpc/configure: Regenerated.
        * libc/machine/powerpc/Makefile.in: Regenerated.

9 months ago* lm32/configure: Regenerate.
Yaakov Selkowitz [Wed, 17 Jul 2013 06:14:27 +0000 (06:14 +0000)]
* lm32/configure: Regenerate.
* moxie/configure: Ditto.
* spu/configure: Ditto.

9 months ago * microblaze/Makefile.in: Add GENOBJS and target_makefile_frag.
Corinna Vinschen [Tue, 16 Jul 2013 07:55:44 +0000 (07:55 +0000)]
* microblaze/Makefile.in: Add GENOBJS and target_makefile_frag.
* microblaze/configure.in: Add target_makefile_frag.
* microblaze/configure: Regenerate.
* microblaze/xil_printf.c: Add new file.

9 months ago * configure.host: Change to microblaze*.
Corinna Vinschen [Tue, 16 Jul 2013 07:48:53 +0000 (07:48 +0000)]
* configure.host: Change to microblaze*.
* libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__.
* libc/machine/microblaze/mb_endian.h: New file.
* newlib/libc/machine/microblaze/strcmp.c: Add little endian support.
* newlib/libc/machine/microblaze/strcpy.c: Likewise.
* newlib/libc/machine/microblaze/strlen.c: Likewise.

* configure.in: Change to microblaze*.
* configure: Regenerate.
* microblaze/xilinx.ld: Remove OUTPUT_FORMAT.

9 months ago[AArch64] Ensure vector table is page aligned.
mshawcroft [Fri, 12 Jul 2013 09:42:45 +0000 (09:42 +0000)]
[AArch64] Ensure vector table is page aligned.

2013-07-12  Marcus Shawcroft  <marcus.shawcroft@arm.com>

        * aarch64/cpu-init/rdimon-aem-el3.S (vectors): Page align.

9 months ago2013-07-10 Jack Howarth <howarth@bromo.med.uc.edu>
mrs [Wed, 10 Jul 2013 20:55:59 +0000 (20:55 +0000)]
2013-07-10  Jack Howarth  <howarth@bromo.med.uc.edu>

    PR target/57792
    * configure.ac: Use --with-sysroot=\"`xcrun --show-sdk-path`\" on darwin13 and later.
    * configure: Regenerated.

9 months ago2013-07-09 Sabrina Ni <sabrina@andestech.com>
Jeff Johnston [Tue, 9 Jul 2013 19:19:34 +0000 (19:19 +0000)]
2013-07-09  Sabrina Ni  <sabrina@andestech.com>

        * libc/machine/nds32/Makefile.am (lib_a_SOURCES): Add abort.c, memcpy.S,
        memset.S, strcmp.S, and strcpy.S.
        * libc/machine/nds32/Makefile.in: Regenerated.
        * libc/machine/nds32/{abort.c, memcpy.S, memset.S, strcmp.S, strcpy.S}:         New.

9 months ago2013-07-09 Sabrina Ni <sabrina@andestech.com>
Jeff Johnston [Tue, 9 Jul 2013 19:16:24 +0000 (19:16 +0000)]
2013-07-09  Sabrina Ni  <sabrina@andestech.com>

        * configure.in: Add nds32 subdir.
        * configure: Regenerated.
        * nds32/configure.in: New.
        * nds32/configure: New (autogenerated).
        * nds32/{crt0.S,crt1.S}: New.
        * nds32/Makefile.in: New.
        * nds32/{syscall_argvlen.S,syscall_argv.S,
        syscall_chdirS, syscall_chmod.S,
        syscall_close.S,syscall_exit.S,syscall_extra.h, syscall_fstat.S,
        syscall_getpid.S,syscall_gettimeofday.S,syscall_isatty.S,syscall_kill.S,
        syscall_link.S,syscall_lseek.S,syscall_open.S,syscall_read.S,
        syscall_rename.S,syscall_sbrk.S,syscall_stat.S,syscall_system.S,
        syscall_time.S,syscall_times.S,syscall_unlink.S,syscall_utime.S,
        syscall_write.S}: New.

9 months ago2013-07-09 Sabrina Ni <sabrina@andestech.com>
Jeff Johnston [Tue, 9 Jul 2013 19:06:47 +0000 (19:06 +0000)]
2013-07-09  Sabrina Ni  <sabrina@andestech.com>

        * configure.host (machine_dir, syscall_dir, newlib_cflags):
        Add settings for nds32*.
        * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
        Ditto.
        * libc/include/machine/setjmp.h (JBLEN): Ditto.
        * libc/machine/configure.in: Add nds32 subdir.
        * libc/machine/configure: Regenerated.
        * libc/machine/nds32/Makefile.am: New.
        * libc/machine/nds32/Makefile.in: New (autogenerated).
        * libc/machine/nds32/aclocal.m4: New (autogenerated).
        * libc/machine/nds32/configure.in: New.
        * libc/machine/nds32/configure: New (autogenerated).
        * libc/machine/nds32/setjmp.S: New.

9 months ago * libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.
Corinna Vinschen [Tue, 9 Jul 2013 13:14:31 +0000 (13:14 +0000)]
* libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.

9 months ago * libc/stdio/fwalk.c (_fwalk): Remove redundant test.
Corinna Vinschen [Tue, 9 Jul 2013 13:07:16 +0000 (13:07 +0000)]
* libc/stdio/fwalk.c (_fwalk): Remove redundant test.

9 months ago* libc/include/sys/types.h (u_char): Add redefinition guard.
Yaakov Selkowitz [Fri, 5 Jul 2013 21:46:10 +0000 (21:46 +0000)]
* libc/include/sys/types.h (u_char): Add redefinition guard.
(u_short, u_int, u_long, caddr_t, daddr_t): Ditto.

9 months ago * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__
Corinna Vinschen [Thu, 4 Jul 2013 10:21:52 +0000 (10:21 +0000)]
* aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__
is defined.

9 months ago2013-07-02 Joey Ye <joey.ye@arm.com>
Jeff Johnston [Tue, 2 Jul 2013 21:34:35 +0000 (21:34 +0000)]
2013-07-02  Joey Ye  <joey.ye@arm.com>

        * arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini
        when lite exit is enabled.

9 months ago2013-07-02 Joey Ye <joey.ye@arm.com>
Jeff Johnston [Tue, 2 Jul 2013 21:30:57 +0000 (21:30 +0000)]
2013-07-02  Joey Ye  <joey.ye@arm.com>

        Lite exit support.
        * README: Add information about lite-exit.
        * acconfig.h (_LITE_EXIT): New macro.
        * configure.in (enable-lite-exit): New option.
        (_LITE_EXIT): Define new macro.
        * configure: Regenerated.
        * newlib.hin (_LITE_EXIT): New macro.
        * libc/stdlib/__atexit.c [_LITE_EXIT]: Add dummy explicit
        reference to __call_exitprocs.
        * libc/stdlib/cxa_atexit.c [_LITE_EXIT]: Make __register_exitproc a
        weak reference.
        * libc/stdlib/exit.c (exit)[_LITE_EXIT]: Remove TWS and weakly reference
        __call_exitprocs.

9 months ago2013-07-02 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Tue, 2 Jul 2013 19:26:20 +0000 (19:26 +0000)]
2013-07-02  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/sys/reent.h: Fix typo in comment.

9 months agomemcpy-armv7a.S: Improve performance with misaligned buffers.
willnewton [Mon, 1 Jul 2013 09:58:33 +0000 (09:58 +0000)]
memcpy-armv7a.S: Improve performance with misaligned buffers.

Adjust the conditions for entering the aligned copy loop to
improve performance on mutually misaligned buffer copies.

2013-07-01  Will Newton  <will.newton@linaro.org>

* libc/machine/arm/memcpy-armv7a.S: Adjust entry to
 aligned loop to improve misaligned copy performance.

9 months ago * aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.
Corinna Vinschen [Fri, 28 Jun 2013 09:34:46 +0000 (09:34 +0000)]
* aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.
(initialise_monitor_handles): Replace cast with macro
POINTER_TO_PARAM_BLOCK_T.
(_swiread): Likewise.
(_swiwrite): Likewise.
(_swiopen): Likewise.
(_unlink): Likewise.
(_system): Likewise.
(_rename): Likewise.

9 months ago2013-06-26 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Wed, 26 Jun 2013 21:34:15 +0000 (21:34 +0000)]
2013-06-26  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/include/stdio.h: Specify std streams always in terms
        of _REENT.
        * libc/include/wchar.h: Ditto.
        * libc/include/sys/reent.h: Remove _RENT_ONLY check around
        setting of _REENT macro.

9 months ago * aarch64/crt0.S (GEN_DWORD): New macro definition.
Corinna Vinschen [Tue, 25 Jun 2013 12:06:15 +0000 (12:06 +0000)]
* aarch64/crt0.S (GEN_DWORD): New macro definition.
(PTR_REG): Ditto.
(PTR_SIZE): Ditto.
(PTR_LOG_SIZE): Ditto.
(start): Use GEN_DWORD to replace the .dword of HeapBase,
__bss_start__, __bss_end__, FUNCTION(_fini), env and
CommandLine; when __ILP32__ is defined, set the stack base to
the top end of the 32-bit address space if the returned value
from the Angel API call is larger than or equal to 4 GiB.
Also carry out sanity check on the heap base; abort if the
base is larger than or equal to 4 GiB.  Use other new
macros in the instructions that processes the argv arrays.
(StackBase): New lable; replace __stack_base__.
(__stack_base__): Set with StackBase or StackBase + 4.

9 months agoExclude mem{cpy,move,set}'s bodies from a PNaCl build.
Eli Bendersky [Mon, 24 Jun 2013 20:33:31 +0000 (13:33 -0700)]
Exclude mem{cpy,move,set}'s bodies from a PNaCl build.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3493
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/17601003

9 months ago* libc/include/string.h (rawmemchr): Declare.
Yaakov Selkowitz [Mon, 24 Jun 2013 15:11:23 +0000 (15:11 +0000)]
* libc/include/string.h (rawmemchr): Declare.
* libc/string/Makefile.am (ELIX_4_SOURCES): Add rawmemchr.c.
(CHEWOUT_FILES): Add rawmemchr.def.
* libc/string/Makefile.in: Regenerate.
* libc/string/rawmemchr.c: New file.

9 months ago * libc/reent/reent.c (_reclaim_reent): Free also _misc and
Corinna Vinschen [Mon, 24 Jun 2013 11:34:03 +0000 (11:34 +0000)]
* libc/reent/reent.c (_reclaim_reent): Free also _misc and
_signal_buf.

9 months ago * libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
Corinna Vinschen [Mon, 24 Jun 2013 09:28:32 +0000 (09:28 +0000)]
* libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
(_REENT_INIT_ATEXIT_PTR): Remove.
(_REENT_INIT_PTR): Reduce code size if _REENT_SMALL.

9 months ago * configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
Richard Sandiford [Sat, 22 Jun 2013 16:44:13 +0000 (16:44 +0000)]
* configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
(mips*-*-ecoff*, mips*-*-pe*, mips*-*-irix* [v4 and earlier])
(mips*-*-lnews*, mips*-*-riscos*): Add gas and ld to noconfigdirs.
* configure: Regenerate.

gas/
* NEWS: Note removal of ECOFF support.
* doc/as.texinfo (--emulation): Update for the removal of MIPS ECOFF.
* Makefile.am (TARG_ENV_HFILES): Remove config/te-lnews.h.
(MULTI_CFILES): Remove config/e-mipsecoff.c.
* Makefile.in: Regenerate.
* configure.in: Remove MIPS ECOFF references.
(mips-sony-bsd*, mips-*-bsd*, mips-*-lnews*-ecoff, mips-*-*-ecoff):
Delete cases.
(mips-*-irix5*-*, mips*-*-linux*-*, mips*-*-freebsd*)
(mips*-*-kfreebsd*-gnu, mips-*-*-elf): Fold into...
(mips-*-*): ...this single case.
(mipsbecoff, mipslecoff, mipsecoff): Remove emulations.  Expect
MIPS emulations to be e-mipself*.
* configure: Regenerate.
* configure.tgt (mips-sony-bsd*, mips-*-ultrix*, mips-*-osf*)
(mips-*-ecoff*, mips-*-pe*, mips-*-irix*, ips-*-lnews*, mips-*-riscos*)
(mips-*-sysv*): Remove coff and ecoff cases.
* as.c (mipsbecoff, mipslecoff, mipsecoff): Remove.
* ecoff.c: Remove reference to MIPS ECOFF.
* config/e-mipsecoff.c, config/te-lnews.h: Delete files.
* config/tc-mips.c (ECOFF_LITTLE_FORMAT): Delete.
(RDATA_SECTION_NAME, mips_target_form): Remove COFF and ECOFF cases.
(mips_hi_fixup): Tweak comment.
(append_insn): Require a howto.
(mips_after_parse_args): Remove OBJ_MAYBE_ECOFF code.

gas/testsuite/
* gas/all/gas.exp: Remove reference to mips-ecoff.
* gas/mips/branch-misc-1.d, gas/mips/branch-misc-2.d,
gas/mips/branch-misc-2-64.d, gas/mips/branch-misc-2pic.d,
gas/mips/branch-misc-2pic-64.d, gas/mips/branch-swap.d: Remove
skips for mips-*-ecoff.

ld/
* NEWS: Document the removal of MIPS ECOFF targets.
* ld.texinfo (--gpsize=@var{value}): Use MIPS ELF rather than
MIPS ECOFF as an example of a target that supports small data.
* ldmain.c (g_switch_value): Likewise.
* configure.tgt (mips*-*-pe, mips*-dec-ultrix*, mips*-dec-osf*)
(mips*-sgi-irix* [v4 and earlier], mips*el-*-ecoff*, mips*-*-ecoff*)
(mips*-*-bsd*, mips*-*-lnews*): Remove cases.
* Makefile.am (ALL_EMULATION_SOURCES): Remove emipsbig.c, emipsbsd.c,
emipsidt.c, emipsidtl.c, emipslit.c, emipslnews.c and emipspe.c.
(emipsbig.c, emipsbsd.c, emipsidt.c, emipsidtl.c, emipslit.c)
(emipslnews.c, emipspe.c): Delete rules.
* Makefile.in: Regenerate.
* emulparams/mipsbig.sh, emulparams/mipsbsd.sh, emulparams/mipsidt.sh,
emulparams/mipsidtl.sh, emulparams/mipslit.sh, emulparams/mipslnews.sh,
emulparams/mipspe.sh, emultempl/mipsecoff.em: Delete.
* emultempl/m68kcoff.em: Update comment to say that MIPS ECOFF support
has now been removed.
* emultempl/pe.em: Remove TARGET_IS_mipspe checks.

9 months agostrlen-armv7.S: Import latest strlen cortex-strings code.
willnewton [Fri, 21 Jun 2013 09:10:37 +0000 (09:10 +0000)]
strlen-armv7.S: Import latest strlen cortex-strings code.

Import the latest version of strlen from the Linaro cortex-strings
package. This version is faster across a variety of block size and
alignments on ARMv7.

newlib/ChangeLog:

2013-06-21  Will Newton  <will.newton@linaro.org>

* libc/machine/arm/strlen-armv7.S: Import latest strlen
code from Linaro cortex-strings.

9 months agonewlib/MAINTAINERS: Add myself to Write After Approval.
willnewton [Fri, 21 Jun 2013 08:17:38 +0000 (08:17 +0000)]
newlib/MAINTAINERS: Add myself to Write After Approval.

2013-06-21  Will Newton  <will.newton@linaro.org>

* MAINTAINERS: Add Will Newton to Write After Approval.

9 months agoFix ChangeLog entry
Corinna Vinschen [Wed, 19 Jun 2013 16:43:12 +0000 (16:43 +0000)]
Fix ChangeLog entry

9 months ago * acconfig.h (_UNBUF_STREAM_OPT): Undefine.
Corinna Vinschen [Wed, 19 Jun 2013 15:58:49 +0000 (15:58 +0000)]
* acconfig.h (_UNBUF_STREAM_OPT): Undefine.
* newlib.hin (_UNBUF_STREAM_OPT): Undefine.
* configure.in (--enable-newlib-unbuf-stream-opt): New option.
* configure: Regenerate.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
unbuffered stream files.
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
* README: Add description about the option.
* newlib.hin (_UNBUF_STREAM_OPT): Undefine.
* configure.in (--enable-newlib-unbuf-stream-opt): New option.
* configure: Regenerate.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
unbuffered stream files.
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
* README: Add description about the option.

9 months ago * libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf.
Corinna Vinschen [Wed, 19 Jun 2013 15:54:19 +0000 (15:54 +0000)]
* libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf.

10 months ago * README: Add description for NEWLIB's feature customizing
Corinna Vinschen [Thu, 13 Jun 2013 11:43:44 +0000 (11:43 +0000)]
* README: Add description for NEWLIB's feature customizing
configuration options.

10 months ago * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
Corinna Vinschen [Mon, 10 Jun 2013 15:27:43 +0000 (15:27 +0000)]
* libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
(hexdig_init): Remove.
(__hexdig_fun): New function.
hexdig_init, added __hexdig_fun
(gethex): Call __get_hexdig macro rather than hexdig.
* libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument.
Call __get_hexdig macro rather than hexdig.
* libc/stdlib/ldtoa.c: Throughout constify functions arguments where
required by constifying the following arrays.
(ezero): Constify.
(eone): Constify.
(ermsg): Constify.
(etens): Constify.
(emtens): Constify.
(nan113): Constify.
(nan64): Constify.
(nan53): Constify.
(nan24): Constify.
* libc/stdlib/mprec.h (__get_hexdig): Define.
(gethex): Constify args in declaration where appropriate.
(hexnan): Ditto.
(hexdig_init): Remove declaration.
(__hexdig_fun): Declare.
* libc/stdlib/strtod.c (fpi): Constify.
(fpinan): Constify.

10 months agoFix typos
Corinna Vinschen [Fri, 7 Jun 2013 14:21:53 +0000 (14:21 +0000)]
Fix typos

10 months ago * libc/include/cdefs.h (__has_extension): New define.
Corinna Vinschen [Fri, 7 Jun 2013 09:14:39 +0000 (09:14 +0000)]
* libc/include/cdefs.h (__has_extension): New define.
(__has_feature): Likewise.
(__has_include): Likewise.
(__has_builtin): Likewise.
* libc/include/stdatomic.h: New.

10 months ago * libc/machine/arm/strcmp.S: Use local labels.
Corinna Vinschen [Wed, 5 Jun 2013 09:41:20 +0000 (09:41 +0000)]
* libc/machine/arm/strcmp.S: Use local labels.

10 months ago2013-06-03 Joey Ye <joey.ye@arm.com>
rearnsha [Mon, 3 Jun 2013 14:02:10 +0000 (14:02 +0000)]
2013-06-03  Joey Ye  <joey.ye@arm.com>

* libc/machine/arm/Makefile.am (MEMCPY_DEP): New define.
($(lpfx)memcpy.o, $(lpfx)memcpy.obj): Depend on MEMCPY_DEP.
* libc/machine/arm/Makefile.in: Regenerated.
* newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m.
* newlib/libc/machine/arm/memcpy-armv7m.S: New.
* newlib/libc/machine/arm/memcpy.S: Replace with wrapper code.  Old
code moved to ...
* newlib/libc/machine/arm/memcpy-armv7a.S: ... here.  Remove
redundant architecture check.

10 months ago * gas/config/tc-avr.c: Change ISA for devices with USB support to
denisc [Sat, 1 Jun 2013 07:14:43 +0000 (07:14 +0000)]
* gas/config/tc-avr.c: Change ISA for devices with USB support to
AVR_ISA_XMEGAU

* include/opcode/avr.h: Rename AVR_ISA_XCH to AVR_ISA_RMW. Remove
from AVR_ISA_XMEGA and add new AVR_ISA_XMEGAU

10 months ago2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 30 May 2013 22:44:41 +0000 (22:44 +0000)]
2013-05-30  Jeff Johnston  <jjohnstn@redhat.com>

        * libc/machine/powerpc/times.c: Moved to libgloss/rs6000.
        * libc/machine/powerpc/Makefile.am: Remove times.c.
        * libc/machine/powerpc/Makefile.in: Regenerated.

10 months ago2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston [Thu, 30 May 2013 22:44:04 +0000 (22:44 +0000)]
2013-05-30  Jeff Johnston  <jjohnstn@redhat.com>

        * rs6000/Makefile.in: Add sim-times support.  This file has been
        moved from newlib/libc/machine/powerpc and renamed.
        * rs6000/sim-times.c: New file.

10 months ago * configure.in (--enable-newlib-nano-malloc): New option.
Corinna Vinschen [Wed, 29 May 2013 12:37:59 +0000 (12:37 +0000)]
* configure.in (--enable-newlib-nano-malloc): New option.
* configure: Regenerated.
* libc/configure.in (--enable-newlib-nano-malloc): New option.
* libc/configure: Regenerated.
* libc/stdlib/Makefile.am (NEWLIB_NANO_MALLOC): Use.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/nano-mallocr.c: New file, implementing nano
version malloc family functions.

10 months ago* libc/macine/arm/strcpy.S: Explicitly set build attributes when
rearnsha [Tue, 28 May 2013 12:43:48 +0000 (12:43 +0000)]
* libc/macine/arm/strcpy.S: Explicitly set build attributes when
building for thumb1 targets.

10 months ago * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.
Corinna Vinschen [Thu, 23 May 2013 14:46:51 +0000 (14:46 +0000)]
* libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.
* libc/ctype/isalpha.c: Ditto.
* libc/ctype/isblank.c: Ditto.
* libc/ctype/iscntrl.c: Ditto.
* libc/ctype/isdigit.c: Ditto.
* libc/ctype/islower.c: Ditto.
* libc/ctype/isprint.c: Ditto.
* libc/ctype/ispunct.c: Ditto.
* libc/ctype/isxdigit.c: Ditto.

10 months ago * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.
Corinna Vinschen [Wed, 22 May 2013 17:53:07 +0000 (17:53 +0000)]
* libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.

11 months ago * libc/reent/reent.c (_wrapup_reent): Remove.
Corinna Vinschen [Thu, 16 May 2013 12:29:28 +0000 (12:29 +0000)]
* libc/reent/reent.c (_wrapup_reent): Remove.

11 months agoMissed MAINTAINERS entry from previous commit.
DJ Delorie [Mon, 13 May 2013 21:40:50 +0000 (21:40 +0000)]
Missed MAINTAINERS entry from previous commit.

11 months ago[newlib]
DJ Delorie [Mon, 13 May 2013 21:39:50 +0000 (21:39 +0000)]
[newlib]
* configure.host (msp430): Add.
* libc/include/machine/ieeefp.h: Add MSP430 support.
* libc/include/machine/setjmp.h: Likewise.
* libc/include/sys/config.h: Likewise.
* libc/machine/configure.in (msp430): Add.
* libc/machine/configure: Regenerate.
* libc/machine/msp430: New directory.

[libgloss]
* configure.in (msp430*-*-elf): Add.
* configure: Regenerate.
* msp430: New directory.

11 months ago2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
Jeff Johnston [Fri, 10 May 2013 20:14:33 +0000 (20:14 +0000)]
2013-05-10  Freddie Chopin  <freddie_chopin@op.pl>

        * configure.in: Fix help text for disable-newlib-atexit-dynamic-alloc option.
        * configure: Regenerated.

11 months ago2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jeff Johnston [Wed, 8 May 2013 23:13:51 +0000 (23:13 +0000)]
2013-05-07  Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for
        RTEMS.
        * libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT.
        (_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined.
        * libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if
        _REENT_GLOBAL_ATEXIT is defined.
        (_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT
        is defined.
        * libc/stdlib/__atexit.c (_global_atexit0): Define if
        _REENT_GLOBAL_ATEXIT is defined.
        * libc/stdlib/__call_atexit.c (_global_atexit): Define if
        _REENT_GLOBAL_ATEXIT is defined.

11 months ago2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jeff Johnston [Tue, 7 May 2013 21:40:09 +0000 (21:40 +0000)]
2013-05-07  Sebastian Huber <sebastian.huber@embedded-brains.de>

* libc/include/sys/reent.h (_ATEXIT_INIT): Define.
(_ATEXIT_INIT_PTR): Likewise.
(_REENT_INIT_ATEXIT): Likewise.
(_REENT_INIT_ATEXIT_PTR): Likewise.
(_GLOBAL_ATEXIT): Likewise.
* libc/stdlib/__atexit.c (_GLOBAL_ATEXIT0): Define.
(__register_exitproc): Use _GLOBAL_ATEXIT and _GLOBAL_ATEXIT0.
* libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
-

11 months ago2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jeff Johnston [Tue, 7 May 2013 18:24:14 +0000 (18:24 +0000)]
2013-05-07  Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libc/stdlib/__atexit.c (__atexit_lock): Declare.
        * libc/stdlib/__call_atexit.c (__atexit_lock): Define.

11 months ago2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Jeff Johnston [Mon, 6 May 2013 18:31:56 +0000 (18:31 +0000)]
2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>

        * COPYING.NEWLIB: Add Altera Corporation copyright.

11 months ago2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
Jeff Johnston [Mon, 6 May 2013 18:23:08 +0000 (18:23 +0000)]
2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>

        * configure.host (machine_dir, sys_dir, syscall_dir, newlib_cflags):
        Add settings for nios2*.
        * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
        Likewise.
        * libc/include/machine/setjmp.h (JBLEN, JBTYPE): Likewise.
        * libc/machine/configure.in: Add nios2 subdir.
        * libc/machine/configure: Regenerated.
        * libc/machine/nios2/Makefile.am: New.
        * libc/machine/nios2/Makefile.in: New (autogenerated).
        * libc/machine/nios2/aclocal.m4: New (copied from mips version).
        * libc/machine/nios2/configure.in: New.
        * libc/machine/nios2/configure: New (autogenerated).
        * libc/machine/nios2/setjmp.s: New.

11 months ago2013-04-30 Jan-Benedict Glaw <jbglaw@lug-owl.de>
jbglaw [Tue, 30 Apr 2013 12:40:41 +0000 (12:40 +0000)]
2013-04-30  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

config/
* picflag.m4: Merge from GCC.
* dfp.m4: Ditto.
* bootstrap-asan.mk: Ditto.
* ChangeLog: Ditto.

11 months ago2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jeff Johnston [Mon, 29 Apr 2013 21:06:23 +0000 (21:06 +0000)]
2013-04-29  Sebastian Huber <sebastian.huber@embedded-brains.de>

* libc/stdio/local.h (CHECK_INIT): Evaluate argument only once.
(CHECK_STD_INIT): Likewise.
* libc/stdio/fgetc.c (fgetc): Use local variable for _REENT.
* libc/stdio/fgetwc.c (fwgetc): Likewise.
* libc/stdio/fgetws.c (fgetws): Likewise.
* libc/stdio/fputc.c (fputc): Likewise.
* libc/stdio/fputwc.c (fputwc): Likewise.
* libc/stdio/fputws.c (fputws): Likewise.
* libc/stdio/getc.c (getc): Likewise.
* libc/stdio/getchar.c (_getchar_r): Likewise.
* libc/stdio/putc.c (putc): Likewise.
* libc/stdio/putchar.c (putchar): Likewise.
* libc/stdio/scanf.c (scanf): Likewise.
* libc/stdio/setvbuf.c (setvbuf): Likewise.
* libc/stdio/ungetwc.c (ungetwc): Likewise.
* libc/stdio/vfscanf.c (VFSCANF): Likewise.
* libc/stdio/vfwscanf.c (VFWSCANF): Likewise.
* libc/stdio/viprintf.c (viprintf): Likewise.
* libc/stdio/viscanf.c (viscanf): Likewise.
* libc/stdio/vprintf.c (vprintf): Likewise.
* libc/stdio/vscanf.c (vscanf): Likewise.
* libc/stdio/vwprintf.c (vwprintf): Likewise.
* libc/stdio/vwscanf.c (vwscanf): Likewise.
* libc/stdio/wscanf.c (wscanf): Likewise.
* libc/stdlib/ecvtbuf.c (fcvtbuf): Likewise.
(fcvtbuf): Likewise.
(ecvtbuf): Likewise.
(ecvtbuf): Likewise.
* libc/stdlib/mblen.c (mblen): Likewise.
* libc/stdlib/mbrlen.c (mbrlen): Likewise.
* libc/stdlib/mbrtowc.c (mbrtowc): Likewise.
* libc/stdlib/mbtowc.c (mbtowc): Likewise.
* libc/stdlib/rand.c (srand): Likewise.
(rand): Likewise.
* libc/stdlib/wcrtomb.c (wcrtomb): Likewise.
* libc/stdlib/wctob.c (wctob): Likewise.
* libc/stdlib/wctomb.c (wctomb): Likewise.
* libc/string/strtok.c (strtok): Likewise.
* libc/time/asctime.c (asctime): Likewise.
* libc/time/gmtime.c (gmtime): Likewise.
* libc/time/lcltime.c (lcltime): Likewise.

11 months ago2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
Jeff Johnston [Mon, 29 Apr 2013 20:56:05 +0000 (20:56 +0000)]
2013-04-29  Sebastian Huber <sebastian.huber@embedded-brains.de>

        * libc/include/sys/reent.h (_REENT_INIT_PTR): Reduce code size.

11 months ago2013-04-29 Freddie Chopin <freddie_chopin@op.pl>
Jeff Johnston [Mon, 29 Apr 2013 20:02:33 +0000 (20:02 +0000)]
2013-04-29  Freddie Chopin  <freddie_chopin@op.pl>

        * libc/libc.texinfo: Fix @ references and change ifinfo to be
        ifnottexinfo.
        * libm/libm.texinfo: Ditto.

11 months ago * config.guess: Update from config repo.
jbglaw [Mon, 29 Apr 2013 15:13:52 +0000 (15:13 +0000)]
* config.guess: Update from config repo.
* config.sub: Ditto.

11 months ago2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
Joel Sherrill [Thu, 25 Apr 2013 15:29:19 +0000 (15:29 +0000)]
2013-04-25  Sebastian Huber <sebastian.huber@embedded-brains.de>

* libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define.
* libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.

11 months ago * libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD.
Corinna Vinschen [Wed, 24 Apr 2013 10:21:16 +0000 (10:21 +0000)]
* libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD.

11 months ago Port newlib to x86_64-pc-cygwin.
Corinna Vinschen [Tue, 23 Apr 2013 09:42:24 +0000 (09:42 +0000)]
Port newlib to x86_64-pc-cygwin.
* libc/include/sys/features.h: Redefine compilation environment
definitions for Cygwin to cover 64 bit Cygwin.
* libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin.
* libc/include/machine/setjmp.h: Change definition of _JBLEN to allow
different values for 32 bit and 64 bit Cygwin.
* libc/include/reent.h (stat64): Define as stat under Cygwin, instead
of as __stat64.  Undef stat64 if not building Newlib.
* libc/include/sys/stat.h (stat64): Define as stat under Cygwin.

11 months ago2013-04-22 Jan-Benedict Glaw <jbglaw@lug-owl.de>
jbglaw [Mon, 22 Apr 2013 17:11:22 +0000 (17:11 +0000)]
2013-04-22  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* Makefile.def: Sync with GCC.
* Makefile.in: Regenerate.

11 months ago2013-04-22 Jan-Benedict Glaw <jbglaw@lug-owl.de>
jbglaw [Mon, 22 Apr 2013 15:25:08 +0000 (15:25 +0000)]
2013-04-22  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

* configure.ac: Sync with GCC.
* configure: Regenerated.

11 months ago * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
Corinna Vinschen [Mon, 22 Apr 2013 10:28:05 +0000 (10:28 +0000)]
* libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
* libc/include/sys/features.h (__GNUC_PREREQ__): Define.

11 months ago2013-04-19 Steve Ellcey <sellcey@imgtec.com>
Steve Ellcey [Fri, 19 Apr 2013 22:06:34 +0000 (22:06 +0000)]
2013-04-19  Steve Ellcey  <sellcey@imgtec.com>

* mips/cfe_api.h (int64_t): Remove define.
(uint64_t): Remove define.
(intptr_t): Remove define.
(uintptr_t): Remove define.
(sys/types.h): Remove include.
(_ansi.h): Remove include.

11 months ago[AArch64] Honour CFLAGS.
mshawcroft [Fri, 19 Apr 2013 14:24:45 +0000 (14:24 +0000)]
[AArch64] Honour CFLAGS.

2013-04-19  Yufeng Zhang  <yufeng.zhang@arm.com>

* aarch64/Makefile.in (rdimon-crt0.o, rdimon-trap.o)
(rdimon-_exit.o, rdimon-_kill.o, rdimon-syscalls.o)
(rdimon-libcfunc.o): Add $(CFLAGS) to the compiler command line.
* aarch64/cpu-init/Makefile.in (${CPU_INIT_OBJS}): Add $(CFLAGS)
to the compiler command line.

12 months ago * newlib/libc/search/hash.c: Revert patch from 2012-08-08.
Corinna Vinschen [Fri, 19 Apr 2013 09:13:26 +0000 (09:13 +0000)]
* newlib/libc/search/hash.c: Revert patch from 2012-08-08.

12 months ago * libc/sys/rtems/sys/queue.h: Delete file.
Corinna Vinschen [Tue, 16 Apr 2013 10:25:16 +0000 (10:25 +0000)]
* libc/sys/rtems/sys/queue.h: Delete file.
* libc/include/sys/cdefs.h (__containerof): New define.
(__DEQUALIFY): Likewise.
* libc/include/sys/queue.h (TRACEBUF_INITIALIZER): Likewise.
(TRACEBUF): Likewise.
(LIST_FOREACH_SAFE): Likewise.
(LIST_PREV): Likewise.
(LIST_SWAP): Likewise.
(QMD_LIST_CHECK_HEAD): Likewise.
(QMD_LIST_CHECK_NEXT): Likewise.
(QMD_LIST_CHECK_PREV): Likewise.
(QMD_SAVELINK): Likewise.
(QMD_TAILQ_CHECK_HEAD): Likewise.
(QMD_TAILQ_CHECK_NEXT): Likewise.
(QMD_TAILQ_CHECK_PREV): Likewise.
(QMD_TAILQ_CHECK_TAIL): Likewise.
(QMD_TRACE_ELEM): Likewise.
(QMD_TRACE_HEAD): Likewise.
(SLIST_FOREACH_PREVPTR): Likewise.
(SLIST_FOREACH_SAFE): Likewise.
(SLIST_REMOVE_AFTER): Likewise.
(SLIST_SWAP): Likewise.
(STAILQ_FOREACH_SAFE): Likewise.
(STAILQ_REMOVE_AFTER): Likewise.
(STAILQ_SWAP): Likewise.
(TAILQ_FOREACH_REVERSE_SAFE): Likewise.
(TAILQ_FOREACH_SAFE): Likewise.
(TAILQ_SWAP): Likewise.
(TRASHIT): Likewise.
(SLIST_REMOVE): Use SLIST_REMOVE_AFTER().
(STAILQ_LAST): Use __containerof().
(STAILQ_REMOVE): Use STAILQ_REMOVE_AFTER().

12 months ago2013-04-12 Will Newton <will.newton@linaro.org>
Jeff Johnston [Fri, 12 Apr 2013 22:12:29 +0000 (22:12 +0000)]
2013-04-12  Will Newton  <will.newton@linaro.org>

        * libc/machine/arm/memcpy-stub.c: Use generic memcpy if unaligned
        access is not enabled.
        * libc/machine/arm/memcpy.S: Faster memcpy implementation for
        Cortex A15 cores using NEON and VFP if available.

12 months ago * acconfig.h (_WCHAR_ORIENT): Undef
Corinna Vinschen [Fri, 12 Apr 2013 12:05:31 +0000 (12:05 +0000)]
* acconfig.h (_WCHAR_ORIENT): Undef
* newlib.hin (_WCHAR_ORIENT): Undef
* configure.in (--enable-newlib-wchar-orient): New option.
* configure: Regenerated.
* libc/configure.in (--enable-newlib-wchar-orient): New option.
* libc/configure: Regenerated.
* libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Use.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/local.h (ORIENT): Use _WCHAR_ORIENT to control
the definition. Add alternative definition.
* libc/stdio/vfprintf.c (__sfputs_r, __sprint_r): Use _WCHAR_ORIENT
to control the wide char output.