Fixes a problem where "ld -ixxx" would report an error of "ld: bad -rpath option".
authorNick Clifton <nickc@redhat.com>
Mon, 23 Feb 2015 15:33:56 +0000 (15:33 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 23 Feb 2015 15:33:56 +0000 (15:33 +0000)
* lexsup.c (parse_args): Produce a more reasonable error message
when -ixxx or -rxxx is the last option on the linker command line.

ld/ChangeLog
ld/lexsup.c

index 43cf4e8c27565a72a5556126e2be6af8ff362552..30f965e8a5d2df86f9d66d7ed816216c86abf218 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-23  Nick Clifton  <nickc@redhat.com>
+
+       * lexsup.c (parse_args): Produce a more reasonable error message
+       when -ixxx or -rxxx is the last option on the linker command line.
+
 2015-02-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/17973
index db74ff84268e67c3e2cf4f6e0ff366654c5496da..aa6c3cdfdefd1851558e2adcabd53cfd612d026c 100644 (file)
@@ -999,7 +999,7 @@ parse_args (unsigned argc, char **argv)
               an error message here.  We cannot just make this a warning,
               increment optind, and continue because getopt is too confused
               and will seg-fault the next time around.  */
-           einfo(_("%P%F: bad -rpath option\n"));
+           einfo(_("%P%F: unrecognised option: %s\n"), argv[optind]);
 
          link_info.relocatable = TRUE;
          config.build_constructors = FALSE;