From: "Joey Ye" <joey.ye@arm.com>
To: "'H.J. Lu'" <hjl.tools@gmail.com>
Cc: <gcc-patches@gcc.gnu.org>, "'Joseph Prostko'" <joe.prostko@gmail.com>
Subject: RE: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
Date: Fri, 14 Dec 2012 03:39:00 -0000 [thread overview]
Message-ID: <000001cdd9ac$a7208120$f5618360$@ye@arm.com> (raw)
In-Reply-To: <CAMe9rOrEO_H4x_CcSrvp-mbJOxPtg2FQ1Q+MnidTsA+mXJ_w7w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
> -----Original Message-----
> From: H.J. Lu [mailto:hjl.tools@gmail.com]
> Sent: Tuesday, November 27, 2012 12:56
> To: Joey Ye
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH, libgcc] Make possible to disable JCR in crtstuff.c
> >> >
> >> > OK to trunk?
> >> >
> >> > 2012-09-21 Joey Ye <joey.ye@arm.com>
> >> >
> >> > * crtstuff.c: Check TARGET_USE_JCR_SECTION.
> >> >
>
> Since we have --enable-languages=.., can't we disable
> JCR_SECTION section if java isn't enabled?
Updated configure disabling jcr section usage if not configured with java.
2012-12-12 Joey Ye <joey.ye@arm.com>
* configure.ac (enable-jcr-section): New target_configargs.
* configure: Regenerated.
* libgcc/Makefile.in: Include TARGET_USE_JCR_SECTION in CFLAGS.
* libgcc/configure.ac (use_jcr_section): New variable.
* libgcc/configure: Regenerated.
* libgcc/crtstuff.c: Check TARGET_USE_JCR_SECTION.
[-- Attachment #2: jcr_diable_non_java-1212.patch --]
[-- Type: application/octet-stream, Size: 6365 bytes --]
Index: configure.ac
===================================================================
--- configure.ac (revision 192756)
+++ configure.ac (working copy)
@@ -1991,6 +1991,16 @@
;;
esac
+# Disable jcr section if we're not building java
+case ,${enable_languages}, in
+ *,java,*)
+ target_configargs+=--enable-jcr-section
+ ;;
+ *)
+ target_configargs+=--disable-jcr-section
+ ;;
+esac
+
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
# $build_configdirs and $target_configdirs.
# If we have the source for $noconfigdirs entries, add them to $notsupp.
Index: configure
===================================================================
--- configure (revision 192756)
+++ configure (working copy)
@@ -6413,6 +6413,16 @@
;;
esac
+# Disable jcr section if we're not building java
+case ,${enable_languages}, in
+ *,java,*)
+ target_configargs+=--enable-jcr-section
+ ;;
+ *)
+ target_configargs+=--disable-jcr-section
+ ;;
+esac
+
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
# $build_configdirs and $target_configdirs.
# If we have the source for $noconfigdirs entries, add them to $notsupp.
Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in (revision 192756)
+++ libgcc/Makefile.in (working copy)
@@ -281,7 +281,8 @@
-finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
-fno-stack-protector \
- $(INHIBIT_LIBC_CFLAGS)
+ $(INHIBIT_LIBC_CFLAGS) \
+ -DTARGET_USE_JCR_SECTION=@use_jcr_section@
# Extra flags to use when compiling crt{begin,end}.o.
CRTSTUFF_T_CFLAGS =
Index: libgcc/configure.ac
===================================================================
--- libgcc/configure.ac (revision 192756)
+++ libgcc/configure.ac (working copy)
@@ -204,6 +204,13 @@
esac],
[enable_sjlj_exceptions=auto])
+if test "x$enable_jcr_section" = "xyes"; then
+ use_jcr_section=1
+else
+ use_jcr_section=0
+fi
+AC_SUBST(use_jcr_section)
+
AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions],
[libgcc_cv_lib_sjlj_exceptions],
[AC_LANG_CONFTEST(
Index: libgcc/crtstuff.c
===================================================================
--- libgcc/crtstuff.c (revision 192756)
+++ libgcc/crtstuff.c (working copy)
@@ -256,13 +256,13 @@
= { };
#endif /* USE_EH_FRAME_REGISTRY */
-#ifdef JCR_SECTION_NAME
+#if TARGET_USE_JCR_SECTION && defined(JCR_SECTION_NAME)
/* Stick a label at the beginning of the java class registration info
so we can register them properly. */
STATIC void *__JCR_LIST__[]
__attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void*))))
= { };
-#endif /* JCR_SECTION_NAME */
+#endif /* TARGET_USE_JCR_SECTION && JCR_SECTION_NAME */
#if USE_TM_CLONE_REGISTRY
STATIC func_ptr __TMC_LIST__[]
@@ -438,7 +438,7 @@
#endif
#if defined(USE_EH_FRAME_REGISTRY) \
- || defined(JCR_SECTION_NAME) \
+ || defined(TARGET_USE_JCR_SECTION) \
|| defined(USE_TM_CLONE_REGISTRY)
/* Stick a call to __register_frame_info into the .init section. For some
reason calls with no arguments work more reliably in .init, so stick the
@@ -461,7 +461,7 @@
#endif /* CRT_GET_RFIB_DATA */
#endif /* USE_EH_FRAME_REGISTRY */
-#ifdef JCR_SECTION_NAME
+#if TARGET_USE_JCR_SECTION
if (__JCR_LIST__[0])
{
void (*register_classes) (void *) = _Jv_RegisterClasses;
@@ -469,7 +469,7 @@
if (register_classes)
register_classes (__JCR_LIST__);
}
-#endif /* JCR_SECTION_NAME */
+#endif /* TARGET_USE_JCR_SECTION */
#if USE_TM_CLONE_REGISTRY
register_tm_clones ();
@@ -483,7 +483,7 @@
__attribute__ ((__used__, section(".init_array"), aligned(sizeof(func_ptr))))
= { frame_dummy };
#endif /* !defined(INIT_SECTION_ASM_OP) */
-#endif /* USE_EH_FRAME_REGISTRY || JCR_SECTION_NAME || USE_TM_CLONE_REGISTRY */
+#endif /* USE_EH_FRAME_REGISTRY || TARGET_USE_JCR_SECTION || USE_TM_CLONE_REGISTRY */
#else /* OBJECT_FORMAT_ELF */
@@ -551,7 +551,7 @@
}
#if defined(USE_EH_FRAME_REGISTRY) \
- || defined(JCR_SECTION_NAME) \
+ || defined(TARGET_USE_JCR_SECTION) \
|| defined(USE_TM_CLONE_REGISTRY)
/* A helper function for __do_global_ctors, which is in crtend.o. Here
in crtbegin.o, we can reference a couple of symbols not visible there.
@@ -566,7 +566,7 @@
__register_frame_info (__EH_FRAME_BEGIN__, &object);
#endif
-#ifdef JCR_SECTION_NAME
+#if TARGET_USE_JCR_SECTION
if (__JCR_LIST__[0])
{
void (*register_classes) (void *) = _Jv_RegisterClasses;
@@ -580,7 +580,7 @@
register_tm_clones ();
#endif /* USE_TM_CLONE_REGISTRY */
}
-#endif /* USE_EH_FRAME_REGISTRY || JCR_SECTION_NAME || USE_TM_CLONE_REGISTRY */
+#endif /* USE_EH_FRAME_REGISTRY || TARGET_USE_JCR_SECTION || USE_TM_CLONE_REGISTRY */
#else /* ! INIT_SECTION_ASM_OP && ! HAS_INIT_SECTION */
#error "What are you doing with crtstuff.c, then?"
@@ -656,13 +656,13 @@
= { 0 };
#endif /* EH_FRAME_SECTION_NAME */
-#ifdef JCR_SECTION_NAME
+#if TARGET_USE_JCR_SECTION && defined(JCR_SECTION_NAME)
/* Null terminate the .jcr section array. */
STATIC void *__JCR_END__[1]
__attribute__ ((used, section(JCR_SECTION_NAME),
aligned(sizeof(void *))))
= { 0 };
-#endif /* JCR_SECTION_NAME */
+#endif /* TARGET_USE_JCR_SECTION && JCR_SECTION_NAME */
#if USE_TM_CLONE_REGISTRY
# ifndef HAVE_GAS_HIDDEN
@@ -742,7 +742,7 @@
{
func_ptr *p;
#if defined(USE_EH_FRAME_REGISTRY) \
- || defined(JCR_SECTION_NAME) \
+ || defined(TARGET_USE_JCR_SECTION) \
|| defined(USE_TM_CLONE_REGISTRY)
__do_global_ctors_1();
#endif
Index: libgcc/configure
===================================================================
--- libgcc/configure (revision 192756)
+++ libgcc/configure (working copy)
@@ -566,6 +566,7 @@
set_use_emutls
set_have_cc_tls
vis_hide
+use_jcr_section
fixed_point
enable_decimal_float
decimal_float
@@ -4190,6 +4191,13 @@
fi
+if test "x$enable_jcr_section" = "xyes"; then
+ use_jcr_section=1
+else
+ use_jcr_section=0
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use setjmp/longjmp exceptions" >&5
$as_echo_n "checking whether to use setjmp/longjmp exceptions... " >&6; }
if test "${libgcc_cv_lib_sjlj_exceptions+set}" = set; then :
next prev parent reply other threads:[~2012-12-14 3:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50b4317e.044d420a.1632.ffffd2f7SMTPIN_ADDED_BROKEN@mx.google.com>
2012-11-27 4:56 ` H.J. Lu
2012-11-27 7:44 ` Joseph Prostko
2012-12-14 3:39 ` Joey Ye [this message]
[not found] ` <50ca9f88.676bb40a.3a71.ffffb7b2SMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-14 3:55 ` H.J. Lu
2012-12-14 6:57 ` Joey Ye
[not found] ` <50cacddc.014b420a.1bb8.65abSMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-14 17:19 ` H.J. Lu
2012-12-17 9:51 ` Joey Ye
[not found] ` <50ceeb26.26d5440a.4827.0ac9SMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-17 19:28 ` H.J. Lu
2012-12-18 1:24 ` Joseph Prostko
2012-12-18 4:09 ` H.J. Lu
2012-12-19 7:58 ` Joey Ye
[not found] <50b4317c.494f420a.4523.ffffdc1fSMTPIN_ADDED_BROKEN@mx.google.com>
2012-11-27 7:36 ` Joseph Prostko
2012-11-20 2:09 Joey Ye
2012-11-27 3:20 ` Joey Ye
-- strict thread matches above, loose matches on Subject: below --
2012-09-21 8:48 Joey Ye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cdd9ac$a7208120$f5618360$@ye@arm.com' \
--to=joey.ye@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=joe.prostko@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).