From 09ffbbe0d44895d6e6681430cf7a893840a9281b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 6 Mar 2008 00:53:37 +0000 Subject: From Craig Silverstein: accept any string for input format, warn if thread options when not supported. --- gold/options.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gold/options.h') diff --git a/gold/options.h b/gold/options.h index 7f5a561..454991f 100644 --- a/gold/options.h +++ b/gold/options.h @@ -415,11 +415,12 @@ class General_options DEFINE_bool(Bsymbolic, options::ONE_DASH, '\0', false, _("Bind defined symbols locally"), NULL); - DEFINE_enum(format, options::TWO_DASHES, 'b', "elf", - _("Set input format"), _("[elf,binary]"), - {"elf", "binary", - "elf32-i386", "elf32-little", "elf32-big", - "elf64-x86_64", "elf64-little", "elf64-big"}); + // This should really be an "enum", but it's too easy for folks to + // forget to update the list as they add new targets. So we just + // accept any string. We'll fail later (when the string is parsed), + // if the target isn't actually supported. + DEFINE_string(format, options::TWO_DASHES, 'b', "elf", + _("Set input format"), _("[elf,binary]")); #ifdef HAVE_ZLIB_H DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none", -- cgit v1.1