This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

[RFA:] Make collect2 pass on -B-options to called gcc


Collect2 must pass on -B switches when calling gcc, or gcc will pick up a
different assembler or whatnot at the installation directory or other
default-searched location.  Note that -B-options can be specified as
"-Bdir/" or "-B dir/".

Bootstrapped and checked with no new failures on i686-pc-linux-gnulibc1.

Ok to commit?

2000-09-16  Hans-Peter Nilsson  <hp@axis.com>

	* collect2.c (main): Pass on -B options from COLLECT_GCC_OPTIONS.

Index: collect2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/collect2.c,v
retrieving revision 1.99
diff -p -c -r1.99 collect2.c
*** collect2.c	2000/08/14 20:46:15	1.99
--- collect2.c	2000/09/15 21:40:48
*************** main (argc, argv)
*** 1096,1101 ****
--- 1096,1110 ----
  	*c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
        if (strncmp (q, "-shared", sizeof ("-shared") - 1) == 0)
  	shared_obj = 1;
+       if (*q == '-' && q[1] == 'B')
+ 	{
+ 	  *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
+ 	  if (q[2] == 0)
+ 	    {
+ 	      q = extract_string (&p);
+ 	      *c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
+ 	    }
+ 	}
      }
    obstack_free (&temporary_obstack, temporary_firstobj);
    *c_ptr++ = "-fno-exceptions";

brgds, H-P

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