public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: bootstrap failure on ppc-darwin
@ 2006-04-26  8:41 Andrew Haley
  0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2006-04-26  8:41 UTC (permalink / raw)
  To: java-patches

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
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-26  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26  8:41 bootstrap failure on ppc-darwin Andrew Haley

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).