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.
This commit is contained in:
Jérôme Duval 2015-07-25 23:32:16 +02:00
parent cd374ba049
commit 03e3047c8a
2 changed files with 7 additions and 6 deletions

View File

@ -208,6 +208,9 @@ Boston, MA 02111-1307, USA. */
#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

View File

@ -379,16 +379,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/* 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
/* 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