📄 newlib-1.14.0.patch.svn-base
字号:
--- newlib-1.13.0/config.sub 2004-11-15 20:18:39.000000000 -0500+++ newlib-psp/config.sub 2005-07-24 01:06:05.000000000 -0400@@ -253,6 +253,7 @@ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \+ | mipsallegrex | mipsallegrexel \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \@@ -326,6 +327,7 @@ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \+ | mipsallegrex-* | mipsallegrexel-* \ | mmix-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \@@ -665,6 +667,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/'` ;;--- newlib-1.13.0/configure 2004-12-16 14:51:28.000000000 -0500+++ newlib-psp/configure 2005-07-24 01:06:05.000000000 -0400@@ -1507,6 +1507,9 @@ mips*-*-linux*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;;+ mipsallegrex*-*-*)+ noconfigdirs="$noconfigdirs target-libgloss"+ ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" ;;--- newlib-1.13.0/configure.in 2004-12-16 14:51:28.000000000 -0500+++ newlib-psp/configure.in 2005-07-24 01:06:05.000000000 -0400@@ -716,6 +716,9 @@ mips*-*-linux*) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;;+ mipsallegrex*-*-*)+ noconfigdirs="$noconfigdirs target-libgloss"+ ;; mips*-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" ;;--- newlib-1.13.0/newlib/Makefile.am 2004-12-03 18:46:28.000000000 -0500+++ newlib-psp/newlib/Makefile.am 2005-12-12 19:16:32.000000000 -0500@@ -251,6 +251,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`; \--- newlib-1.13.0/newlib/Makefile.in 2004-12-03 18:46:28.000000000 -0500+++ newlib-psp/newlib/Makefile.in 2005-12-12 19:16:32.000000000 -0500@@ -214,7 +214,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar+TAR = tar GZIP_ENV = --best DIST_SUBDIRS = libc libm doc . @EXTRA_DIRS@ EXPECT = `if test -f $(top_builddir)/../expect/expect; then echo $(top_builddir)/../expect/expect; else echo expect; fi`@@ -472,7 +472,7 @@ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)newlib.hin$$unique$(LISP)$$tags" \- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags newlib.hin $$unique $(LISP) -o $$here/TAGS)+ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags newlib.hin $$unique $(LISP)) mostlyclean-tags: @@ -756,6 +756,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`; \--- newlib-1.13.0/newlib/configure.host 2004-10-05 15:44:24.000000000 -0400+++ newlib-psp/newlib/configure.host 2006-04-28 09:34:11.000000000 -0400@@ -570,7 +570,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=syscalls--- newlib-1.13.0/newlib/libc/include/machine/time.h 2000-12-04 14:06:37.000000000 -0500+++ newlib-psp/newlib/libc/include/machine/time.h 2005-10-28 12:26:33.000000000 -0400@@ -9,6 +9,10 @@ #endif #endif /* !__rtems__ */ +#if defined(__psp__)+#define _CLOCKS_PER_SEC_ 1000000+#endif+ #endif /* _MACHTIME_H_ */ --- newlib-1.13.0/newlib/libc/include/sys/config.h 2004-06-22 17:54:51.000000000 -0400+++ newlib-psp/newlib/libc/include/sys/config.h 2005-09-07 13:04:52.000000000 -0400@@ -94,6 +94,12 @@ #endif #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_MAX--- newlib-1.13.0/newlib/libc/include/sys/types.h 2003-07-02 16:32:07.000000000 -0400+++ newlib-psp/newlib/libc/include/sys/types.h 2005-12-12 19:16:32.000000000 -0500@@ -188,52 +188,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 --- newlib-1.13.0/newlib/libc/sys/psp/Makefile.am 1969-12-31 19:00:00.000000000 -0500+++ newlib-psp/newlib/libc/sys/psp/Makefile.am 2006-04-28 15:21:57.000000000 -0400@@ -0,0 +1,65 @@+## Process this file with automake to generate Makefile.in++AUTOMAKE_OPTIONS = cygnus++INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_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++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+ +PIPE_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.host--- newlib-1.13.0/newlib/libc/sys/psp/Makefile.in 1969-12-31 19:00:00.000000000 -0500+++ newlib-psp/newlib/libc/sys/psp/Makefile.in 2006-04-28 15:22:03.000000000 -0400@@ -0,0 +1,389 @@+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am++# Copyright (C) 1994, 1995-8, 1999, 2001 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.+++SHELL = @SHELL@++srcdir = @srcdir@+top_srcdir = @top_srcdir@+VPATH = @srcdir@+prefix = @prefix@+exec_prefix = @exec_prefix@++bindir = @bindir@+sbindir = @sbindir@+libexecdir = @libexecdir@+datadir = @datadir@+sysconfdir = @sysconfdir@+sharedstatedir = @sharedstatedir@+localstatedir = @localstatedir@+libdir = @libdir@+infodir = @infodir@+mandir = @mandir@+includedir = @includedir@+oldincludedir = /usr/include++DESTDIR =++pkgdatadir = $(datadir)/@PACKAGE@+pkglibdir = $(libdir)/@PACKAGE@+pkgincludedir = $(includedir)/@PACKAGE@++top_builddir = .++ACLOCAL = @ACLOCAL@+AUTOCONF = @AUTOCONF@+AUTOMAKE = @AUTOMAKE@+AUTOHEADER = @AUTOHEADER@++INSTALL = @INSTALL@+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)+INSTALL_DATA = @INSTALL_DATA@+INSTALL_SCRIPT = @INSTALL_SCRIPT@+transform = @program_transform_name@++NORMAL_INSTALL = :+PRE_INSTALL = :+POST_INSTALL = :+NORMAL_UNINSTALL = :+PRE_UNINSTALL = :+POST_UNINSTALL = :+build_alias = @build_alias@+build_triplet = @build@+host_alias = @host_alias@+host_triplet = @host@+target_alias = @target_alias@+target_triplet = @target@+AR = @AR@+AS = @AS@+CC = @CC@+CPP = @CPP@+EXEEXT = @EXEEXT@+HAVE_LIB = @HAVE_LIB@+LDFLAGS = @LDFLAGS@+LIB = @LIB@+LTLIB = @LTLIB@+MAINT = @MAINT@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -