diff options
Diffstat (limited to 'meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch')
| -rw-r--r-- | meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch new file mode 100644 index 0000000000..4461bedd4e --- /dev/null +++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # strip (and objcopy) fail to set the error code if there is no | ||
| 2 | # output file name and the rename of the stripped (or copied) file | ||
| 3 | # fails, yet the command fails to do anything. This fixes both | ||
| 4 | # objcopy and strip. | ||
| 5 | # | ||
| 6 | # modification by bero: Ported to 2.16.91.0.6 | ||
| 7 | # | ||
| 8 | #Signed-off-by: John Bowler <jbowler@acm.org> | ||
| 9 | #Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org> | ||
| 10 | --- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100 | ||
| 11 | +++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100 | ||
| 12 | @@ -2593,7 +2593,8 @@ | ||
| 13 | if (preserve_dates) | ||
| 14 | set_times (tmpname, &statbuf); | ||
| 15 | if (output_file == NULL) | ||
| 16 | - smart_rename (tmpname, argv[i], preserve_dates); | ||
| 17 | + if(smart_rename (tmpname, argv[i], preserve_dates)) | ||
| 18 | + hold_status = 1; | ||
| 19 | status = hold_status; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | @@ -3184,7 +3185,8 @@ | ||
| 23 | { | ||
| 24 | if (preserve_dates) | ||
| 25 | set_times (tmpname, &statbuf); | ||
| 26 | - smart_rename (tmpname, input_filename, preserve_dates); | ||
| 27 | + if (smart_rename (tmpname, input_filename, preserve_dates)) | ||
| 28 | + status = 1; | ||
| 29 | } | ||
| 30 | else | ||
| 31 | unlink (tmpname); | ||
