]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
binutils: Add patches to fix some testsuite issues.
authorSchantl Stefan <Stevee@ipfire.org>
Sun, 21 Mar 2010 17:07:13 +0000 (18:07 +0100)
committerSchantl Stefan <Stevee@ipfire.org>
Sun, 21 Mar 2010 17:07:13 +0000 (18:07 +0100)
pkgs/core/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch [new file with mode: 0644]
pkgs/core/binutils/patches/binutils-2.20-objcopy.patch [new file with mode: 0644]

diff --git a/pkgs/core/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch b/pkgs/core/binutils/patches/binutils-2.20-ipfire-ld-elf-1.patch
new file mode 100644 (file)
index 0000000..88e539d
--- /dev/null
@@ -0,0 +1,15 @@
+diff -Nur a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
+--- a/ld/testsuite/ld-elf/elf.exp      2010-03-17 10:59:03.000000000 +0100
++++ b/ld/testsuite/ld-elf/elf.exp      2010-03-17 11:00:31.000000000 +0100
+@@ -70,11 +70,8 @@
+ set array_tests {
+     {"preinit array" "" "" {preinit.c} "preinit" "preinit.out"}
+-    {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"}
+     {"init array" "" "" {init.c} "init" "init.out"}
+-    {"static init array" "-static" "" {init.c} "init" "init.out"}
+     {"fini array" "" "" {fini.c} "fini" "fini.out"}
+-    {"static fini array" "-static" "" {fini.c} "fini" "fini.out"}
+ }
+ # NetBSD ELF systems do not currently support the .*_array sections.
diff --git a/pkgs/core/binutils/patches/binutils-2.20-objcopy.patch b/pkgs/core/binutils/patches/binutils-2.20-objcopy.patch
new file mode 100644 (file)
index 0000000..62c90c7
--- /dev/null
@@ -0,0 +1,24 @@
+diff --git a/binutils/objcopy.c b/binutils/objcopy.c
+index 9732b86..dec0feb 100644
+--- a/binutils/objcopy.c
++++ b/binutils/objcopy.c
+@@ -2287,6 +2287,18 @@ copy_file (const char *input_filename, const char *output_filename,
+       status = 1;
+     }
++
++  if (status == 0)
++    {
++      struct stat statbuf;
++
++      /* No need to check the return value of stat().  It has already
++       been checked in get_file_size().  */
++      stat (input_filename, &statbuf);
++
++      /* Try to preserve the permission bits.  */
++      chmod (output_filename, statbuf.st_mode);
++    }
+ }
+ /* Add a name to the section renaming list.  */
+