summaryrefslogtreecommitdiff
path: root/packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
diff options
context:
space:
mode:
authorThomas Kunze <thommycheck@gmx.de>2008-03-27 18:40:57 +0000
committerThomas Kunze <thommycheck@gmx.de>2008-03-27 18:40:57 +0000
commit8810fa39e0f43199cd3b2f494e6798577ee9fb03 (patch)
tree1dfb8498d14841d385a967539ec1bf8167ba4768 /packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
parent7b09a8c67663f4d920946b4323fe04da121a8e57 (diff)
parent6775017f8db3583d4166f48f937bc339b97d0b35 (diff)
merge of '5042c98815b59089f6a52790f0dba3c831b5590d'
and 'd1dfc5df9769c50ec5328454ab737f091f6c573f'
Diffstat (limited to 'packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch')
-rw-r--r--packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..4461bedd4e
--- /dev/null
+++ b/packages/binutils/binutils-2.16.1/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,31 @@
+# strip (and objcopy) fail to set the error code if there is no
+# output file name and the rename of the stripped (or copied) file
+# fails, yet the command fails to do anything. This fixes both
+# objcopy and strip.
+#
+# modification by bero: Ported to 2.16.91.0.6
+#
+#Signed-off-by: John Bowler <jbowler@acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
+--- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100
++++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100
+@@ -2593,7 +2593,8 @@
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (output_file == NULL)
+- smart_rename (tmpname, argv[i], preserve_dates);
++ if(smart_rename (tmpname, argv[i], preserve_dates))
++ hold_status = 1;
+ status = hold_status;
+ }
+ else
+@@ -3184,7 +3185,8 @@
+ {
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+- smart_rename (tmpname, input_filename, preserve_dates);
++ if (smart_rename (tmpname, input_filename, preserve_dates))
++ status = 1;
+ }
+ else
+ unlink (tmpname);