public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jon <jg@jguk.org>
To: Ian Lance Taylor <iant@google.com>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>, gcc@gcc.gnu.org
Subject: Re: Long paths with ../../../../ throughout
Date: Sun, 14 Mar 2010 06:25:00 -0000	[thread overview]
Message-ID: <4B9BAB12.3000909@jguk.org> (raw)
In-Reply-To: <mcriq9qhrxv.fsf@dhcp-172-17-9-151.mtv.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 1129 bytes --]

Hello Ian

Ian Lance Taylor wrote, On 22/02/10 03:26:
> Jon <jg@jguk.org> writes:
> 
>> Good point. Updated patch attached for review.
> 
> I suppose this counts as a functionality change, and as such should
> not be committed until after the release branch is made.
> 
> This is OK when we are back in stage 1, with a ChangeLog entry,
> assuming it passes bootstrap (you didn't say).

collect2_feb_21_help.patch attached again to go with ChangeLog:

2010-03-13  Jon Grant <04@jguk.org>
         * collect2.c: debug changed to bool so true/false can be 
used. bool helpflag added.
	* collect2.c: --version now sets vflag true. --help no sets helpflag 
true.
         * collect2.c: when --help passed, standard help information 
is output on stderr
         * collect2.h: vflag changed to bool so true/false can be used.

I think it passes bootstrap, my understanding of what is required:
./configure
make
make bootstrap

I'm new to gcc, so if some extra steps to follow please let me know
if there is an FAQ or document to follow.

How long is it until back in stage 1 development phase?

Thanks for reviewing so far
Cheers, Jon

[-- Attachment #2: collect2_feb_21_help.patch --]
[-- Type: text/x-patch, Size: 2717 bytes --]

Index: collect2.c
===================================================================
--- collect2.c	(revision 156482)
+++ collect2.c	(working copy)
@@ -174,7 +174,7 @@
   int number;
 };
 
-int vflag;				/* true if -v */
+bool vflag;				/* true if -v or --version */ 
 static int rflag;			/* true if -r */
 static int strip_flag;			/* true if -s */
 static const char *demangle_flag;
@@ -193,7 +193,8 @@
 /* Current LTO mode.  */
 static enum lto_mode_d lto_mode = LTO_MODE_NONE;
 
-int debug;				/* true if -debug */
+bool debug;				/* true if -debug */
+bool helpflag;			/* true if --help */
 
 static int shared_obj;			/* true if -shared */
 
@@ -1228,7 +1229,7 @@
     for (i = 1; argv[i] != NULL; i ++)
       {
 	if (! strcmp (argv[i], "-debug"))
-	  debug = 1;
+	  debug = true;
         else if (! strcmp (argv[i], "-flto") && ! use_plugin)
 	  {
 	    use_verbose = true;
@@ -1458,7 +1459,7 @@
       if (use_verbose && *q == '-' && q[1] == 'v' && q[2] == 0)
 	{
 	  /* Turn on trace in collect2 if needed.  */
-	  vflag = 1;
+	  vflag = true;
 	}
     }
   obstack_free (&temporary_obstack, temporary_firstobj);
@@ -1588,7 +1589,7 @@
 
 	    case 'v':
 	      if (arg[2] == '\0')
-		vflag = 1;
+		vflag = true;
 	      break;
 
 	    case '-':
@@ -1619,6 +1620,10 @@
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
+	      else if (strncmp (arg, "--version", 9) == 0)
+		vflag = true;
+	      else if (strncmp (arg, "--help", 9) == 0)
+		helpflag = true;
 	      break;
 	    }
 	}
@@ -1720,6 +1725,20 @@
       fprintf (stderr, "\n");
     }
 
+  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);
+    }
+
   if (debug)
     {
       const char *ptr;
Index: collect2.h
===================================================================
--- collect2.h	(revision 156482)
+++ collect2.h	(working copy)
@@ -38,7 +38,7 @@
 extern const char *c_file_name;
 extern struct obstack temporary_obstack;
 extern char *temporary_firstobj;
-extern int vflag, debug;
+extern bool vflag, debug;
 
 extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
 extern void notice (const char *, ...) ATTRIBUTE_PRINTF_1;

  reply	other threads:[~2010-03-13 15:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 17:34 Jon Grant
2010-01-19 17:35 ` Jon Grant
2010-01-19 17:40   ` Jon Grant
2010-01-19 18:18 ` Ian Lance Taylor
2010-01-23 16:26   ` Jon Grant
2010-01-25 18:44     ` Ian Lance Taylor
2010-02-02 22:38       ` Jon
2010-02-02 22:47         ` Ian Lance Taylor
2010-02-03 21:56           ` Jon
2010-02-03 22:46             ` Jon
2010-02-04  1:01             ` Ian Lance Taylor
2010-02-05 20:38               ` Jon
2010-02-20  7:57               ` Jon
2010-02-20 11:48                 ` Joseph S. Myers
2010-02-21  0:43                   ` Jon
2010-02-22  3:26                     ` Ian Lance Taylor
2010-03-14  6:25                       ` Jon [this message]
2010-03-15  7:35                         ` Ian Lance Taylor
2010-04-24 22:47                           ` Jon
2010-04-24 22:54                             ` Manuel López-Ibáñez
2010-04-25 18:06                             ` Ian Lance Taylor
2010-04-25 21:15                               ` Manuel López-Ibáñez
2010-04-25 21:23                                 ` Jon
2010-04-25 21:39                                   ` Manuel López-Ibáñez
2010-04-26 23:57                                     ` Jon
2010-04-27  0:59                                       ` Dave Korn
2010-04-27  7:50                                         ` Manuel López-Ibáñez
2010-04-27 16:02                                           ` Dave Korn
2010-04-26  4:13                                 ` Ian Lance Taylor
2011-07-02 22:04           ` Jon Grant
2011-07-03  4:27             ` Ian Lance Taylor
2011-07-03  7:33               ` Richard Guenther
2011-07-04 20:14               ` Jon Grant
2011-07-05 18:37                 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9BAB12.3000909@jguk.org \
    --to=jg@jguk.org \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).