libecj-bootstrap.inc: convert to new staging system
[openembedded.git] / recipes / binutils / binutils-2.19.1 / binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
blob8df5b1fea072dfacf78d5c95398205c30185494a
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.
6 # modification by bero: Ported to 2.16.91.0.6
8 #Signed-off-by: John Bowler <jbowler@acm.org>
9 #Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
10 ---
11 # binutils/objcopy.c | 8 +++++---
12 # 1 file changed, 5 insertions(+), 3 deletions(-)
14 Index: src/binutils/objcopy.c
15 ===================================================================
16 --- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100
17 +++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100
18 @@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[])
19 if (preserve_dates)
20 set_times (tmpname, &statbuf);
21 if (output_file != tmpname)
22 - smart_rename (tmpname, output_file ? output_file : argv[i],
23 - preserve_dates);
24 + if (smart_rename (tmpname, output_file ? output_file : argv[i],
25 + preserve_dates))
26 + hold_status = 1;
27 status = hold_status;
29 else
30 @@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[])
31 if (preserve_dates)
32 set_times (tmpname, &statbuf);
33 if (tmpname != output_filename)
34 - smart_rename (tmpname, input_filename, preserve_dates);
35 + if (smart_rename (tmpname, input_filename, preserve_dates))
36 + status = 1;
38 else
39 unlink_if_ordinary (tmpname);