This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix -fuse-ld option to accept string argument.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=930b5f8bfb8e2d971f459c570d248714183a08d5

commit 930b5f8bfb8e2d971f459c570d248714183a08d5
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Mon Jan 15 10:05:54 2018 -0800

    Fix -fuse-ld option to accept string argument.
    
    PR 22042 complained that garbage text was being printed in the help
    for the -fuse-ld option; this was caused by passing an empty string
    to the gettext() function, which sometimes returns garbage when passed
    an empty string. The quick fix was to replace "" with NULL as the helparg,
    but that changed the parsing of the option, as gold uses the helparg to
    determine whether an option takes an argument. This patch adds a
    non-empty helparg string to fix both problems.
    
    gold/
    	PR gold/22694
    	* options.h (-fuse-ld): Add correct helparg.

Diff:
---
 gold/ChangeLog | 5 +++++
 gold/options.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index a2ee804..6494b20 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-15  Cary Coutant  <ccoutant@gmail.com>
+
+	PR gold/22694
+	* options.h (-fuse-ld): Add correct helparg.
+
 2018-01-15  Nick Clifton  <nickc@redhat.com>
 
 	* po/uk.po: Updated Ukranian translation.
diff --git a/gold/options.h b/gold/options.h
index d5b8fe4..feb60cc 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -894,7 +894,7 @@ class General_options
 
   DEFINE_string(fuse_ld, options::ONE_DASH, '\0', "",
 		N_("Ignored for GCC linker option compatibility"),
-		NULL);
+		N_("[gold,bfd]"));
 
   // g


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]