📄 newlib-1.15.0.patch.svn-base
字号:
diff -burN newlib-1.15.0/config.sub newlib-psp/config.sub--- newlib-1.15.0/config.sub 2006-12-11 05:12:46.000000000 +0100+++ newlib-psp/config.sub 2007-03-10 18:02:39.000000000 +0100@@ -267,6 +267,7 @@ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \+ | mipsallegrex | mipsallegrexel \ | mn10200 | mn10300 \ | mt \ | msp430 \@@ -348,6 +349,7 @@ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \+ | mipsallegrex-* | mipsallegrexel-* \ | mmix-* \ | mt-* \ | msp430-* \@@ -690,6 +692,10 @@ basic_machine=m68k-atari os=-mint ;;+ psp)+ basic_machine=mipsallegrexel-psp+ os=-elf+ ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;;diff -burN newlib-1.15.0/configure newlib-psp/configure--- newlib-1.15.0/configure 2006-12-12 02:38:04.000000000 +0100+++ newlib-psp/configure 2007-03-10 18:02:39.000000000 +0100@@ -1561,6 +1561,9 @@ mips*-*-linux*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;;+ mipsallegrex*-*-*)+ noconfigdirs="$noconfigdirs target-libgloss"+ ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" ;;diff -burN newlib-1.15.0/configure.in newlib-psp/configure.in--- newlib-1.15.0/configure.in 2006-12-12 02:38:04.000000000 +0100+++ newlib-psp/configure.in 2007-03-10 18:02:39.000000000 +0100@@ -737,6 +737,9 @@ mips*-*-linux*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;;+ mipsallegrex*-*-*)+ noconfigdirs="$noconfigdirs target-libgloss"+ ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" ;;diff -burN newlib-1.15.0/newlib/Makefile.am newlib-psp/newlib/Makefile.am--- newlib-1.15.0/newlib/Makefile.am 2006-06-05 19:42:57.000000000 +0200+++ newlib-psp/newlib/Makefile.am 2007-03-10 18:02:39.000000000 +0100@@ -267,6 +267,18 @@ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \ else true; fi ; \ done; \+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \+ for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \+ if [ -f $$i ]; then \+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \+ else true; fi ; \+ done ; \+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \+ for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \+ if [ -f $$i ]; then \+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \+ else true; fi ; \+ done ; \ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \ for i in $(srcdir)/libc/include/sys/*.h; do \ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \diff -burN newlib-1.15.0/newlib/Makefile.in newlib-psp/newlib/Makefile.in--- newlib-1.15.0/newlib/Makefile.in 2006-12-18 21:32:41.000000000 +0100+++ newlib-psp/newlib/Makefile.in 2007-03-10 18:02:39.000000000 +0100@@ -912,6 +912,18 @@ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \ else true; fi ; \ done; \+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \+ for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \+ if [ -f $$i ]; then \+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \+ else true; fi ; \+ done ; \+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \+ for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \+ if [ -f $$i ]; then \+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \+ else true; fi ; \+ done ; \ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \ for i in $(srcdir)/libc/include/sys/*.h; do \ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \diff -burN newlib-1.15.0/newlib/configure.host newlib-psp/newlib/configure.host--- newlib-1.15.0/newlib/configure.host 2006-12-18 22:49:14.000000000 +0100+++ newlib-psp/newlib/configure.host 2007-03-10 18:02:39.000000000 +0100@@ -510,7 +510,7 @@ # NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that. *-*-rtems*) default_newlib_io_long_long="yes"- newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"+ newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL -DHAVE_RENAME -DHAVE_NANOSLEEP" ;; # VxWorks supplies its own version of malloc, and the newlib one # doesn't work because VxWorks does not have sbrk.@@ -632,7 +632,14 @@ ;; mips*-*-elf*) default_newlib_io_long_long="yes"- newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"+ case "${host}" in+ mipsallegrex*-psp-*)+ sys_dir=psp+ syscall_dir=syscalls+ newlib_cflags="${newlib_cflags} -G0 -mno-explicit-relocs -DCOMPACT_CTYPE -DCLOCK_PROVIDED -DHAVE_FCNTL -DMALLOC_ALIGNMENT=16 -I${prefix}/psp/sdk/include" ;;+ *)+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" ;;+ esac ;; mmix-*) syscall_dir=syscallsdiff -burN newlib-1.15.0/newlib/libc/include/machine/time.h newlib-psp/newlib/libc/include/machine/time.h--- newlib-1.15.0/newlib/libc/include/machine/time.h 2000-12-04 20:06:37.000000000 +0100+++ newlib-psp/newlib/libc/include/machine/time.h 2007-03-10 18:02:39.000000000 +0100@@ -9,6 +9,10 @@ #endif #endif /* !__rtems__ */ +#if defined(__psp__)+#define _CLOCKS_PER_SEC_ 1000000+#endif+ #endif /* _MACHTIME_H_ */ diff -burN newlib-1.15.0/newlib/libc/include/sys/config.h newlib-psp/newlib/libc/include/sys/config.h--- newlib-1.15.0/newlib/libc/include/sys/config.h 2006-08-29 23:00:59.000000000 +0200+++ newlib-psp/newlib/libc/include/sys/config.h 2007-03-10 18:02:39.000000000 +0100@@ -98,6 +98,12 @@ #define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata"))) #endif +/* We compile newlib with -G0 for PSP, but if we're compiling an app with $gp enabled,+ then _impure_ptr is expected to live in .sdata. */+#if defined(__psp__)+#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))+#endif+ #ifdef __xstormy16__ #define __SMALL_BITFIELDS #undef INT_MAXdiff -burN newlib-1.15.0/newlib/libc/include/sys/types.h newlib-psp/newlib/libc/include/sys/types.h--- newlib-1.15.0/newlib/libc/include/sys/types.h 2006-09-14 00:09:27.000000000 +0200+++ newlib-psp/newlib/libc/include/sys/types.h 2007-03-10 18:02:39.000000000 +0100@@ -199,52 +199,6 @@ typedef unsigned short nlink_t; -/* We don't define fd_set and friends if we are compiling POSIX- source, or if we have included (or may include as indicated- by __USE_W32_SOCKETS) the W32api winsock[2].h header which- defines Windows versions of them. Note that a program which- includes the W32api winsock[2].h header must know what it is doing;- it must not call the cygwin32 select function.-*/-# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) -# define _SYS_TYPES_FD_SET-# define NBBY 8 /* number of bits in a byte */-/*- * Select uses bit masks of file descriptors in longs.- * These macros manipulate such bit fields (the filesystem macros use chars).- * FD_SETSIZE may be defined by the user, but the default here- * should be >= NOFILE (param.h).- */-# ifndef FD_SETSIZE-# define FD_SETSIZE 64-# endif--typedef long fd_mask;-# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */-# ifndef howmany-# define howmany(x,y) (((x)+((y)-1))/(y))-# endif--/* We use a macro for fd_set so that including Sockets.h afterwards- can work. */-typedef struct _types_fd_set {- fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];-} _types_fd_set;--#define fd_set _types_fd_set--# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))-# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))-# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))-# define FD_ZERO(p) (__extension__ (void)({ \- size_t __i; \- char *__tmp = (char *)p; \- for (__i = 0; __i < sizeof (*(p)); ++__i) \- *__tmp++ = 0; \-}))--# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) */- #undef __MS_types__ #undef _ST_INT32 diff -burN newlib-1.15.0/newlib/libc/include/time.h newlib-psp/newlib/libc/include/time.h--- newlib-1.15.0/newlib/libc/include/time.h 2005-11-18 16:57:24.000000000 +0100+++ newlib-psp/newlib/libc/include/time.h 2007-03-10 18:02:39.000000000 +0100@@ -174,6 +174,16 @@ } #endif #endif /* _POSIX_TIMERS */+#if defined(__psp__)+#ifdef __cplusplus+extern "C" {+#endif+int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp));+#ifdef __cplusplus+}+#endif+#endif /* __psp__ */+ #ifdef __cplusplus extern "C" {diff -burN newlib-1.15.0/newlib/libc/sys/configure newlib-psp/newlib/libc/sys/configure--- newlib-1.15.0/newlib/libc/sys/configure 2006-12-18 23:21:54.000000000 +0100+++ newlib-psp/newlib/libc/sys/configure 2007-03-10 18:02:39.000000000 +0100@@ -284,6 +284,7 @@ ac_subdirs_all="$ac_subdirs_all mmixware" ac_subdirs_all="$ac_subdirs_all netware" ac_subdirs_all="$ac_subdirs_all rdos"+ac_subdirs_all="$ac_subdirs_all psp" ac_subdirs_all="$ac_subdirs_all rtems" ac_subdirs_all="$ac_subdirs_all sh" ac_subdirs_all="$ac_subdirs_all sparc64"@@ -4925,6 +4926,10 @@ subdirs="$subdirs netware" ;;+ psp)++subdirs="$subdirs psp"+ ;; rdos) subdirs="$subdirs rdos"diff -burN newlib-1.15.0/newlib/libc/sys/configure.in newlib-psp/newlib/libc/sys/configure.in--- newlib-1.15.0/newlib/libc/sys/configure.in 2006-04-13 21:56:27.000000000 +0200+++ newlib-psp/newlib/libc/sys/configure.in 2007-03-10 18:02:39.000000000 +0100@@ -32,6 +32,7 @@ mmixware) AC_CONFIG_SUBDIRS(mmixware) ;; netware) AC_CONFIG_SUBDIRS(netware) ;; rdos) AC_CONFIG_SUBDIRS(rdos) ;;+ psp) AC_CONFIG_SUBDIRS(psp) ;; rtems) AC_CONFIG_SUBDIRS(rtems) ;; sh) AC_CONFIG_SUBDIRS(sh) ;; sparc64) AC_CONFIG_SUBDIRS(sparc64) ;;diff -burN newlib-1.15.0/newlib/libc/sys/psp/Makefile.am newlib-psp/newlib/libc/sys/psp/Makefile.am--- newlib-1.15.0/newlib/libc/sys/psp/Makefile.am 1970-01-01 01:00:00.000000000 +0100+++ newlib-psp/newlib/libc/sys/psp/Makefile.am 2007-03-10 18:02:39.000000000 +0100@@ -0,0 +1,72 @@+## Process this file with automake to generate Makefile.in++AUTOMAKE_OPTIONS = cygnus++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)++AM_CCASFLAGS = $(INCLUDES) $(CFLAGS)++noinst_LIBRARIES = lib.a++LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o \+ _gettimeofday.o _kill.o _lseek.o _open.o _read.o \+ _sbrk.o _wait.o _write.o clock.o isatty.o time.o \+ _link.o _unlink.o sleep.o opendir.o readdir.o \+ closedir.o getcwd.o chdir.o mkdir.o rmdir.o \+ realpath.o _stat.o truncate.o access.o tzset.o \+ __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o++SOCKET_MULT_OBJS = socket.o accept.o bind.o connect.o getsockopt.o \+ listen.o recv.o recvfrom.o send.o sendto.o \+ setsockopt.o shutdown.o getsockname.o getpeername.o \+ inet_ntoa.o++PE_OBJS = pipe.o++FDMAN_OBJS = fdman.o++SELECT_OBJS = select.o++INTERRUPT_OBJS = interrupt.o++XPRINTF_MULT_OBJS = vxprintf.o _xprintf.o __sout.o vsnprintf.o snprintf.o \ + vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o asprintf.o \+ vasprintf.o __fout.o fprintf.o vfprintf.o printf.o vprintf.o \+ _sprintf_r.o++NETDB_MULT_OBJS = h_errno.o gethostbyaddr.o gethostbyname.o+++lib_a_SOURCES = libcglue.c socket.c pspcwd.c xprintf.c netdb.c pipe.c fdman.c select.c interrupt.S+lib_a_LIBADD = $(LIBCGLUE_MULT_OBJS) $(SOCKET_MULT_OBJS) $(XPRINTF_MULT_OBJS) \+ $(NETDB_MULT_OBJS) $(PIPE_OBJS) $(FDMAN_OBJS) $(SELECT_OBJS) $(INTERRUPT_OBJS)++all: crt0.o++$(LIBCGLUE_MULT_OBJS): libcglue.c+ $(COMPILE) -DF_$* $< -c -o $@++$(SOCKET_MULT_OBJS): socket.c+ $(COMPILE) -DF_$* $< -c -o $@++$(XPRINTF_MULT_OBJS): xprintf.c+ $(COMPILE) -DF_$* $< -c -o $@++$(NETDB_MULT_OBJS): netdb.c+ $(COMPILE) -DF_$* $< -c -o $@++$(PIPE_OBJS): pipe.c+ $(COMPILE) -DF_$* $< -c -o $@++$(FDMAN_OBJS): fdman.c+ $(COMPILE) -DF_$* $< -c -o $@++$(SELECT_OBJS): select.c+ $(COMPILE) -DF_$* $< -c -o $@++$(INTERRUPT_OBJS): interrupt.S+ $(COMPILE) -DF_$* $< -c -o $@+++ACLOCAL_AMFLAGS = -I ../../..+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.hostdiff -burN newlib-1.15.0/newlib/libc/sys/psp/Makefile.in newlib-psp/newlib/libc/sys/psp/Makefile.in--- newlib-1.15.0/newlib/libc/sys/psp/Makefile.in 1970-01-01 01:00:00.000000000 +0100+++ newlib-psp/newlib/libc/sys/psp/Makefile.in 2007-03-10 18:02:39.000000000 +0100@@ -0,0 +1,468 @@+# Makefile.in generated by automake 1.9.6 from Makefile.am.+# @configure_input@++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,+# 2003, 2004, 2005 Free Software Foundation, Inc.+# This Makefile.in is free software; the Free Software Foundation+# gives unlimited permission to copy and/or distribute it,+# with or without modifications, as long as this notice is preserved.++# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A+# PARTICULAR PURPOSE.++@SET_MAKE@++srcdir = @srcdir@+top_srcdir = @top_srcdir@+VPATH = @srcdir@+pkgdatadir = $(datadir)/@PACKAGE@+pkglibdir = $(libdir)/@PACKAGE@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -