⛏️ index : buildtools.git

author Jérôme Duval <jerome.duval@gmail.com> 2015-07-25 23:32:16.0 +02:00:00
committer Jérôme Duval <jerome.duval@gmail.com> 2015-07-25 23:32:16.0 +02:00:00
commit
03e3047c8a06391d520a79ee40508fe02cc962c9 [patch]
tree
883f0db3d186543df480953b774c18de92728fe5
parent
cd374ba049ea7d095647c8b6cc0dccdc7ecabf97
download
03e3047c8a06391d520a79ee40508fe02cc962c9.tar.gz

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.

Diff

 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
+++ a/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
+++ a/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