From 821948744f578be38aade35ae6db7deecb4ee7be Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 10 Feb 2020 11:27:16 +1030 Subject: gas -Z flag -Z is supposed to "generate object file even after errors". It doesn't do so at the moment, unless you count a zero length object file as useful output. Fixed for most targets as follows. I suspect avr and pru need target patches. * output-file.c (output_file_close): Do a normal close when flag_always_generate_output. * write.c (write_object_file): Don't stop output when flag_always_generate_output. --- gas/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/write.c') diff --git a/gas/write.c b/gas/write.c index 5d9a239..dfbbc7c 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2429,7 +2429,7 @@ write_object_file (void) #endif /* Stop if there is an error. */ - if (had_errors ()) + if (!flag_always_generate_output && had_errors ()) return; /* Now that all the sizes are known, and contents correct, we can -- cgit v1.1