This is the mail archive of the binutils@sources.redhat.com 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]

Re: Fix PE ports confusing -c command line switch with --compact-implib


Hi Federico,

> This reminds me a problem we recently found in gas. Some platforms use -k
> in the md_parse_option which collides with --keep-locals option for the
> same reason you're mentioning, so -k is being treated as --keep-locals, not
> good.
>     Since you're fixing this, can you take a look at this similar issue?

Easily done.  I am applying the following patch.

Cheers
        Nick

2002-12-17  Nick Clifton  <nickc@redhat.com>

	* as.c (std_longopts): Duplicate --keep-locals entry in order to
	prevent it being confused with -k.

Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.40
diff -c -3 -p -w -r1.40 as.c
*** gas/as.c	14 Oct 2002 12:08:47 -0000	1.40
--- gas/as.c	17 Dec 2002 11:59:42 -0000
*************** parse_args (pargc, pargv)
*** 378,383 ****
--- 378,387 ----
    static const struct option std_longopts[] = {
  #define OPTION_HELP (OPTION_STD_BASE)
      {"help", no_argument, NULL, OPTION_HELP},
+     /* getopt allows abbreviations, so we do this to stop it from
+        treating -k as an abbreviation for --keep-locals.  Some
+        ports use -k to enable PIC assembly.  */
+     {"keep-locals", no_argument, NULL, 'L'},
      {"keep-locals", no_argument, NULL, 'L'},
      {"mri", no_argument, NULL, 'M'},
  #define OPTION_NOCPP (OPTION_STD_BASE + 1)


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