diff --git a/gcc4/gcc/crtstuff.c b/gcc4/gcc/crtstuff.c index 0e362f3a91..d7c1716dcd 100644 --- a/gcc4/gcc/crtstuff.c +++ b/gcc4/gcc/crtstuff.c @@ -134,7 +134,9 @@ extern void *__deregister_frame_info_bases (const void *) extern void __do_global_ctors_1 (void); /* Likewise for _Jv_RegisterClasses. */ +#ifdef JCR_SECTION_NAME extern void _Jv_RegisterClasses (void *) TARGET_ATTRIBUTE_WEAK; +#endif #ifdef OBJECT_FORMAT_ELF diff --git a/gcc4/gcc/defaults.h b/gcc4/gcc/defaults.h index 28a0d83adb..70a2a5b078 100644 --- a/gcc4/gcc/defaults.h +++ b/gcc4/gcc/defaults.h @@ -338,9 +338,13 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \ at program start-up time. */ #if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK #ifndef JCR_SECTION_NAME +/* Hack to remove _Jv crap on BeOS. i know it should be made somehow through + config files, but i don't know how (in which file ;) */ +#ifndef __BEOS__ #define JCR_SECTION_NAME ".jcr" #endif #endif +#endif /* This decision to use a .jcr section can be overridden by defining USE_JCR_SECTION to 0 in target file. This is necessary if target