Irix bootstrap on BIB - gcov_init and weak symbols

Jan Hubicka jh@suse.cz
Mon Dec 16 06:34:00 GMT 2002


Hi,
the code in profile.c:

#if __GNUC__ && !CROSS_COMPILE && SUPPORTS_WEAK
          /* If __gcov_init has a value in the compiler, it means we
             are instrumenting ourselves. We should not remove the
             counts file, because we might be recompiling
             ourselves. The .da files are all removed during copying
             the stage1 files.  */
          extern void __gcov_init (void *)
            __attribute__ ((weak));

Breaks bootstrap on Irix with gcc 2.7 used as bootstrap compiler.
The compiler does not support weak and we end up with ignored attribute
and linker error.

I don't think it is valid to use macro this way and it does not speak
about the the bootstrap compiler.
Is there any way to solve this cleanly?  (ie autoconfigure it, enable it
only for stage2+, enable it only for gcc of same version as we are
compiling or so)?
I didn't found any information about this readilly available.

Honza



More information about the Gcc mailing list