public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "aph at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/37068] [4.4 Regression] libgcj linkage failure: Incorrect library ABI version detected
Date: Tue, 04 Nov 2008 16:09:00 -0000 [thread overview]
Message-ID: <20081104160909.7311.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37068-276@http.gcc.gnu.org/bugzilla/>
------- Comment #24 from aph at redhat dot com 2008-11-04 16:09 -------
Subject: Re: [4.4 Regression] libgcj linkage failure: Incorrect
library ABI version detected
mark at codesourcery dot com wrote:
> You shouldn't call that function. Instead, you should set
> DECL_STATIC_{CONSTRUCTOR,DESTRUCTOR}. Then, cgraph will do the right
> thing. If necessary, you can also call decl_init_priority_insert.
This patch works on x86_64 GNU/Linux.
Please HP/UX, AIX, and OSF users make sure it works for them as well.
Thanks,
Andrew.
2008-11-04 Andrew Haley <aph@redhat.com>
* jcf-parse.c (java_emit_static_constructor): Don't call
cgraph_build_static_cdtor. Rewrite.
Index: jcf-parse.c
===================================================================
--- jcf-parse.c (revision 141575)
+++ jcf-parse.c (working copy)
@@ -1699,7 +1699,32 @@
write_resource_constructor (&body);
if (body)
- cgraph_build_static_cdtor ('I', body, DEFAULT_INIT_PRIORITY);
+ {
+ tree name = get_identifier ("_Jv_global_static_constructor");
+
+ tree decl = build_decl (FUNCTION_DECL, name,
+ build_function_type (void_type_node,
void_list_node));
+
+ tree resdecl = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
+ DECL_ARTIFICIAL (resdecl) = 1;
+ DECL_RESULT (decl) = resdecl;
+ current_function_decl = decl;
+ allocate_struct_function (decl, false);
+
+ TREE_STATIC (decl) = 1;
+ TREE_USED (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
+ DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (decl) = 1;
+ DECL_SAVED_TREE (decl) = body;
+ DECL_UNINLINABLE (decl) = 1;
+
+ DECL_INITIAL (decl) = make_node (BLOCK);
+ TREE_USED (DECL_INITIAL (decl)) = 1;
+
+ DECL_STATIC_CONSTRUCTOR (decl) = 1;
+ java_genericize (decl);
+ cgraph_finalize_function (decl, false);
+ }
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37068
next prev parent reply other threads:[~2008-11-04 16:09 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 14:58 [Bug java/37068] New: " danglin at gcc dot gnu dot org
2008-08-10 19:55 ` [Bug java/37068] " pinskia at gcc dot gnu dot org
2008-08-22 15:16 ` rguenth at gcc dot gnu dot org
2008-09-09 12:54 ` hubicka at gcc dot gnu dot org
2008-10-16 20:12 ` dje at gcc dot gnu dot org
2008-10-30 23:28 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-31 4:22 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-31 17:18 ` ro at gcc dot gnu dot org
2008-10-31 19:50 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-31 23:31 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-01 16:18 ` danglin at gcc dot gnu dot org
2008-11-01 16:49 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-02 2:33 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-03 10:18 ` aph at gcc dot gnu dot org
2008-11-03 11:54 ` jakub at gcc dot gnu dot org
2008-11-03 14:27 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-03 14:45 ` aph at gcc dot gnu dot org
2008-11-03 14:52 ` jakub at gcc dot gnu dot org
2008-11-03 15:02 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-03 15:12 ` aph at redhat dot com
2008-11-03 17:35 ` dje at gcc dot gnu dot org
2008-11-03 17:38 ` mmitchel at gcc dot gnu dot org
2008-11-03 17:41 ` jakub at gcc dot gnu dot org
2008-11-03 17:47 ` aph at gcc dot gnu dot org
2008-11-04 5:51 ` mark at codesourcery dot com
2008-11-04 10:32 ` aph at gcc dot gnu dot org
2008-11-04 16:09 ` aph at redhat dot com [this message]
2008-11-04 18:11 ` dje dot gcc at gmail dot com
2008-11-04 18:15 ` dje dot gcc at gmail dot com
2008-11-04 18:16 ` aph at redhat dot com
2008-11-04 18:19 ` aph at gcc dot gnu dot org
2008-11-04 18:33 ` dje at gcc dot gnu dot org
2008-11-04 19:01 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-04 23:06 ` aph at redhat dot com
2008-11-05 1:11 ` dave at hiauly1 dot hia dot nrc dot ca
2008-11-05 10:06 ` aph at gcc dot gnu dot org
2008-11-05 10:14 ` jakub at gcc dot gnu dot org
2008-11-05 13:40 ` ro at techfak dot uni-bielefeld dot de
2008-11-05 14:02 ` aph at redhat dot com
2008-11-05 15:08 ` ro at techfak dot uni-bielefeld dot de
2008-11-05 15:45 ` dje at gcc dot gnu dot org
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=20081104160909.7311.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=java-prs@gcc.gnu.org \
/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).