mirror of
https://frontier.innolan.net/github/amigaos-cross-toolchain6.git
synced 2024-10-19 10:29:55 +00:00
Fixed crashing m68k-amigaos-ar.
This commit is contained in:
@ -265,11 +265,6 @@ function build_ixemul {
|
||||
}
|
||||
|
||||
function build {
|
||||
# Strangely enough - this trick is needed in order to make m68k-amigaos-ar
|
||||
# not to crash during libgcc compilation. It's difficult to say what exactly
|
||||
# is affected by this change. Nevertheless, build succeeds under gcc 4.4.3.
|
||||
export CC="gcc"
|
||||
|
||||
prepare_target
|
||||
unpack_sources
|
||||
build_tools
|
||||
|
||||
38
patches/binutils-2.9.1/bfd/archive.c.diff
Normal file
38
patches/binutils-2.9.1/bfd/archive.c.diff
Normal file
@ -0,0 +1,38 @@
|
||||
--- binutils-2.9.1/bfd/archive.c 2012-02-17 23:00:06.554906216 -0800
|
||||
+++ binutils-2.9.1/bfd/archive.c 2012-02-17 23:00:15.694832573 -0800
|
||||
@@ -1374,7 +1374,7 @@
|
||||
sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
|
||||
sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
|
||||
sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
|
||||
- sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size);
|
||||
+ sprintf ((hdr->ar_size), "%-9ld", (long) status.st_size);
|
||||
/* Correct for a lossage in sprintf whereby it null-terminates. I cannot
|
||||
understand how these C losers could design such a ramshackle bunch of
|
||||
IO operations */
|
||||
@@ -1634,7 +1634,7 @@
|
||||
memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
|
||||
strcpy (hdr.ar_name, ename);
|
||||
/* Round size up to even number in archive header. */
|
||||
- sprintf (&(hdr.ar_size[0]), "%-10d",
|
||||
+ sprintf (&(hdr.ar_size[0]), "%-9d",
|
||||
(int) ((elength + 1) & ~1));
|
||||
strncpy (hdr.ar_fmag, ARFMAG, 2);
|
||||
for (i = 0; i < sizeof (struct ar_hdr); i++)
|
||||
@@ -1894,7 +1894,7 @@
|
||||
sprintf (hdr.ar_uid, "%ld", (long) 666);
|
||||
sprintf (hdr.ar_gid, "%ld", (long) 42);
|
||||
#endif
|
||||
- sprintf (hdr.ar_size, "%-10d", (int) mapsize);
|
||||
+ sprintf (hdr.ar_size, "%-9d", (int) mapsize);
|
||||
strncpy (hdr.ar_fmag, ARFMAG, 2);
|
||||
for (i = 0; i < sizeof (struct ar_hdr); i++)
|
||||
if (((char *) (&hdr))[i] == '\0')
|
||||
@@ -2046,7 +2046,7 @@
|
||||
|
||||
memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
|
||||
hdr.ar_name[0] = '/';
|
||||
- sprintf (hdr.ar_size, "%-10d", (int) mapsize);
|
||||
+ sprintf (hdr.ar_size, "%-9d", (int) mapsize);
|
||||
sprintf (hdr.ar_date, "%ld", (long) time (NULL));
|
||||
/* This, at least, is what Intel coff sets the values to.: */
|
||||
sprintf ((hdr.ar_uid), "%d", 0);
|
||||
Reference in New Issue
Block a user