X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=upstream%2Fdarwin-linker%2Fpatches%2Fcctools.patch;h=59236eec822cf88499c26a34201497180a7f629d;hp=22af03f8f87661faab56f99bc2b6517be2648db0;hb=9fe5ab0b773fee33a8af3406b3e7b3fcd2303d76;hpb=620efcc6a0bcf699340c69e6f107bcb0b3259304 diff --git a/upstream/darwin-linker/patches/cctools.patch b/upstream/darwin-linker/patches/cctools.patch index 22af03f..59236ee 100644 --- a/upstream/darwin-linker/patches/cctools.patch +++ b/upstream/darwin-linker/patches/cctools.patch @@ -1,15 +1,3 @@ -diff -rub ./include/architecture/i386/fpu.h ./include/architecture/i386/fpu.h ---- ./include/architecture/i386/fpu.h Thu May 6 19:24:30 1999 -+++ ./include/architecture/i386/fpu.h Mon Aug 25 12:56:22 2003 -@@ -121,7 +121,7 @@ - :3; - } fp_control_t; - --#import -+#include - - /* - * Floating point 'environment' diff -rub ./include/architecture/i386/frame.h ./include/architecture/i386/frame.h --- ./include/architecture/i386/frame.h Thu May 6 19:24:33 1999 +++ ./include/architecture/i386/frame.h Mon Aug 25 12:56:22 2003 @@ -2125,50 +2113,6 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym ifeq "NO" "$(USE_DEPENDENCY_FILE)" .c.o: ---- ar/archive.c 30 Apr 2002 07:37:17 -0000 1.1.1.1 -+++ ar/archive.c 7 Sep 2003 10:15:36 -0000 -@@ -69,6 +69,7 @@ - - #include - #include -+#include - - #include - #include -@@ -261,32 +262,17 @@ - * a space, use extended format 1. - */ - lname = strlen(name); -- if (options & AR_TR) { - if (lname > OLDARMAXNAME) { - (void)fflush(stdout); - warnx("warning: %s truncated to %.*s", - name, OLDARMAXNAME, name); - (void)fflush(stderr); - } -- (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec, -+ (void)sprintf(hb, HDR3, name, (long int)0, - (unsigned int)(u_short)sb->st_uid, - (unsigned int)(u_short)sb->st_gid, - sb->st_mode, sb->st_size, ARFMAG); - lname = 0; -- } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) -- (void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3, -- (long int)sb->st_mtimespec.tv_sec, -- (unsigned int)(u_short)sb->st_uid, -- (unsigned int)(u_short)sb->st_gid, -- sb->st_mode, sb->st_size + ((lname + 3) & ~3), -- ARFMAG); -- else { -- lname = 0; -- (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec, -- (unsigned int)(u_short)sb->st_uid, -- (unsigned int)(u_short)sb->st_gid, -- sb->st_mode, sb->st_size, ARFMAG); -- } - size = sb->st_size; - } else { - lname = chdr.lname; --- ld/fake-mach.c Sun Sep 7 14:13:57 2003 +++ ld/fake-mach.c Sun Sep 7 14:13:50 2003 @@ -0,0 +1,163 @@ @@ -2242,7 +2186,7 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym +/** Returns a string appropriate to the error argument given. */ +char* mach_error_string( int error_value ) +{ -+ char errorString[] = "Some fake mach error string."; ++ char *errorString = "Some fake mach error string."; + + return errorString; +} @@ -2335,3 +2279,91 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym + //~ assert( 0 ); + return KERN_SUCCESS; +} +--- ar/archive.c 30 Apr 2002 07:37:17 -0000 1.1.1.1 ++++ ar/archive.c 8 Sep 2003 01:51:24 -0000 +@@ -69,6 +69,7 @@ + + #include + #include ++#include + + #include + #include +@@ -86,7 +87,7 @@ + #include "extern.h" + + typedef struct ar_hdr HDR; +-static char hb[sizeof(HDR) + 1]; /* real header */ ++static char hb[61]; /* real header */ + + int + open_archive(mode) +@@ -262,30 +263,40 @@ + */ + lname = strlen(name); + if (options & AR_TR) { ++ char buf[16]; ++ int i; ++ for(i=0; i<15; i++) buf[i] = ' '; ++ buf[15] = '\0'; + if (lname > OLDARMAXNAME) { + (void)fflush(stdout); + warnx("warning: %s truncated to %.*s", + name, OLDARMAXNAME, name); + (void)fflush(stderr); + } +- (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec, ++ strncpy(buf, name, 15); ++ (void)sprintf(hb, HDR3, buf, (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, +- sb->st_mode, sb->st_size, ARFMAG); ++ sb->st_mode, (long long)sb->st_size, ARFMAG); + lname = 0; +- } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) ++ } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) { + (void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3, +- (long int)sb->st_mtimespec.tv_sec, ++ (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, +- sb->st_mode, sb->st_size + ((lname + 3) & ~3), ++ sb->st_mode, (long long)(sb->st_size + ((lname + 3) & ~3)), + ARFMAG); +- else { ++} else { ++ char buf[17]; ++ int i; ++ for(i=0; i<16; i++) buf[i] = ' '; ++ buf[16] = '\0'; ++ strncpy(buf, name, 16); + lname = 0; +- (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec, ++ (void)sprintf(hb, HDR2, buf, (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, +- sb->st_mode, sb->st_size, ARFMAG); ++ sb->st_mode, (long long)sb->st_size, ARFMAG); + } + size = sb->st_size; + } else { +--- misc/libtool.c Wed Apr 23 15:44:51 2003 ++++ misc/libtool.c Sun Sep 7 18:58:16 2003 +@@ -2177,14 +2177,15 @@ + + strcpy(message_buf, message); + strcat(message_buf, arch_name); +- ++ /* + make_alert(ProjectBuilder_port, + -1, +- NULL, 0, /* functionName, not used by ProjectBuilder */ ++ NULL, 0, + fileName, strlen(fileName)+1 > 1024 ? 1024 : strlen(fileName)+1, + NULL, 0, + 0, + message_buf, strlen(message_buf) + 1); ++*/ + } + + /*