Fix PR driver/45703: let --help -v show linker help.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 4 Nov 2010 19:57:17 +0000 (19:57 +0000)
committerRalf Wildenhues <rwild@gcc.gnu.org>
Thu, 4 Nov 2010 19:57:17 +0000 (19:57 +0000)
gcc/:
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.

From-SVN: r166327

gcc/ChangeLog
gcc/collect2.c

index 8c4636838052d8c16d791ac703e17e190dbb8e2f..daed3ba2ec3a92186724595a7500064c3066fd27 100644 (file)
@@ -1,3 +1,10 @@
+2010-11-04  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.
+
 2010-11-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/46233
index a8cd232c5504aa9a6610469ab7a5f54397bf57d3..465a98aea1a03ca5cf9d1e8cd8c1a09a1943b065 100644 (file)
@@ -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)