2003/09/07 11:15:59
[org.ibex.core.git] / upstream / darwin-linker / patches / cctools.patch
index ef589b5..0a3e651 100644 (file)
@@ -2095,62 +2095,6 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym
 +              return msg_result;
 +    }
 +}
---- ar/Makefile        7 Sep 2002 01:27:09 -0000       1.1.1.2
-+++ ar/Makefile        7 Sep 2003 08:55:11 -0000
-@@ -2,12 +2,16 @@
- ifeq "mwccppc" "$(notdir $(CC))"
-   CFLAGS = -g $(OFLAG) -I$(SRCROOT)/../include
- else
--  CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
-+  ifeq "Linux" "$(shell uname)"
-+    CFLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__  -D__ppc__ -I/usr/include -I../../macosx-include -I../include
-+  else
-+    CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
-+  endif
- endif
- LIBSTUFF = -L$(SYMROOT)/../libstuff -lstuff
--USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
-+USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
-            echo YES ; else echo NO ; \
-            fi; )
---- ar/archive.c       30 Apr 2002 07:37:17 -0000      1.1.1.1
-+++ ar/archive.c       7 Sep 2003 08:55:11 -0000
-@@ -69,6 +69,7 @@
- #include <sys/param.h>
- #include <sys/stat.h>
-+#include <stuff/ofile.h>
- #include <ar.h>
- #include <dirent.h>
-@@ -268,21 +269,21 @@
-                                   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)sb->st_mtime,
-                           (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,
-+                          (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),
-                           ARFMAG);
-               else {
-                       lname = 0;
--                      (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec,
-+                      (void)sprintf(hb, HDR2, name, (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);
 --- ar/contents.c      30 Apr 2002 07:37:17 -0000      1.1.1.1
 +++ ar/contents.c      7 Sep 2003 08:55:11 -0000
 @@ -76,7 +76,6 @@
@@ -2314,3 +2258,78 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym
 +if [ -z "${USER}" ]; then USER=$(whoami); fi;
 +
 +echo "$(eval echo "${Format}")";
+--- ar/Makefile        7 Sep 2002 01:27:09 -0000       1.1.1.2
++++ ar/Makefile        7 Sep 2003 09:03:52 -0000
+@@ -2,12 +2,16 @@
+ ifeq "mwccppc" "$(notdir $(CC))"
+   CFLAGS = -g $(OFLAG) -I$(SRCROOT)/../include
+ else
+-  CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
++  ifeq "Linux" "$(shell uname)"
++    CFLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__  -D__ppc__ -I/usr/include -I../../macosx-include -I../include
++  else
++    CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
++  endif
+ endif
+ LIBSTUFF = -L$(SYMROOT)/../libstuff -lstuff
+-USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
++USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
+            echo YES ; else echo NO ; \
+            fi; )
+@@ -43,7 +47,8 @@
+       $(CC) $(CFLAGS) $(RC_CFLAGS) -o $(SYMROOT)/$@ $(OBJS) $(LIBSTUFF)
+ vers.c:
+-      vers_string -c $(VERS_STRING_FLAGS) $(PRODUCT) > $(OFILE_DIR)/$@
++      chmod +x vers_string
++      ./vers_string -c $(VERS_STRING_FLAGS) $(PRODUCT) > $(OFILE_DIR)/$@
+ 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 <sys/param.h>
+ #include <sys/stat.h>
++#include <stuff/ofile.h>
+ #include <ar.h>
+ #include <dirent.h>
+@@ -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;