This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: bootstrap failure on ppc-darwin
- From: Andrew Haley <aph at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 26 Apr 2006 09:41:30 +0100
- Subject: Re: bootstrap failure on ppc-darwin
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