public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: java-patches@gcc.gnu.org
Subject: Re: bootstrap failure on ppc-darwin
Date: Wed, 26 Apr 2006 08:41:00 -0000	[thread overview]
Message-ID: <17487.12858.4476.911758@zapata.pink> (raw)

Geoffrey Keating writes:
 > Between revisions 113215 and 113226, a bootstrap failure was  
 > introduced on trunk, like this:
 > 
 > /Users/regress/tbox/svn-gcc/libjava/java/lang/natClassLoader.cc: 
 > 51:18: error: link.h: No such file or directory
 > 
 > It appears to be due to
 > 
 > 2006-04-21  Andrew Haley  <aph@redhat.com>
 > 
 >          * include/execution.h (struct _Jv_CompiledEngine): Define for
 >          compiled classes.
 >          * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Call
 >          _Jv_RegisterLibForGc.
 >          (_Jv_RegisterClasses_Counted): Likewise.
 >          (_Jv_NewClassFromInitializer): New.
 >          (_Jv_RegisterNewClasses): New.
 > 
 > in revision 113224:
 > 
 > Index: libjava/java/lang/natClassLoader.cc
 > ===================================================================
 > --- libjava/java/lang/natClassLoader.cc (revision 113223)
 > +++ libjava/java/lang/natClassLoader.cc (revision 113224)
 > @@ -45,14 +45,17 @@
 > #include <gnu/gcj/runtime/BootClassLoader.h>
 > #include <gnu/gcj/runtime/SystemClassLoader.h>
 > +#undef _GNU_SOURCE
 > +#define _GNU_SOURCE
 > +#include <dlfcn.h>
 > +#include <link.h>
 > +
 > // Size of local hash table.
 > #define HASH_LEN 1013
 > 
 > I'm not sure what link.h is, or why this file might need it, but  
 > Darwin doesn't have one.

It was a merge error.  Fixed thusly.

Also, some versions of dladdr() don't have a const-qualified p.

Andrew.


2006-04-25  Andrew Haley  <aph@redhat.com>

	* java/lang/natClassLoader.cc: Don't include link.h or dladdr.h.
	* boehm.cc: Don't include link.h.
	(_Jv_RegisterLibForGc): Cast away const when calling dladdr().

Index: boehm.cc
===================================================================
--- boehm.cc    (revision 113224)
+++ boehm.cc    (working copy)
@@ -36,7 +36,6 @@
 #undef _GNU_SOURCE
 #define _GNU_SOURCE
 #include <dlfcn.h>
-#include <link.h>
 #endif
 
 extern "C"
@@ -664,8 +663,8 @@
 {
 #ifdef HAVE_DLFCN_H
   Dl_info info;
-  
-  if (dladdr (p, &info) != 0)
+
+  if (dladdr (const_cast<void *>(p), &info) != 0)
     {
       filename_node **node = find_file (info.dli_fname);
       if (! *node)
Index: java/lang/natClassLoader.cc
===================================================================
--- java/lang/natClassLoader.cc (revision 113224)
+++ java/lang/natClassLoader.cc (working copy)
@@ -45,11 +45,6 @@
 #include <gnu/gcj/runtime/BootClassLoader.h>
 #include <gnu/gcj/runtime/SystemClassLoader.h>
 
-#undef _GNU_SOURCE
-#define _GNU_SOURCE
-#include <dlfcn.h>
-#include <link.h>
-
 // Size of local hash table.
 #define HASH_LEN 1013
 

                 reply	other threads:[~2006-04-26  8:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=17487.12858.4476.911758@zapata.pink \
    --to=aph@redhat.com \
    --cc=java-patches@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).