From 03e3047c8a06391d520a79ee40508fe02cc962c9 Mon Sep 17 00:00:00 2001 From: Jérôme Duval Date: Sat, 25 Jul 2015 23:32:16 +0200 Subject: [PATCH] gcc: don't define JCR_SECTION_NAME when TARGET_NO_JCR_SECTION_NAME. We define TARGET_NO_JCR_SECTION_NAME in haiku.h and remove the hack in defaults.h. Depending on __HAIKU__ at this place isn't correct. --- gcc/gcc/defaults.h | 10 ++++++---- gcc/gcc/config/haiku.h | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/gcc/defaults.h b/gcc/gcc/defaults.h index 8a01ca7..e9d8ff4 100644 --- a/gcc/gcc/defaults.h +++ b/gcc/gcc/defaults.h @@ -379,14 +379,12 @@ /* If we have named section and we support weak symbols, then use the .jcr section for recording java classes which need to be registered - at program start-up time. */ -#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK + at program start-up time. Can be overridden by defining + TARGET_NO_JCR_SECTION_NAME. */ +#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK \ + && !defined (TARGET_NO_JCR_SECTION_NAME) #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 ;) */ -#if !defined(__BEOS__) && !defined(__HAIKU__) #define JCR_SECTION_NAME ".jcr" -#endif #endif #endif diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h index 0331d2d..bf498ee 100644 --- a/gcc/gcc/config/haiku.h +++ b/gcc/gcc/config/haiku.h @@ -208,6 +208,9 @@ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}" #endif +/* Do not use JCR_SECTION_NAME default definition for Haiku */ +#define TARGET_NO_JCR_SECTION_NAME 1 + /* Do not desire to have _Jv_RegisterClasses in crtbegin.o for Haiku */ #define TARGET_USE_JCR_SECTION 0 -- gitore 0.2.2