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]
Other format: [Raw text]

Re: Fix profiledbootstrap failure caused by warning


>>>>> Jan Hubicka writes:

Jan> This is really strange especially that we didn't noticed this earlier.
Jan> We definitly should not produce profiles in /tmp/* files.

Jan> Yes, that is the proper fix.  Do you have any knowledge of collect2?
Jan> (it is black magic to me so I am not sure how to implement this
Jan> correctly)

	The current collect2 explicitly disables exceptions.  Following
that precedent, the following patch disables profiling flags. 

	What do others think of this?

David


	* collect2.c (main): Add -fno-profile-arcs -fno-test-coverage
	-fno-branch-probabilities to arguments when compiling ctors and
	dtors.

Index: collect2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/collect2.c,v
retrieving revision 1.156
diff -c -p -r1.156 collect2.c
*** collect2.c	8 Dec 2003 04:18:44 -0000	1.156
--- collect2.c	15 Dec 2003 01:07:38 -0000
*************** main (int argc, char **argv)
*** 884,891 ****
      }
    obstack_free (&temporary_obstack, temporary_firstobj);
  
!   /* -fno-exceptions -w */
!   num_c_args += 2;
  
    c_ptr = (const char **) (c_argv = xcalloc (sizeof (char *), num_c_args));
  
--- 884,892 ----
      }
    obstack_free (&temporary_obstack, temporary_firstobj);
  
!   /* -fno-profile-arcs -fno-test-coverage -fno-branch-probabilities
!      -fno-exceptions -w */
!   num_c_args += 5;
  
    c_ptr = (const char **) (c_argv = xcalloc (sizeof (char *), num_c_args));
  
*************** main (int argc, char **argv)
*** 1046,1051 ****
--- 1047,1055 ----
  	}
      }
    obstack_free (&temporary_obstack, temporary_firstobj);
+   *c_ptr++ = "-fno-profile-arcs";
+   *c_ptr++ = "-fno-test-coverage";
+   *c_ptr++ = "-fno-branch-probabilities";
    *c_ptr++ = "-fno-exceptions";
    *c_ptr++ = "-w";
  


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