PATCH: collect2: don't pass "-ftest-coverage" to inner gcc.

Andrew Haley aphATpasanda.cygnus.co.uk
Thu Sep 16 06:26:00 GMT 1999


This patch prevents "-ftest-coverage" from being passed to the inner
gcc when using collect2; if you don't do this, zero length ".bb" files
with random names are left in the working directory.

OK?

Andrew.


1999-09-16  Andrew Haley  <aph@cygnus.com>

	* collect2.c (main): Don't pass "-ftest-coverage" to inner gcc.

Index: collect2.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/collect2.c,v
retrieving revision 1.79
diff -p -2 -c -r1.79 collect2.c
*** collect2.c	1999/09/07 02:36:26	1.79
--- collect2.c	1999/09/16 13:20:53
*************** main (argc, argv)
*** 1101,1105 ****
      {
        const char *q = extract_string (&p);
!       if (*q == '-' && (q[1] == 'm' || q[1] == 'f'))
  	*c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
        if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0)
--- 1101,1106 ----
      {
        const char *q = extract_string (&p);
!       if (*q == '-' && (q[1] == 'm' || q[1] == 'f')
! 	  && strncmp (q, "-ftest-coverage", sizeof ("-ftest-coverage") - 1))
  	*c_ptr++ = obstack_copy0 (&permanent_obstack, q, strlen (q));
        if (strcmp (q, "-EL") == 0 || strcmp (q, "-EB") == 0)


More information about the Gcc-patches mailing list