From d1891441af7ea136a6861252740a526e52c46dfb Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Sat, 21 Jan 2017 17:00:13 +0000 Subject: [PATCH] update newlib patch Properly default to UTF-8, expose (f)truncate, remove old malloc lock/unlock stubs --- dkppc/patches/newlib-2.5.0.patch | 1208 +++++++++++++++++------------- 1 file changed, 678 insertions(+), 530 deletions(-) diff --git a/dkppc/patches/newlib-2.5.0.patch b/dkppc/patches/newlib-2.5.0.patch index 95dab71..c8ebf36 100644 --- a/dkppc/patches/newlib-2.5.0.patch +++ b/dkppc/patches/newlib-2.5.0.patch @@ -1,7 +1,8 @@ -diff -Nbaur newlib-2.5.0/libgloss/configure newlib-2.5.0-ppc/libgloss/configure ---- newlib-2.5.0/libgloss/configure 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/libgloss/configure 2017-01-05 01:01:58.876000000 +0000 -@@ -2589,6 +2589,8 @@ +diff --git a/libgloss/configure b/libgloss/configure +index 90a0522..99fe5ad 100755 +--- a/libgloss/configure ++++ b/libgloss/configure +@@ -2589,6 +2589,8 @@ if test "${config_libnosys}" = "true"; then fi @@ -10,10 +11,11 @@ diff -Nbaur newlib-2.5.0/libgloss/configure newlib-2.5.0-ppc/libgloss/configure DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -diff -Nbaur newlib-2.5.0/libgloss/configure.in newlib-2.5.0-ppc/libgloss/configure.in ---- newlib-2.5.0/libgloss/configure.in 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/libgloss/configure.in 2017-01-05 01:01:58.876000000 +0000 -@@ -2,6 +2,7 @@ +diff --git a/libgloss/configure.in b/libgloss/configure.in +index d1b3b34..58c54d6 100644 +--- a/libgloss/configure.in ++++ b/libgloss/configure.in +@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([libgloss],[LIBGLOSS_VERSION]) AC_CONFIG_SRCDIR([libnosys]) @@ -21,7 +23,7 @@ diff -Nbaur newlib-2.5.0/libgloss/configure.in newlib-2.5.0-ppc/libgloss/configu if test "${enable_shared}" = "yes" ; then echo "Shared libraries not supported for cross compiling, ignored" -@@ -33,6 +34,9 @@ +@@ -33,6 +34,9 @@ config_testsuite=true dnl indicates whether to run configure within the libnosys subdirectory config_libnosys=true @@ -31,7 +33,7 @@ diff -Nbaur newlib-2.5.0/libgloss/configure.in newlib-2.5.0-ppc/libgloss/configu case "${target}" in aarch64*-*-*) AC_CONFIG_SUBDIRS(aarch64) -@@ -185,6 +189,10 @@ +@@ -185,6 +189,10 @@ if test "${config_libnosys}" = "true"; then AC_CONFIG_SUBDIRS([libnosys]) fi @@ -42,9 +44,190 @@ diff -Nbaur newlib-2.5.0/libgloss/configure.in newlib-2.5.0-ppc/libgloss/configu LIB_AC_PROG_CC AS=${AS-as} AC_SUBST(AS) -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/abort.c newlib-2.5.0-ppc/libgloss/libsysbase/abort.c ---- newlib-2.5.0/libgloss/libsysbase/abort.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/abort.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/Makefile.in b/libgloss/libsysbase/Makefile.in +new file mode 100644 +index 0000000..2a02eb0 +--- /dev/null ++++ b/libgloss/libsysbase/Makefile.in +@@ -0,0 +1,148 @@ ++# Copyright (c) 1998 Cygnus Support ++# ++# 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. ++ ++DESTDIR = ++VPATH = @srcdir@ ++srcdir = @srcdir@ ++objdir = . ++srcroot = $(srcdir)/../.. ++objroot = $(objdir)/../.. ++ ++prefix = @prefix@ ++exec_prefix = @exec_prefix@ ++ ++host_alias = @host_alias@ ++target_alias = @target_alias@ ++program_transform_name = @program_transform_name@ ++ ++bindir = @bindir@ ++libdir = @libdir@ ++tooldir = $(exec_prefix)/$(target_alias) ++ ++# Multilib support variables. ++# TOP is used instead of MULTI{BUILD,SRC}TOP. ++MULTIDIRS = ++MULTISUBDIR = ++MULTIDO = true ++MULTICLEAN = true ++ ++INSTALL = @INSTALL@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_DATA = @INSTALL_DATA@ ++ ++SHELL = /bin/sh ++ ++CC = @CC@ ++ ++#AS = @AS@ ++AS = `if [ -f ${objroot}/../gas/as.new ] ; \ ++ then echo ${objroot}/../gas/as.new ; \ ++ else echo as ; fi` ++ ++AR = @AR@ ++ ++#LD = @LD@ ++LD = `if [ -f ${objroot}/../ld/ld.new ] ; \ ++ then echo ${objroot}/../ld/ld.new ; \ ++ else echo ld ; fi` ++ ++RANLIB = @RANLIB@ ++ ++OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ ++ then echo ${objroot}/../binutils/objdump ; \ ++ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` ++OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ ++ then echo ${objroot}/../binutils/objcopy ; \ ++ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` ++ ++# object files needed ++OBJS = abort.o iosupport.o close.o environ.o execve.o fork.o fstat.o getpid.o gettod.o \ ++ isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o times.o \ ++ unlink.o wait.o write.o _exit.o malloc_vars.o \ ++ chdir.o mkdir.o rename.o build_argv.o statvfs.o \ ++ flock.o syscall_support.o handle_manager.o truncate.o ftruncate.o dirent.o fsync.o \ ++ fchmod.o chmod.o rmdir.o ++ ++# Object files specific to particular targets. ++EVALOBJS = ${OBJS} ++ ++GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ ++ then echo -L${objroot}/../gcc ; fi` ++ ++OUTPUTS = libsysbase.a ++ ++NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` ++NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi` ++ ++INCLUDES = -I. -I$(srcdir)/.. ++# Note that when building the library, ${MULTILIB} is not the way multilib ++# options are passed; they're passed in $(CFLAGS). ++CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} ++LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS} ++AR_FLAGS = qc ++ ++.c.o: ++ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< ++ ++.C.o: ++ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< ++.s.o: ++ $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< ++ ++# ++# GCC knows to run the preprocessor on .S files before it assembles them. ++# ++.S.o: ++ $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< ++ ++# ++# this is a bogus target that'll produce an assembler from the ++# C source with the right compiler options. this is so we can ++# track down code generation or debug symbol bugs. ++# ++.c.s: ++ $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $< ++ ++all: ${OUTPUTS} ++ ++# ++# here's where we build the library for each target ++# ++ ++libsysbase.a: $(EVALOBJS) ++ ${AR} ${ARFLAGS} $@ $(EVALOBJS) ++ ${RANLIB} $@ ++ ++doc: ++ ++clean mostlyclean: ++ rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x ++ ++distclean maintainer-clean realclean: clean ++ rm -f Makefile config.status $(OUTPUTS) ++ ++.PHONY: install info install-info clean-info ++install: ++ @for outputs in ${OUTPUTS}; do\ ++ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ ++ $(INSTALL_PROGRAM) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ ++ done ++ ++info: ++install-info: ++clean-info: ++ ++Makefile: Makefile.in config.status @host_makefile_frag_path@ ++ $(SHELL) config.status ++ ++config.status: configure ++ $(SHELL) config.status --recheck +diff --git a/libgloss/libsysbase/_exit.c b/libgloss/libsysbase/_exit.c +new file mode 100644 +index 0000000..502d6fb +--- /dev/null ++++ b/libgloss/libsysbase/_exit.c +@@ -0,0 +1,19 @@ ++/* Stub version of _exit. */ ++ ++#include ++#include "config.h" ++#include <_ansi.h> ++#include <_syslist.h> ++#include ++ ++_VOID ++_DEFUN (_exit, (rc), ++ int rc) ++{ ++ ++ if ( __syscalls.exit ) { ++ __syscalls.exit(rc); ++ } ++ ++ while(1); ++} +diff --git a/libgloss/libsysbase/abort.c b/libgloss/libsysbase/abort.c +new file mode 100644 +index 0000000..9272e22 +--- /dev/null ++++ b/libgloss/libsysbase/abort.c @@ -0,0 +1,8 @@ +#include +#include @@ -54,9 +237,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/abort.c newlib-2.5.0-ppc/libgloss/l + _exit (1); +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/acconfig.h newlib-2.5.0-ppc/libgloss/libsysbase/acconfig.h ---- newlib-2.5.0/libgloss/libsysbase/acconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/acconfig.h 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/acconfig.h b/libgloss/libsysbase/acconfig.h +new file mode 100644 +index 0000000..200ea78 +--- /dev/null ++++ b/libgloss/libsysbase/acconfig.h @@ -0,0 +1,29 @@ +/* Name of package. */ +#undef PACKAGE @@ -87,9 +272,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/acconfig.h newlib-2.5.0-ppc/libglos + +/* symbol prefix */ +#undef __SYMBOL_PREFIX -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/aclocal.m4 newlib-2.5.0-ppc/libgloss/libsysbase/aclocal.m4 ---- newlib-2.5.0/libgloss/libsysbase/aclocal.m4 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/aclocal.m4 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/aclocal.m4 b/libgloss/libsysbase/aclocal.m4 +new file mode 100644 +index 0000000..b6cdfae +--- /dev/null ++++ b/libgloss/libsysbase/aclocal.m4 @@ -0,0 +1,344 @@ +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- + @@ -435,9 +622,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/aclocal.m4 newlib-2.5.0-ppc/libglos +]) + +m4_include([../acinclude.m4]) -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/build_argv.c newlib-2.5.0-ppc/libgloss/libsysbase/build_argv.c ---- newlib-2.5.0/libgloss/libsysbase/build_argv.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/build_argv.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/build_argv.c b/libgloss/libsysbase/build_argv.c +new file mode 100644 +index 0000000..79d2006 +--- /dev/null ++++ b/libgloss/libsysbase/build_argv.c @@ -0,0 +1,31 @@ +struct __argv { + int argvMagic; @@ -470,9 +659,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/build_argv.c newlib-2.5.0-ppc/libgl + argstruct->argc = argCount; + argstruct->endARGV = &argv[argCount]; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/chdir.c newlib-2.5.0-ppc/libgloss/libsysbase/chdir.c ---- newlib-2.5.0/libgloss/libsysbase/chdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/chdir.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c +new file mode 100644 +index 0000000..2a0fa03 +--- /dev/null ++++ b/libgloss/libsysbase/chdir.c @@ -0,0 +1,201 @@ +#include +#include @@ -675,9 +866,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/chdir.c newlib-2.5.0-ppc/libgloss/l + + return buf; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/chmod.c newlib-2.5.0-ppc/libgloss/libsysbase/chmod.c ---- newlib-2.5.0/libgloss/libsysbase/chmod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/chmod.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/chmod.c b/libgloss/libsysbase/chmod.c +new file mode 100644 +index 0000000..ce79a2c +--- /dev/null ++++ b/libgloss/libsysbase/chmod.c @@ -0,0 +1,30 @@ +#include "config.h" +#include <_ansi.h> @@ -709,9 +902,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/chmod.c newlib-2.5.0-ppc/libgloss/l + return ret; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/close.c newlib-2.5.0-ppc/libgloss/libsysbase/close.c ---- newlib-2.5.0/libgloss/libsysbase/close.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/close.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/close.c b/libgloss/libsysbase/close.c +new file mode 100644 +index 0000000..d3563fb +--- /dev/null ++++ b/libgloss/libsysbase/close.c @@ -0,0 +1,49 @@ +#include "config.h" +#include <_ansi.h> @@ -762,9 +957,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/close.c newlib-2.5.0-ppc/libgloss/l + } + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/config.h.in newlib-2.5.0-ppc/libgloss/libsysbase/config.h.in ---- newlib-2.5.0/libgloss/libsysbase/config.h.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/config.h.in 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/config.h.in b/libgloss/libsysbase/config.h.in +new file mode 100644 +index 0000000..48ce950 +--- /dev/null ++++ b/libgloss/libsysbase/config.h.in @@ -0,0 +1,25 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + @@ -791,10 +988,12 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/config.h.in newlib-2.5.0-ppc/libglo + +/* symbol prefix */ +#undef __SYMBOL_PREFIX -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss/libsysbase/configure ---- newlib-2.5.0/libgloss/libsysbase/configure 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/configure 2016-12-29 18:50:19.000000000 +0000 -@@ -0,0 +1,4170 @@ +diff --git a/libgloss/libsysbase/configure b/libgloss/libsysbase/configure +new file mode 100755 +index 0000000..874eec1 +--- /dev/null ++++ b/libgloss/libsysbase/configure +@@ -0,0 +1,4158 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69. @@ -2826,15 +3025,9 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + ;; + arc-*-*) + ;; -+ arm-*-pe) ++ arm*-*-*) + ;; -+ arm-*-eabi) -+ $as_echo "#define REENTRANT_SYSCALLS_PROVIDED 1" >>confdefs.h -+ -+ ;; -+ arm-*-*) -+ ;; -+ strongarm-*-*) ++ bfin-*-*) + ;; + cris-*-* | crisv32-*-*) + ;; @@ -2846,14 +3039,16 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + ;; + i345686-*-sco*) + ;; ++ lm32-*-*) ++ ;; + m32r-*-*) + ;; + mn10?00-*-*) + ;; + powerpc-*-eabi) -+ $as_echo "#define REENTRANT_SYSCALLS_PROVIDED 1" >>confdefs.h ++ $as_echo "#define REENTRANT_SYSCALLS_PROVIDED 1" >>confdefs.h + -+ ;; ++ ;; + powerpcle-*-pe) + ;; + sh*-*-*) @@ -2862,15 +3057,7 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + ;; + sparc64-*-*) + ;; -+ thumb-*-pe) -+ ;; -+ thumb-*-*) -+ ;; -+ v850-*-*) -+ ;; -+ v850e-*-*) -+ ;; -+ v850ea-*-*) ++ v850*-*-*) + ;; + w65-*-*) + ;; @@ -2976,13 +3163,13 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 +$as_echo_n "checking for symbol prefix... " >&6; } -+if ${libc_symbol_prefix+:} false; then : ++if ${libc_cv_symbol_prefix+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<\EOF +foo () { } +EOF -+libc_symbol_prefix=none ++libc_cv_symbol_prefix=none +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 @@ -2990,7 +3177,7 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; +then -+ libc_symbol_prefix='$' ++ libc_cv_symbol_prefix='$' +else + if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -2999,16 +3186,16 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; + then -+ libc_symbol_prefix=_ ++ libc_cv_symbol_prefix=_ + fi +fi +rm -f conftest* +fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_symbol_prefix" >&5 -+$as_echo "$libc_symbol_prefix" >&6; } -+if test $libc_symbol_prefix != none; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_symbol_prefix" >&5 ++$as_echo "$libc_cv_symbol_prefix" >&6; } ++if test $libc_cv_symbol_prefix != none; then + cat >>confdefs.h <<_ACEOF -+#define __SYMBOL_PREFIX "$libc_symbol_prefix" ++#define __SYMBOL_PREFIX "$libc_cv_symbol_prefix" +_ACEOF + +else @@ -4965,10 +5152,12 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure newlib-2.5.0-ppc/libgloss + + + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgloss/libsysbase/configure.in ---- newlib-2.5.0/libgloss/libsysbase/configure.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/configure.in 2016-12-29 18:50:19.000000000 +0000 -@@ -0,0 +1,210 @@ +diff --git a/libgloss/libsysbase/configure.in b/libgloss/libsysbase/configure.in +new file mode 100644 +index 0000000..c127df0 +--- /dev/null ++++ b/libgloss/libsysbase/configure.in +@@ -0,0 +1,199 @@ +# Copyright (c) 1995, 1996 Cygnus Support +# +# The authors hereby grant permission to use, copy, modify, distribute, @@ -5016,14 +5205,9 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgl + ;; + arc-*-*) + ;; -+ arm-*-pe) ++ arm*-*-*) + ;; -+ arm-*-eabi) -+ AC_DEFINE(REENTRANT_SYSCALLS_PROVIDED) -+ ;; -+ arm-*-*) -+ ;; -+ strongarm-*-*) ++ bfin-*-*) + ;; + cris-*-* | crisv32-*-*) + ;; @@ -5035,13 +5219,15 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgl + ;; + i[3456]86-*-sco*) + ;; ++ lm32-*-*) ++ ;; + m32r-*-*) + ;; + mn10?00-*-*) + ;; + powerpc-*-eabi) -+ AC_DEFINE(REENTRANT_SYSCALLS_PROVIDED) -+ ;; ++ AC_DEFINE(REENTRANT_SYSCALLS_PROVIDED) ++ ;; + powerpcle-*-pe) + ;; + sh*-*-*) @@ -5050,15 +5236,7 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgl + ;; + sparc64-*-*) + ;; -+ thumb-*-pe) -+ ;; -+ thumb-*-*) -+ ;; -+ v850-*-*) -+ ;; -+ v850e-*-*) -+ ;; -+ v850ea-*-*) ++ v850*-*-*) + ;; + w65-*-*) + ;; @@ -5125,24 +5303,24 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgl + ;; +esac + -+AC_CACHE_CHECK([for symbol prefix], libc_symbol_prefix, [dnl ++AC_CACHE_CHECK([for symbol prefix], libc_cv_symbol_prefix, [dnl +cat > conftest.c <<\EOF +foo () { } +EOF +dnl -+libc_symbol_prefix=none ++libc_cv_symbol_prefix=none +if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]); +then -+ libc_symbol_prefix='$' ++ libc_cv_symbol_prefix='$' +else + if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null]); + then -+ libc_symbol_prefix=_ ++ libc_cv_symbol_prefix=_ + fi +fi +rm -f conftest* ]) -+if test $libc_symbol_prefix != none; then -+ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_symbol_prefix") ++if test $libc_cv_symbol_prefix != none; then ++ AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_cv_symbol_prefix") +else + AC_DEFINE(__SYMBOL_PREFIX, "") +fi @@ -5179,9 +5357,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/configure.in newlib-2.5.0-ppc/libgl +AC_OUTPUT + + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/dirent.c newlib-2.5.0-ppc/libgloss/libsysbase/dirent.c ---- newlib-2.5.0/libgloss/libsysbase/dirent.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/dirent.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/dirent.c b/libgloss/libsysbase/dirent.c +new file mode 100644 +index 0000000..0ad2902 +--- /dev/null ++++ b/libgloss/libsysbase/dirent.c @@ -0,0 +1,255 @@ +#include +#include @@ -5438,9 +5618,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/dirent.c newlib-2.5.0-ppc/libgloss/ + + return dirp->position; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/environ.c newlib-2.5.0-ppc/libgloss/libsysbase/environ.c ---- newlib-2.5.0/libgloss/libsysbase/environ.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/environ.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/environ.c b/libgloss/libsysbase/environ.c +new file mode 100644 +index 0000000..1c485b2 +--- /dev/null ++++ b/libgloss/libsysbase/environ.c @@ -0,0 +1,6 @@ +/* + * Version of environ for no OS. @@ -5448,9 +5630,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/environ.c newlib-2.5.0-ppc/libgloss + +char *__env[1] = { 0 }; +char **environ = __env; -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/execve.c newlib-2.5.0-ppc/libgloss/libsysbase/execve.c ---- newlib-2.5.0/libgloss/libsysbase/execve.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/execve.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/execve.c b/libgloss/libsysbase/execve.c +new file mode 100644 +index 0000000..598b0c5 +--- /dev/null ++++ b/libgloss/libsysbase/execve.c @@ -0,0 +1,32 @@ +/* + * Stub version of execve. @@ -5484,32 +5668,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/execve.c newlib-2.5.0-ppc/libgloss/ + return -1; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/_exit.c newlib-2.5.0-ppc/libgloss/libsysbase/_exit.c ---- newlib-2.5.0/libgloss/libsysbase/_exit.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/_exit.c 2016-12-29 18:50:19.000000000 +0000 -@@ -0,0 +1,19 @@ -+/* Stub version of _exit. */ -+ -+#include -+#include "config.h" -+#include <_ansi.h> -+#include <_syslist.h> -+#include -+ -+_VOID -+_DEFUN (_exit, (rc), -+ int rc) -+{ -+ -+ if ( __syscalls.exit ) { -+ __syscalls.exit(rc); -+ } -+ -+ while(1); -+} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fchmod.c newlib-2.5.0-ppc/libgloss/libsysbase/fchmod.c ---- newlib-2.5.0/libgloss/libsysbase/fchmod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/fchmod.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/fchmod.c b/libgloss/libsysbase/fchmod.c +new file mode 100644 +index 0000000..5c5831c +--- /dev/null ++++ b/libgloss/libsysbase/fchmod.c @@ -0,0 +1,31 @@ +#include "config.h" +#include <_ansi.h> @@ -5542,9 +5705,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fchmod.c newlib-2.5.0-ppc/libgloss/ + } + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/flock.c newlib-2.5.0-ppc/libgloss/libsysbase/flock.c ---- newlib-2.5.0/libgloss/libsysbase/flock.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/flock.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/flock.c b/libgloss/libsysbase/flock.c +new file mode 100644 +index 0000000..c6b8c92 +--- /dev/null ++++ b/libgloss/libsysbase/flock.c @@ -0,0 +1,21 @@ +#include +#include <_ansi.h> @@ -5567,9 +5732,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/flock.c newlib-2.5.0-ppc/libgloss/l +{ + __lock_release_recursive(*(_LOCK_RECURSIVE_T*)&fp->_lock); +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fork.c newlib-2.5.0-ppc/libgloss/libsysbase/fork.c ---- newlib-2.5.0/libgloss/libsysbase/fork.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/fork.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/fork.c b/libgloss/libsysbase/fork.c +new file mode 100644 +index 0000000..712b13e +--- /dev/null ++++ b/libgloss/libsysbase/fork.c @@ -0,0 +1,25 @@ +/* + * Stub version of fork. @@ -5596,9 +5763,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fork.c newlib-2.5.0-ppc/libgloss/li + r->_errno = ENOSYS; + return -1; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fstat.c newlib-2.5.0-ppc/libgloss/libsysbase/fstat.c ---- newlib-2.5.0/libgloss/libsysbase/fstat.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/fstat.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/fstat.c b/libgloss/libsysbase/fstat.c +new file mode 100644 +index 0000000..564fc32 +--- /dev/null ++++ b/libgloss/libsysbase/fstat.c @@ -0,0 +1,44 @@ +#include "config.h" +#include <_ansi.h> @@ -5644,9 +5813,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fstat.c newlib-2.5.0-ppc/libgloss/l + } + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fsync.c newlib-2.5.0-ppc/libgloss/libsysbase/fsync.c ---- newlib-2.5.0/libgloss/libsysbase/fsync.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/fsync.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/fsync.c b/libgloss/libsysbase/fsync.c +new file mode 100644 +index 0000000..4ea232b +--- /dev/null ++++ b/libgloss/libsysbase/fsync.c @@ -0,0 +1,35 @@ +#include "config.h" +#include <_ansi.h> @@ -5683,9 +5854,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/fsync.c newlib-2.5.0-ppc/libgloss/l + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/ftruncate.c newlib-2.5.0-ppc/libgloss/libsysbase/ftruncate.c ---- newlib-2.5.0/libgloss/libsysbase/ftruncate.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/ftruncate.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/ftruncate.c b/libgloss/libsysbase/ftruncate.c +new file mode 100644 +index 0000000..bc1744c +--- /dev/null ++++ b/libgloss/libsysbase/ftruncate.c @@ -0,0 +1,36 @@ +#include "config.h" +#include <_ansi.h> @@ -5723,9 +5896,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/ftruncate.c newlib-2.5.0-ppc/libglo + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/getpid.c newlib-2.5.0-ppc/libgloss/libsysbase/getpid.c ---- newlib-2.5.0/libgloss/libsysbase/getpid.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/getpid.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/getpid.c b/libgloss/libsysbase/getpid.c +new file mode 100644 +index 0000000..77d872b +--- /dev/null ++++ b/libgloss/libsysbase/getpid.c @@ -0,0 +1,21 @@ +#include "config.h" +#include <_ansi.h> @@ -5748,9 +5923,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/getpid.c newlib-2.5.0-ppc/libgloss/ + return -1; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/gettod.c newlib-2.5.0-ppc/libgloss/libsysbase/gettod.c ---- newlib-2.5.0/libgloss/libsysbase/gettod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/gettod.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/gettod.c b/libgloss/libsysbase/gettod.c +new file mode 100644 +index 0000000..d2982bc +--- /dev/null ++++ b/libgloss/libsysbase/gettod.c @@ -0,0 +1,35 @@ +#include "config.h" +#include <_ansi.h> @@ -5787,9 +5964,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/gettod.c newlib-2.5.0-ppc/libgloss/ + +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/handle_manager.c newlib-2.5.0-ppc/libgloss/libsysbase/handle_manager.c ---- newlib-2.5.0/libgloss/libsysbase/handle_manager.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/handle_manager.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/handle_manager.c b/libgloss/libsysbase/handle_manager.c +new file mode 100644 +index 0000000..f3fcc88 +--- /dev/null ++++ b/libgloss/libsysbase/handle_manager.c @@ -0,0 +1,173 @@ +#include +#include @@ -5964,9 +6143,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/handle_manager.c newlib-2.5.0-ppc/l + return newfd; + +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/handle_manager.h newlib-2.5.0-ppc/libgloss/libsysbase/handle_manager.h ---- newlib-2.5.0/libgloss/libsysbase/handle_manager.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/handle_manager.h 2017-01-05 01:01:58.888000000 +0000 +diff --git a/libgloss/libsysbase/handle_manager.h b/libgloss/libsysbase/handle_manager.h +new file mode 100644 +index 0000000..625cb22 +--- /dev/null ++++ b/libgloss/libsysbase/handle_manager.h @@ -0,0 +1,10 @@ +#ifndef __HANDLE_MANAGER_H__ +#define __HANDLE_MANAGER_H__ @@ -5978,9 +6159,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/handle_manager.h newlib-2.5.0-ppc/l +__handle *__get_handle(int fd); + +#endif -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/iosupport.c newlib-2.5.0-ppc/libgloss/libsysbase/iosupport.c ---- newlib-2.5.0/libgloss/libsysbase/iosupport.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/iosupport.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/iosupport.c b/libgloss/libsysbase/iosupport.c +new file mode 100644 +index 0000000..4f13127 +--- /dev/null ++++ b/libgloss/libsysbase/iosupport.c @@ -0,0 +1,138 @@ +#include +#include @@ -6120,9 +6303,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/iosupport.c newlib-2.5.0-ppc/libglo +} + + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/isatty.c newlib-2.5.0-ppc/libgloss/libsysbase/isatty.c ---- newlib-2.5.0/libgloss/libsysbase/isatty.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/isatty.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/isatty.c b/libgloss/libsysbase/isatty.c +new file mode 100644 +index 0000000..c873e10 +--- /dev/null ++++ b/libgloss/libsysbase/isatty.c @@ -0,0 +1,20 @@ +#include "config.h" +#include <_ansi.h> @@ -6144,9 +6329,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/isatty.c newlib-2.5.0-ppc/libgloss/ +#endif + return 0; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/kill.c newlib-2.5.0-ppc/libgloss/libsysbase/kill.c ---- newlib-2.5.0/libgloss/libsysbase/kill.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/kill.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/kill.c b/libgloss/libsysbase/kill.c +new file mode 100644 +index 0000000..d56e340 +--- /dev/null ++++ b/libgloss/libsysbase/kill.c @@ -0,0 +1,23 @@ +/* + * Stub version of kill. @@ -6171,9 +6358,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/kill.c newlib-2.5.0-ppc/libgloss/li + ptr->_errno = ENOSYS; + return -1; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/link.c newlib-2.5.0-ppc/libgloss/libsysbase/link.c ---- newlib-2.5.0/libgloss/libsysbase/link.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/link.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/link.c b/libgloss/libsysbase/link.c +new file mode 100644 +index 0000000..b05c8fd +--- /dev/null ++++ b/libgloss/libsysbase/link.c @@ -0,0 +1,38 @@ +#include "config.h" +#include <_ansi.h> @@ -6213,9 +6402,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/link.c newlib-2.5.0-ppc/libgloss/li + return ret; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/lseek.c newlib-2.5.0-ppc/libgloss/libsysbase/lseek.c ---- newlib-2.5.0/libgloss/libsysbase/lseek.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/lseek.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/lseek.c b/libgloss/libsysbase/lseek.c +new file mode 100644 +index 0000000..6eeee90 +--- /dev/null ++++ b/libgloss/libsysbase/lseek.c @@ -0,0 +1,52 @@ +#include "config.h" +#include <_ansi.h> @@ -6269,167 +6460,19 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/lseek.c newlib-2.5.0-ppc/libgloss/l + return ret; + +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/Makefile.in newlib-2.5.0-ppc/libgloss/libsysbase/Makefile.in ---- newlib-2.5.0/libgloss/libsysbase/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/Makefile.in 2017-01-05 09:15:57.216000000 +0000 -@@ -0,0 +1,148 @@ -+# Copyright (c) 1998 Cygnus Support -+# -+# 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. -+ -+DESTDIR = -+VPATH = @srcdir@ -+srcdir = @srcdir@ -+objdir = . -+srcroot = $(srcdir)/../.. -+objroot = $(objdir)/../.. -+ -+prefix = @prefix@ -+exec_prefix = @exec_prefix@ -+ -+host_alias = @host_alias@ -+target_alias = @target_alias@ -+program_transform_name = @program_transform_name@ -+ -+bindir = @bindir@ -+libdir = @libdir@ -+tooldir = $(exec_prefix)/$(target_alias) -+ -+# Multilib support variables. -+# TOP is used instead of MULTI{BUILD,SRC}TOP. -+MULTIDIRS = -+MULTISUBDIR = -+MULTIDO = true -+MULTICLEAN = true -+ -+INSTALL = @INSTALL@ -+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -+INSTALL_DATA = @INSTALL_DATA@ -+ -+SHELL = /bin/sh -+ -+CC = @CC@ -+ -+#AS = @AS@ -+AS = `if [ -f ${objroot}/../gas/as.new ] ; \ -+ then echo ${objroot}/../gas/as.new ; \ -+ else echo as ; fi` -+ -+AR = @AR@ -+ -+#LD = @LD@ -+LD = `if [ -f ${objroot}/../ld/ld.new ] ; \ -+ then echo ${objroot}/../ld/ld.new ; \ -+ else echo ld ; fi` -+ -+RANLIB = @RANLIB@ -+ -+OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \ -+ then echo ${objroot}/../binutils/objdump ; \ -+ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi` -+OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ -+ then echo ${objroot}/../binutils/objcopy ; \ -+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` -+ -+# object files needed -+OBJS = abort.o iosupport.o close.o environ.o execve.o fork.o fstat.o getpid.o gettod.o \ -+ isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o times.o \ -+ unlink.o wait.o write.o _exit.o malloc_vars.o \ -+ chdir.o mkdir.o rename.o build_argv.o statvfs.o \ -+ flock.o syscall_support.o handle_manager.o truncate.o ftruncate.o dirent.o fsync.o \ -+ fchmod.o chmod.o rmdir.o -+ -+# Object files specific to particular targets. -+EVALOBJS = ${OBJS} -+ -+GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ -+ then echo -L${objroot}/../gcc ; fi` -+ -+OUTPUTS = libsysbase.a -+ -+NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` -+NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi` -+ -+INCLUDES = -I. -I$(srcdir)/.. -+# Note that when building the library, ${MULTILIB} is not the way multilib -+# options are passed; they're passed in $(CFLAGS). -+CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} -+LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS} -+AR_FLAGS = qc -+ -+.c.o: -+ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< -+ -+.C.o: -+ $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $< -+.s.o: -+ $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< -+ -+# -+# GCC knows to run the preprocessor on .S files before it assembles them. -+# -+.S.o: -+ $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -+ -+# -+# this is a bogus target that'll produce an assembler from the -+# C source with the right compiler options. this is so we can -+# track down code generation or debug symbol bugs. -+# -+.c.s: -+ $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $< -+ -+all: ${OUTPUTS} -+ -+# -+# here's where we build the library for each target -+# -+ -+libsysbase.a: $(EVALOBJS) -+ ${AR} ${ARFLAGS} $@ $(EVALOBJS) -+ ${RANLIB} $@ -+ -+doc: -+ -+clean mostlyclean: -+ rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x -+ -+distclean maintainer-clean realclean: clean -+ rm -f Makefile config.status $(OUTPUTS) -+ -+.PHONY: install info install-info clean-info -+install: -+ @for outputs in ${OUTPUTS}; do\ -+ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ -+ $(INSTALL_PROGRAM) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \ -+ done -+ -+info: -+install-info: -+clean-info: -+ -+Makefile: Makefile.in config.status @host_makefile_frag_path@ -+ $(SHELL) config.status -+ -+config.status: configure -+ $(SHELL) config.status --recheck -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/malloc_vars.c newlib-2.5.0-ppc/libgloss/libsysbase/malloc_vars.c ---- newlib-2.5.0/libgloss/libsysbase/malloc_vars.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/malloc_vars.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/malloc_vars.c b/libgloss/libsysbase/malloc_vars.c +new file mode 100644 +index 0000000..4565909 +--- /dev/null ++++ b/libgloss/libsysbase/malloc_vars.c @@ -0,0 +1,2 @@ +char *fake_heap_end = (char*)0; +char *fake_heap_start = (char*)0; -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/mkdir.c newlib-2.5.0-ppc/libgloss/libsysbase/mkdir.c ---- newlib-2.5.0/libgloss/libsysbase/mkdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/mkdir.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/mkdir.c b/libgloss/libsysbase/mkdir.c +new file mode 100644 +index 0000000..4175cf8 +--- /dev/null ++++ b/libgloss/libsysbase/mkdir.c @@ -0,0 +1,19 @@ +#include +#include @@ -6450,9 +6493,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/mkdir.c newlib-2.5.0-ppc/libgloss/l + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/open.c newlib-2.5.0-ppc/libgloss/libsysbase/open.c ---- newlib-2.5.0/libgloss/libsysbase/open.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/open.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/open.c b/libgloss/libsysbase/open.c +new file mode 100644 +index 0000000..a38e05c +--- /dev/null ++++ b/libgloss/libsysbase/open.c @@ -0,0 +1,60 @@ +#include "config.h" +#include <_ansi.h> @@ -6514,9 +6559,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/open.c newlib-2.5.0-ppc/libgloss/li + + return fd; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/read.c newlib-2.5.0-ppc/libgloss/libsysbase/read.c ---- newlib-2.5.0/libgloss/libsysbase/read.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/read.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/read.c b/libgloss/libsysbase/read.c +new file mode 100644 +index 0000000..7f3f7f2 +--- /dev/null ++++ b/libgloss/libsysbase/read.c @@ -0,0 +1,46 @@ +#include "config.h" +#include <_ansi.h> @@ -6564,9 +6611,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/read.c newlib-2.5.0-ppc/libgloss/li + return ret; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/rename.c newlib-2.5.0-ppc/libgloss/libsysbase/rename.c ---- newlib-2.5.0/libgloss/libsysbase/rename.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/rename.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/rename.c b/libgloss/libsysbase/rename.c +new file mode 100644 +index 0000000..7520d1d +--- /dev/null ++++ b/libgloss/libsysbase/rename.c @@ -0,0 +1,41 @@ +#include "config.h" +#include @@ -6609,9 +6658,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/rename.c newlib-2.5.0-ppc/libgloss/ + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/rmdir.c newlib-2.5.0-ppc/libgloss/libsysbase/rmdir.c ---- newlib-2.5.0/libgloss/libsysbase/rmdir.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/rmdir.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/rmdir.c b/libgloss/libsysbase/rmdir.c +new file mode 100644 +index 0000000..2692a29 +--- /dev/null ++++ b/libgloss/libsysbase/rmdir.c @@ -0,0 +1,25 @@ +#include "config.h" +#include <_ansi.h> @@ -6638,9 +6689,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/rmdir.c newlib-2.5.0-ppc/libgloss/l + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/sbrk.c newlib-2.5.0-ppc/libgloss/libsysbase/sbrk.c ---- newlib-2.5.0/libgloss/libsysbase/sbrk.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/sbrk.c 2017-01-05 13:22:08.000000000 +0000 +diff --git a/libgloss/libsysbase/sbrk.c b/libgloss/libsysbase/sbrk.c +new file mode 100644 +index 0000000..e2bdb9e +--- /dev/null ++++ b/libgloss/libsysbase/sbrk.c @@ -0,0 +1,26 @@ +#include "config.h" +#include @@ -6669,9 +6722,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/sbrk.c newlib-2.5.0-ppc/libgloss/li + +} \ No newline at end of file -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/stat.c newlib-2.5.0-ppc/libgloss/libsysbase/stat.c ---- newlib-2.5.0/libgloss/libsysbase/stat.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/stat.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/stat.c b/libgloss/libsysbase/stat.c +new file mode 100644 +index 0000000..e474c47 +--- /dev/null ++++ b/libgloss/libsysbase/stat.c @@ -0,0 +1,44 @@ +#include "config.h" +#include <_ansi.h> @@ -6717,9 +6772,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/stat.c newlib-2.5.0-ppc/libgloss/li + return ret; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/statvfs.c newlib-2.5.0-ppc/libgloss/libsysbase/statvfs.c ---- newlib-2.5.0/libgloss/libsysbase/statvfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/statvfs.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/statvfs.c b/libgloss/libsysbase/statvfs.c +new file mode 100644 +index 0000000..b3dec22 +--- /dev/null ++++ b/libgloss/libsysbase/statvfs.c @@ -0,0 +1,24 @@ +#include +#include @@ -6745,10 +6802,12 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/statvfs.c newlib-2.5.0-ppc/libgloss + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/syscall_support.c newlib-2.5.0-ppc/libgloss/libsysbase/syscall_support.c ---- newlib-2.5.0/libgloss/libsysbase/syscall_support.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/syscall_support.c 2017-01-05 09:14:09.000000000 +0000 -@@ -0,0 +1,65 @@ +diff --git a/libgloss/libsysbase/syscall_support.c b/libgloss/libsysbase/syscall_support.c +new file mode 100644 +index 0000000..316443a +--- /dev/null ++++ b/libgloss/libsysbase/syscall_support.c +@@ -0,0 +1,51 @@ +#include + +//--------------------------------------------------------------------------------- @@ -6800,23 +6859,12 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/syscall_support.c newlib-2.5.0-ppc/ + + return 0; +} -+ -+void __malloc_lock( struct _reent *ptr ) { -+ -+ if ( __syscalls.malloc_lock) { -+ __syscalls.malloc_lock(ptr); -+ } -+} -+ -+void __malloc_unlock( struct _reent *ptr ) { -+ -+ if ( __syscalls.malloc_unlock) { -+ __syscalls.malloc_unlock(ptr); -+ } -+} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/times.c newlib-2.5.0-ppc/libgloss/libsysbase/times.c ---- newlib-2.5.0/libgloss/libsysbase/times.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/times.c 2016-12-29 18:50:19.000000000 +0000 +\ No newline at end of file +diff --git a/libgloss/libsysbase/times.c b/libgloss/libsysbase/times.c +new file mode 100644 +index 0000000..67db6c7 +--- /dev/null ++++ b/libgloss/libsysbase/times.c @@ -0,0 +1,21 @@ +#include "config.h" +#include <_ansi.h> @@ -6839,9 +6887,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/times.c newlib-2.5.0-ppc/libgloss/l + return (clock_t)-1; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/truncate.c newlib-2.5.0-ppc/libgloss/libsysbase/truncate.c ---- newlib-2.5.0/libgloss/libsysbase/truncate.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/truncate.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/truncate.c b/libgloss/libsysbase/truncate.c +new file mode 100644 +index 0000000..4ff1d27 +--- /dev/null ++++ b/libgloss/libsysbase/truncate.c @@ -0,0 +1,58 @@ +#include "config.h" +#include <_ansi.h> @@ -6901,9 +6951,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/truncate.c newlib-2.5.0-ppc/libglos + + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/unlink.c newlib-2.5.0-ppc/libgloss/libsysbase/unlink.c ---- newlib-2.5.0/libgloss/libsysbase/unlink.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/unlink.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/unlink.c b/libgloss/libsysbase/unlink.c +new file mode 100644 +index 0000000..9a61639 +--- /dev/null ++++ b/libgloss/libsysbase/unlink.c @@ -0,0 +1,37 @@ +#include "config.h" +#include <_ansi.h> @@ -6942,9 +6994,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/unlink.c newlib-2.5.0-ppc/libgloss/ + return ret; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/wait.c newlib-2.5.0-ppc/libgloss/libsysbase/wait.c ---- newlib-2.5.0/libgloss/libsysbase/wait.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/wait.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/wait.c b/libgloss/libsysbase/wait.c +new file mode 100644 +index 0000000..322c847 +--- /dev/null ++++ b/libgloss/libsysbase/wait.c @@ -0,0 +1,29 @@ +/* + * Stub version of wait. @@ -6975,9 +7029,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/wait.c newlib-2.5.0-ppc/libgloss/li + return -1; +} + -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/warning.h newlib-2.5.0-ppc/libgloss/libsysbase/warning.h ---- newlib-2.5.0/libgloss/libsysbase/warning.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/warning.h 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/warning.h b/libgloss/libsysbase/warning.h +new file mode 100644 +index 0000000..2c29982 +--- /dev/null ++++ b/libgloss/libsysbase/warning.h @@ -0,0 +1,43 @@ +#ifndef __WARNING_H__ +#define __WARNING_H__ @@ -7022,9 +7078,11 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/warning.h newlib-2.5.0-ppc/libgloss + "warning: " #name " is not implemented and will always fail") + +#endif /* __WARNING_H__ */ -diff -Nbaur newlib-2.5.0/libgloss/libsysbase/write.c newlib-2.5.0-ppc/libgloss/libsysbase/write.c ---- newlib-2.5.0/libgloss/libsysbase/write.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/libsysbase/write.c 2016-12-29 18:50:19.000000000 +0000 +diff --git a/libgloss/libsysbase/write.c b/libgloss/libsysbase/write.c +new file mode 100644 +index 0000000..39aa78b +--- /dev/null ++++ b/libgloss/libsysbase/write.c @@ -0,0 +1,45 @@ +#include "config.h" +#include <_ansi.h> @@ -7071,9 +7129,62 @@ diff -Nbaur newlib-2.5.0/libgloss/libsysbase/write.c newlib-2.5.0-ppc/libgloss/l + } + return ret; +} -diff -Nbaur newlib-2.5.0/libgloss/rs6000/crtmain.c newlib-2.5.0-ppc/libgloss/rs6000/crtmain.c ---- newlib-2.5.0/libgloss/rs6000/crtmain.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/libgloss/rs6000/crtmain.c 2017-01-05 01:01:58.892000000 +0000 +diff --git a/libgloss/rs6000/Makefile.in b/libgloss/rs6000/Makefile.in +index 51714e5..db82941 100644 +--- a/libgloss/rs6000/Makefile.in ++++ b/libgloss/rs6000/Makefile.in +@@ -129,6 +129,9 @@ XIL_OBJS = open.o close.o lseek.o sbrk.o read.o write.o print.o + XIL_TEST = xil-test + XIL_INSTALL = install-xil + ++OGC_CRTMAIN = crtmain.o ++OGC_INSTALL = install-ogc ++ + # Host specific makefile fragment comes in here. + @host_makefile_frag@ + +@@ -143,7 +146,7 @@ all: \ + ${LINUX_CRT0} ${LINUX_BSP} \ + ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP} \ + ${ADS_CRT0} ${ADS_BSP} \ +- ${MBX_CRT0} ${MBX_BSP} \ ++ ${MBX_CRT0} ${MBX_BSP} ${OGC_CRTMAIN} \ + ${XIL_CRT0} ${XIL_BSP} + + # +@@ -295,6 +298,8 @@ xil-test.srec: xil-test.x + + crt0.o: crt0.S + ++crtmain.o: crtmain.c ++ + simulator.o: simulator.S + sim-getrusage.o: sim-getrusage.S + sim-crt0.o: sim-crt0.S +@@ -352,7 +357,7 @@ distclean maintainer-clean realclean: clean + rm -f Makefile config.status *~ + + .PHONY: install info install-info clean-info +-install: ${SIM_INSTALL} ${MVME_INSTALL} ${SOLARIS_INSTALL} ${LINUX_INSTALL} ${YELLOWKNIFE_INSTALL} ${ADS_INSTALL} ${MBX_INSTALL} ${XIL_INSTALL} ++install: ${SIM_INSTALL} ${MVME_INSTALL} ${SOLARIS_INSTALL} ${LINUX_INSTALL} ${YELLOWKNIFE_INSTALL} ${ADS_INSTALL} ${MBX_INSTALL} ${OGC_INSTALL} ${XIL_INSTALL} + + install-sim: + set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done +@@ -382,6 +387,9 @@ install-xil: + set -e; for x in ${XIL_CRT0} ${XIL_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib/$$x; done + set -e; for x in ${XIL_SCRIPTS} ${XIL_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib/$$x; done + ++install-ogc: ++ set -e; for x in ${OGC_CRTMAIN}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done ++ + doc: + info: + install-info: +diff --git a/libgloss/rs6000/crtmain.c b/libgloss/rs6000/crtmain.c +new file mode 100644 +index 0000000..bd25d77 +--- /dev/null ++++ b/libgloss/rs6000/crtmain.c @@ -0,0 +1,18 @@ +#include + @@ -7093,60 +7204,11 @@ diff -Nbaur newlib-2.5.0/libgloss/rs6000/crtmain.c newlib-2.5.0-ppc/libgloss/rs6 + SYS_PreMain(); + exit ( main(__system_argv->argc,__system_argv->argv) ); +} -diff -Nbaur newlib-2.5.0/libgloss/rs6000/Makefile.in newlib-2.5.0-ppc/libgloss/rs6000/Makefile.in ---- newlib-2.5.0/libgloss/rs6000/Makefile.in 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/libgloss/rs6000/Makefile.in 2017-01-05 01:01:58.892000000 +0000 -@@ -129,6 +129,9 @@ - XIL_TEST = xil-test - XIL_INSTALL = install-xil - -+OGC_CRTMAIN = crtmain.o -+OGC_INSTALL = install-ogc -+ - # Host specific makefile fragment comes in here. - @host_makefile_frag@ - -@@ -143,7 +146,7 @@ - ${LINUX_CRT0} ${LINUX_BSP} \ - ${YELLOWKNIFE_CRT0} ${YELLOWKNIFE_BSP} \ - ${ADS_CRT0} ${ADS_BSP} \ -- ${MBX_CRT0} ${MBX_BSP} \ -+ ${MBX_CRT0} ${MBX_BSP} ${OGC_CRTMAIN} \ - ${XIL_CRT0} ${XIL_BSP} - - # -@@ -295,6 +298,8 @@ - - crt0.o: crt0.S - -+crtmain.o: crtmain.c -+ - simulator.o: simulator.S - sim-getrusage.o: sim-getrusage.S - sim-crt0.o: sim-crt0.S -@@ -352,7 +357,7 @@ - rm -f Makefile config.status *~ - - .PHONY: install info install-info clean-info --install: ${SIM_INSTALL} ${MVME_INSTALL} ${SOLARIS_INSTALL} ${LINUX_INSTALL} ${YELLOWKNIFE_INSTALL} ${ADS_INSTALL} ${MBX_INSTALL} ${XIL_INSTALL} -+install: ${SIM_INSTALL} ${MVME_INSTALL} ${SOLARIS_INSTALL} ${LINUX_INSTALL} ${YELLOWKNIFE_INSTALL} ${ADS_INSTALL} ${MBX_INSTALL} ${OGC_INSTALL} ${XIL_INSTALL} - - install-sim: - set -e; for x in ${SIM_CRT0} ${SIM_BSP} ${SIM_SCRIPTS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done -@@ -382,6 +387,9 @@ - set -e; for x in ${XIL_CRT0} ${XIL_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib/$$x; done - set -e; for x in ${XIL_SCRIPTS} ${XIL_SPECS}; do ${INSTALL_DATA} $(srcdir)/$$x $(DESTDIR)${tooldir}/lib/$$x; done - -+install-ogc: -+ set -e; for x in ${OGC_CRTMAIN}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done -+ - doc: - info: - install-info: -diff -Nbaur newlib-2.5.0/newlib/configure.host newlib-2.5.0-ppc/newlib/configure.host ---- newlib-2.5.0/newlib/configure.host 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/configure.host 2017-01-05 01:01:58.892000000 +0000 -@@ -793,7 +793,12 @@ +diff --git a/newlib/configure.host b/newlib/configure.host +index d471200..1c565ce 100644 +--- a/newlib/configure.host ++++ b/newlib/configure.host +@@ -793,7 +793,12 @@ case "${host}" in default_newlib_io_long_long="yes" newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" ;; @@ -7160,10 +7222,11 @@ diff -Nbaur newlib-2.5.0/newlib/configure.host newlib-2.5.0-ppc/newlib/configure powerpc*-*-elf* | \ powerpc*-*-linux* | \ powerpc*-*-rtem* | \ -diff -Nbaur newlib-2.5.0/newlib/libc/include/stdio.h newlib-2.5.0-ppc/newlib/libc/include/stdio.h ---- newlib-2.5.0/newlib/libc/include/stdio.h 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/include/stdio.h 2017-01-05 01:01:58.896000000 +0000 -@@ -227,7 +227,7 @@ +diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h +index 097b0f6..062965e 100644 +--- a/newlib/libc/include/stdio.h ++++ b/newlib/libc/include/stdio.h +@@ -227,7 +227,7 @@ int _EXFUN(fgetpos, (FILE *, _fpos_t *)); #else int _EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict)); #endif @@ -7172,7 +7235,7 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/stdio.h newlib-2.5.0-ppc/newlib/lib #ifdef _COMPILING_NEWLIB int _EXFUN(fsetpos, (FILE *, const _fpos_t *)); #else -@@ -435,7 +435,7 @@ +@@ -435,7 +435,7 @@ size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...) _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); @@ -7181,9 +7244,10 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/stdio.h newlib-2.5.0-ppc/newlib/lib int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int)); long _EXFUN(_ftell_r, (struct _reent *, FILE *)); _off_t _EXFUN(_ftello_r,(struct _reent *, FILE *)); -diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/dirent.h newlib-2.5.0-ppc/newlib/libc/include/sys/dirent.h ---- newlib-2.5.0/newlib/libc/include/sys/dirent.h 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/include/sys/dirent.h 2017-01-05 01:01:58.896000000 +0000 +diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h +index a3fb5c0..478d1b4 100644 +--- a/newlib/libc/include/sys/dirent.h ++++ b/newlib/libc/include/sys/dirent.h @@ -4,10 +4,51 @@ not support , we will get this file which uses #error to force an error. */ @@ -7238,9 +7302,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/dirent.h newlib-2.5.0-ppc/newli + +#endif // _dirent_h_ \ No newline at end of file -diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/iosupport.h newlib-2.5.0-ppc/newlib/libc/include/sys/iosupport.h ---- newlib-2.5.0/newlib/libc/include/sys/iosupport.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/newlib/libc/include/sys/iosupport.h 2017-01-05 03:20:46.000000000 +0000 +diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h +new file mode 100644 +index 0000000..e5567f0 +--- /dev/null ++++ b/newlib/libc/include/sys/iosupport.h @@ -0,0 +1,101 @@ +//--------------------------------------------------------------------------------- +#ifndef __iosupp_h__ @@ -7343,10 +7409,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/iosupport.h newlib-2.5.0-ppc/ne +//--------------------------------------------------------------------------------- +#endif // __iosupp_h__ +//--------------------------------------------------------------------------------- -diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/reent.h newlib-2.5.0-ppc/newlib/libc/include/sys/reent.h ---- newlib-2.5.0/newlib/libc/include/sys/reent.h 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/include/sys/reent.h 2016-12-29 18:50:19.000000000 +0000 -@@ -416,6 +416,8 @@ +diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h +index e1ed8b4..9d8be35 100644 +--- a/newlib/libc/include/sys/reent.h ++++ b/newlib/libc/include/sys/reent.h +@@ -416,6 +416,8 @@ struct _reent __FILE *__sf; /* file descriptors */ struct _misc_reent *_misc; /* strtok, multibyte states */ char *_signal_buf; /* strsignal */ @@ -7355,7 +7422,7 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/reent.h newlib-2.5.0-ppc/newlib }; extern const struct __sFILE_fake __sf_fake_stdin; -@@ -645,6 +647,7 @@ +@@ -645,6 +647,7 @@ struct _reent would be broken otherwise). */ struct _glue __sglue; /* root of glue chain */ __FILE __sf[3]; /* first three file descriptors */ @@ -7363,9 +7430,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/reent.h newlib-2.5.0-ppc/newlib }; #define _REENT_INIT(var) \ -diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/statvfs.h newlib-2.5.0-ppc/newlib/libc/include/sys/statvfs.h ---- newlib-2.5.0/newlib/libc/include/sys/statvfs.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/newlib/libc/include/sys/statvfs.h 2017-01-05 01:01:58.896000000 +0000 +diff --git a/newlib/libc/include/sys/statvfs.h b/newlib/libc/include/sys/statvfs.h +new file mode 100644 +index 0000000..380329d +--- /dev/null ++++ b/newlib/libc/include/sys/statvfs.h @@ -0,0 +1,35 @@ +#ifndef _SYS_STATVFS_H +#define _SYS_STATVFS_H @@ -7403,9 +7472,10 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/statvfs.h newlib-2.5.0-ppc/newl + +#endif // _SYS_STATVFS_H \ No newline at end of file -diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/syslimits.h newlib-2.5.0-ppc/newlib/libc/include/sys/syslimits.h ---- newlib-2.5.0/newlib/libc/include/sys/syslimits.h 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/include/sys/syslimits.h 2017-01-05 01:01:58.896000000 +0000 +diff --git a/newlib/libc/include/sys/syslimits.h b/newlib/libc/include/sys/syslimits.h +index ba9dbd6..93ed11a 100644 +--- a/newlib/libc/include/sys/syslimits.h ++++ b/newlib/libc/include/sys/syslimits.h @@ -44,12 +44,12 @@ #define LINK_MAX 32767 /* max file link count */ #define MAX_CANON 255 /* max bytes in term canon input line */ @@ -7421,10 +7491,28 @@ diff -Nbaur newlib-2.5.0/newlib/libc/include/sys/syslimits.h newlib-2.5.0-ppc/ne #define PIPE_BUF 512 /* max bytes for atomic pipe writes */ #define IOV_MAX 1024 /* max elements in i/o vector */ -diff -Nbaur newlib-2.5.0/newlib/libc/locale/locale.c newlib-2.5.0-ppc/newlib/libc/locale/locale.c ---- newlib-2.5.0/newlib/libc/locale/locale.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/locale/locale.c 2017-01-05 01:19:22.724000000 +0000 -@@ -181,15 +181,18 @@ +diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h +index 84219ca..af9d12c 100644 +--- a/newlib/libc/include/sys/unistd.h ++++ b/newlib/libc/include/sys/unistd.h +@@ -252,12 +252,10 @@ _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nb + int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); + #endif + +-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__aarch64__) || defined (__arm__) || defined(__sh__) || defined(__SPU__) + #if !defined(__INSIDE_CYGWIN__) + int _EXFUN(ftruncate, (int __fd, off_t __length)); + int _EXFUN(truncate, (const char *, off_t __length)); + #endif +-#endif + + #if defined(__CYGWIN__) || defined(__rtems__) + int _EXFUN(getdtablesize, (void)); +diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c +index 8572821..57dee54 100644 +--- a/newlib/libc/locale/locale.c ++++ b/newlib/libc/locale/locale.c +@@ -181,15 +181,18 @@ No supporting OS subroutines are required. #include "../ctype/ctype_.h" #include "../stdlib/local.h" @@ -7443,19 +7531,50 @@ diff -Nbaur newlib-2.5.0/newlib/libc/locale/locale.c newlib-2.5.0-ppc/newlib/lib #ifdef _MB_CAPABLE /* * Category names for getenv() -@@ -209,7 +212,11 @@ +@@ -209,7 +212,11 @@ static char *categories[_LC_LAST] = { * Default locale per POSIX. Can be overridden on a per-target base. */ #ifndef DEFAULT_LOCALE +-#define DEFAULT_LOCALE "C" +#ifdef __DEFAULT_UTF8__ - #define DEFAULT_LOCALE "C" ++#define DEFAULT_LOCALE "C.UTF8" +#else -+#define DEFAULT_LOCALE "C.UTF-8" ++#define DEFAULT_LOCALE "C" +#endif #endif #ifdef _MB_CAPABLE -@@ -255,10 +262,11 @@ +@@ -222,8 +229,13 @@ char __default_locale[ENCODING_LEN + 1] = DEFAULT_LOCALE; + const struct __locale_t __C_locale = + { + { "C", "C", "C", "C", "C", "C", "C", }, ++#if defined ( __DEFAULT_UTF8__ ) ++ __utf8_wctomb, ++ __utf8_mbtowc, ++#else + __ascii_wctomb, + __ascii_mbtowc, ++#endif + 0, + DEFAULT_CTYPE_PTR, + { +@@ -234,9 +246,15 @@ const struct __locale_t __C_locale = + CHAR_MAX, CHAR_MAX + }, + #ifndef __HAVE_LOCALE_INFO__ ++#ifdef __DEFAULT_UTF8__ ++ "\6", ++ "UTF-8", ++ "UTF-8", ++#else + "\1", + "ASCII", + "ASCII", ++#endif + #else /* __HAVE_LOCALE_INFO__ */ + { + { NULL, NULL }, /* LC_ALL */ +@@ -255,10 +273,11 @@ const struct __locale_t __C_locale = }; #endif /* _MB_CAPABLE */ @@ -7468,7 +7587,23 @@ diff -Nbaur newlib-2.5.0/newlib/libc/locale/locale.c newlib-2.5.0-ppc/newlib/lib __utf8_wctomb, __utf8_mbtowc, #else -@@ -995,6 +1003,7 @@ +@@ -275,9 +294,15 @@ struct __locale_t __global_locale = + CHAR_MAX, CHAR_MAX + }, + #ifndef __HAVE_LOCALE_INFO__ ++#ifdef __DEFAULT_UTF8__ ++ "\6", ++ "UTF-8", ++ "UTF-8", ++#else + "\1", + "ASCII", + "ASCII", ++#endif + #else /* __HAVE_LOCALE_INFO__ */ + { + { NULL, NULL }, /* LC_ALL */ +@@ -995,6 +1020,7 @@ __locale_ctype_ptr_l (struct __locale_t *locale) const char * __locale_ctype_ptr (void) @@ -7476,9 +7611,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/locale/locale.c newlib-2.5.0-ppc/newlib/lib { return __get_current_locale ()->ctype_ptr; } -diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/machine/_types.h newlib-2.5.0-ppc/newlib/libc/machine/powerpc/machine/_types.h ---- newlib-2.5.0/newlib/libc/machine/powerpc/machine/_types.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/newlib/libc/machine/powerpc/machine/_types.h 2017-01-05 02:16:34.000000000 +0000 +diff --git a/newlib/libc/machine/powerpc/machine/_types.h b/newlib/libc/machine/powerpc/machine/_types.h +new file mode 100644 +index 0000000..a7d63da +--- /dev/null ++++ b/newlib/libc/machine/powerpc/machine/_types.h @@ -0,0 +1,19 @@ +#ifndef _MACHINE__TYPES_H +#define _MACHINE__TYPES_H @@ -7499,9 +7636,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/machine/_types.h newlib-2.5 +#define __machine_dev_t_defined + +#endif // _MACHINE__TYPES_H -diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/sys/lock.h newlib-2.5.0-ppc/newlib/libc/machine/powerpc/sys/lock.h ---- newlib-2.5.0/newlib/libc/machine/powerpc/sys/lock.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/newlib/libc/machine/powerpc/sys/lock.h 2017-01-05 02:05:16.452000000 +0000 +diff --git a/newlib/libc/machine/powerpc/sys/lock.h b/newlib/libc/machine/powerpc/sys/lock.h +new file mode 100644 +index 0000000..d83fda5 +--- /dev/null ++++ b/newlib/libc/machine/powerpc/sys/lock.h @@ -0,0 +1,51 @@ +#ifndef __SYS_LOCK_H__ +#define __SYS_LOCK_H__ @@ -7554,9 +7693,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/sys/lock.h newlib-2.5.0-ppc +extern int __libc_lock_release(int*); + +#endif /* __SYS_LOCK_H__ */ -diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/sys/stdio.h newlib-2.5.0-ppc/newlib/libc/machine/powerpc/sys/stdio.h ---- newlib-2.5.0/newlib/libc/machine/powerpc/sys/stdio.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-2.5.0-ppc/newlib/libc/machine/powerpc/sys/stdio.h 2017-01-05 01:01:58.900000000 +0000 +diff --git a/newlib/libc/machine/powerpc/sys/stdio.h b/newlib/libc/machine/powerpc/sys/stdio.h +new file mode 100644 +index 0000000..04ebd1e +--- /dev/null ++++ b/newlib/libc/machine/powerpc/sys/stdio.h @@ -0,0 +1,25 @@ +#ifndef _NEWLIB_STDIO_H +#define _NEWLIB_STDIO_H @@ -7583,10 +7724,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/machine/powerpc/sys/stdio.h newlib-2.5.0-pp + +#endif /* _NEWLIB_STDIO_H */ + -diff -Nbaur newlib-2.5.0/newlib/libc/misc/init.c newlib-2.5.0-ppc/newlib/libc/misc/init.c ---- newlib-2.5.0/newlib/libc/misc/init.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/misc/init.c 2017-01-05 01:01:58.900000000 +0000 -@@ -40,4 +40,8 @@ +diff --git a/newlib/libc/misc/init.c b/newlib/libc/misc/init.c +index c85d602..1beb783 100644 +--- a/newlib/libc/misc/init.c ++++ b/newlib/libc/misc/init.c +@@ -40,4 +40,8 @@ __libc_init_array (void) for (i = 0; i < count; i++) __init_array_start[i] (); } @@ -7595,10 +7737,36 @@ diff -Nbaur newlib-2.5.0/newlib/libc/misc/init.c newlib-2.5.0-ppc/newlib/libc/mi +#error why am I not defined + #endif -diff -Nbaur newlib-2.5.0/newlib/libc/stdio/findfp.c newlib-2.5.0-ppc/newlib/libc/stdio/findfp.c ---- newlib-2.5.0/newlib/libc/stdio/findfp.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdio/findfp.c 2017-01-05 01:01:58.904000000 +0000 -@@ -252,7 +252,8 @@ +diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in +index 8ea5f0a..3200cf3 100644 +--- a/newlib/libc/stdio/Makefile.in ++++ b/newlib/libc/stdio/Makefile.in +@@ -504,6 +504,7 @@ GENERAL_SOURCES = \ + rename.c \ + rewind.c \ + rget.c \ ++ rmdir.c \ + scanf.c \ + sccl.c \ + setbuf.c \ +@@ -1163,6 +1164,12 @@ lib_a-rget.o: rget.c + lib_a-rget.obj: rget.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rget.obj `if test -f 'rget.c'; then $(CYGPATH_W) 'rget.c'; else $(CYGPATH_W) '$(srcdir)/rget.c'; fi` + ++lib_a-rmdir.o: rmdir.c ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rmdir.o `test -f 'rmdir.c' || echo '$(srcdir)/'`rmdir.c ++ ++lib_a-rmdir.obj: rmdir.c ++ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rmdir.obj `if test -f 'rmdir.c'; then $(CYGPATH_W) 'rmdir.c'; else $(CYGPATH_W) '$(srcdir)/rmdir.c'; fi` ++ + lib_a-scanf.o: scanf.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-scanf.o `test -f 'scanf.c' || echo '$(srcdir)/'`scanf.c + +diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c +index 975a855..99573e2 100644 +--- a/newlib/libc/stdio/findfp.c ++++ b/newlib/libc/stdio/findfp.c +@@ -252,7 +252,8 @@ _DEFUN(__sinit, (s), /* POSIX requires stderr to be opened for reading and writing, even when the underlying fd 2 is write-only. */ @@ -7608,10 +7776,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/stdio/findfp.c newlib-2.5.0-ppc/newlib/libc s->__sdidinit = 1; -diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fopen.c newlib-2.5.0-ppc/newlib/libc/stdio/fopen.c ---- newlib-2.5.0/newlib/libc/stdio/fopen.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdio/fopen.c 2017-01-05 01:01:58.904000000 +0000 -@@ -151,6 +151,9 @@ +diff --git a/newlib/libc/stdio/fopen.c b/newlib/libc/stdio/fopen.c +index 6d07561..3eae960 100644 +--- a/newlib/libc/stdio/fopen.c ++++ b/newlib/libc/stdio/fopen.c +@@ -151,6 +151,9 @@ _DEFUN(_fopen_r, (ptr, file, mode), _newlib_flockfile_start (fp); @@ -7621,10 +7790,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fopen.c newlib-2.5.0-ppc/newlib/libc/ fp->_file = f; fp->_flags = flags; fp->_cookie = (_PTR) fp; -diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fread.c newlib-2.5.0-ppc/newlib/libc/stdio/fread.c ---- newlib-2.5.0/newlib/libc/stdio/fread.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdio/fread.c 2017-01-05 01:01:58.904000000 +0000 -@@ -259,7 +259,31 @@ +diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c +index c683947..275becd 100644 +--- a/newlib/libc/stdio/fread.c ++++ b/newlib/libc/stdio/fread.c +@@ -259,7 +259,31 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp), /* fp->_r = 0 ... done in __srefill */ p += r; resid -= r; @@ -7657,10 +7827,11 @@ diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fread.c newlib-2.5.0-ppc/newlib/libc/ { /* no more input: return partial result */ #ifdef __SCLE -diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fseek.c newlib-2.5.0-ppc/newlib/libc/stdio/fseek.c ---- newlib-2.5.0/newlib/libc/stdio/fseek.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdio/fseek.c 2017-01-05 01:01:58.904000000 +0000 -@@ -108,7 +108,7 @@ +diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c +index b8fc36a..5c31316 100644 +--- a/newlib/libc/stdio/fseek.c ++++ b/newlib/libc/stdio/fseek.c +@@ -108,7 +108,7 @@ int _DEFUN(_fseek_r, (ptr, fp, offset, whence), struct _reent *ptr _AND register FILE *fp _AND @@ -7669,7 +7840,7 @@ diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fseek.c newlib-2.5.0-ppc/newlib/libc/ int whence) { return _fseeko_r (ptr, fp, offset, whence); -@@ -119,7 +119,7 @@ +@@ -119,7 +119,7 @@ _DEFUN(_fseek_r, (ptr, fp, offset, whence), int _DEFUN(fseek, (fp, offset, whence), register FILE *fp _AND @@ -7678,33 +7849,10 @@ diff -Nbaur newlib-2.5.0/newlib/libc/stdio/fseek.c newlib-2.5.0-ppc/newlib/libc/ int whence) { return _fseek_r (_REENT, fp, offset, whence); -diff -Nbaur newlib-2.5.0/newlib/libc/stdio/Makefile.in newlib-2.5.0-ppc/newlib/libc/stdio/Makefile.in ---- newlib-2.5.0/newlib/libc/stdio/Makefile.in 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdio/Makefile.in 2017-01-05 01:01:58.904000000 +0000 -@@ -504,6 +504,7 @@ - rename.c \ - rewind.c \ - rget.c \ -+ rmdir.c \ - scanf.c \ - sccl.c \ - setbuf.c \ -@@ -1163,6 +1164,12 @@ - lib_a-rget.obj: rget.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rget.obj `if test -f 'rget.c'; then $(CYGPATH_W) 'rget.c'; else $(CYGPATH_W) '$(srcdir)/rget.c'; fi` - -+lib_a-rmdir.o: rmdir.c -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rmdir.o `test -f 'rmdir.c' || echo '$(srcdir)/'`rmdir.c -+ -+lib_a-rmdir.obj: rmdir.c -+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rmdir.obj `if test -f 'rmdir.c'; then $(CYGPATH_W) 'rmdir.c'; else $(CYGPATH_W) '$(srcdir)/rmdir.c'; fi` -+ - lib_a-scanf.o: scanf.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-scanf.o `test -f 'scanf.c' || echo '$(srcdir)/'`scanf.c - -diff -Nbaur newlib-2.5.0/newlib/libc/stdlib/mbtowc_r.c newlib-2.5.0-ppc/newlib/libc/stdlib/mbtowc_r.c ---- newlib-2.5.0/newlib/libc/stdlib/mbtowc_r.c 2016-12-23 02:33:54.000000000 +0000 -+++ newlib-2.5.0-ppc/newlib/libc/stdlib/mbtowc_r.c 2017-01-05 01:20:13.332000000 +0000 +diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c +index 116b4d8..57941e3 100644 +--- a/newlib/libc/stdlib/mbtowc_r.c ++++ b/newlib/libc/stdlib/mbtowc_r.c @@ -7,6 +7,7 @@ #include #include "local.h"