Patchwork r158908 breaks ld testsuite

login
register
mail settings
Submitter Alan Modra
Date June 23, 2010, 2:06 p.m.
Message ID <20100623140628.GD21855@bubble.grove.modra.org>
Download mbox | patch
Permalink /patch/56678/
State New
Headers show

Comments

Alan Modra - June 23, 2010, 2:06 p.m.
The ld testsuite passes -Wl,--version-script=foo.map to gcc in a
couple of places.  This triggers a dump of collect2 version and
collect-ld args.  I'll commit the following as obvious after
regression tests complete tomorrow.

	* collect2.c (main): Match exactly --version and --help.

Patch

Index: gcc/collect2.c
===================================================================
--- gcc/collect2.c	(revision 161152)
+++ gcc/collect2.c	(working copy)
@@ -1593,9 +1593,9 @@  main (int argc, char **argv)
 		}
 	      else if (strncmp (arg, "--sysroot=", 10) == 0)
 		target_system_root = arg + 10;
-	      else if (strncmp (arg, "--version", 9) == 0)
+	      else if (strcmp (arg, "--version") == 0)
 		vflag = true;
-	      else if (strncmp (arg, "--help", 9) == 0)
+	      else if (strcmp (arg, "--help") == 0)
 		helpflag = true;
 	      break;
 	    }