diff mbox

Fix PR driver/45703: let --help -v show linker help.

Message ID 20100923195320.GM16526@gmx.de
State New
Headers show

Commit Message

Ralf Wildenhues Sept. 23, 2010, 7:53 p.m. UTC
Bootstrapped i686-unknown-linux-gnu, regtest is running.  Checked
'collect2 --help' and 'gcc --help -v' output for sanity.  (The latter
might want some more empty lines outside of this area, but that's
not for this patch.)

OK for trunk if no new test failures show up?

The 4.5 branch does not have this regression BTW.

Thanks,
Ralf

Fix PR driver/45703: let --help -v show linker help.

gcc/ChangeLog:
2010-09-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR driver/45703
	* collect2.c (main): Print --help output to stdout.  Do not
	exit right away, so ld --help is appended.  Add empty lines
	to separate output suitably.

Comments

Ralf Wildenhues Oct. 10, 2010, 3:43 p.m. UTC | #1
Ping http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01901.html

* Ralf Wildenhues wrote on Thu, Sep 23, 2010 at 09:53:20PM CEST:
> Bootstrapped i686-unknown-linux-gnu, regtest is running.

No regressions.

> Checked
> 'collect2 --help' and 'gcc --help -v' output for sanity.  (The latter
> might want some more empty lines outside of this area, but that's
> not for this patch.)
> 
> OK for trunk if no new test failures show up?
> 
> The 4.5 branch does not have this regression BTW.

> Fix PR driver/45703: let --help -v show linker help.
> 
> gcc/ChangeLog:
> 2010-09-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
> 
> 	PR driver/45703
> 	* collect2.c (main): Print --help output to stdout.  Do not
> 	exit right away, so ld --help is appended.  Add empty lines
> 	to separate output suitably.
Richard Biener Nov. 4, 2010, 11:14 a.m. UTC | #2
On Sun, Oct 10, 2010 at 5:43 PM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> Ping http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01901.html
>
> * Ralf Wildenhues wrote on Thu, Sep 23, 2010 at 09:53:20PM CEST:
>> Bootstrapped i686-unknown-linux-gnu, regtest is running.
>
> No regressions.

Ok.

Thanks,
Richard.

>> Checked
>> 'collect2 --help' and 'gcc --help -v' output for sanity.  (The latter
>> might want some more empty lines outside of this area, but that's
>> not for this patch.)
>>
>> OK for trunk if no new test failures show up?
>>
>> The 4.5 branch does not have this regression BTW.
>
>> Fix PR driver/45703: let --help -v show linker help.
>>
>> gcc/ChangeLog:
>> 2010-09-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
>>
>>       PR driver/45703
>>       * collect2.c (main): Print --help output to stdout.  Do not
>>       exit right away, so ld --help is appended.  Add empty lines
>>       to separate output suitably.
>
diff mbox

Patch

diff --git a/gcc/collect2.c b/gcc/collect2.c
index a8cd232..465a98a 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1698,16 +1698,16 @@  main (int argc, char **argv)
 
   if (helpflag)
     {
-      fprintf (stderr, "Usage: collect2 [options]\n");
-      fprintf (stderr, " Wrap linker and generate constructor code if needed.\n");
-      fprintf (stderr, " Options:\n");
-      fprintf (stderr, "  -debug          Enable debug output\n");
-      fprintf (stderr, "  --help          Display this information\n");
-      fprintf (stderr, "  -v, --version   Display this program's version number\n");
-      fprintf (stderr, "Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
-      fprintf (stderr, "Report bugs: %s\n", bug_report_url);
-
-      collect_exit (0);
+      printf ("Usage: collect2 [options]\n");
+      printf (" Wrap linker and generate constructor code if needed.\n");
+      printf (" Options:\n");
+      printf ("  -debug          Enable debug output\n");
+      printf ("  --help          Display this information\n");
+      printf ("  -v, --version   Display this program's version number\n");
+      printf ("\n");
+      printf ("Overview: http://gcc.gnu.org/onlinedocs/gccint/Collect2.html\n");
+      printf ("Report bugs: %s\n", bug_report_url);
+      printf ("\n");
     }
 
   if (debug)