multilib fixes for libjava

Jack Howarth howarth@bromo.msbb.uc.edu
Mon Nov 6 15:51:00 GMT 2006


Andrew,
   I believe the problem is that, unlike x86_64 which can
always run its 32-bit secondary binaries, Darwin is flipped
with 32-bit as default and it is not always true that
a Darwin PPC machine can run 64-bit binaries even though
the compiler can produce them (such as on a G4). Geoff's
changes in r117741 were designed to solve that problem.
I think the problem we have in libjava is that I am not
removing all of the custom code previously added to 
support multilib so that Geoff's new multi.m4 is in use.
This was done for libobjc for example...

Index: libobjc/ChangeLog
2006-10-14  Geoffrey Keating  <geoffk@apple.com>

        * Makefile.in: Use multi_basedir instead of toplevel_srcdir.
        * configure.ac: Use multi.m4 from aclocal rather than custom
        code.  Use multi_basedir instead of toplevel_srcdir.
        * aclocal.m4: Regenerate.
        * configure: Regenerate.

FYI, I hacked configure.ac in libjava to change...

--- configure.ac.org    2006-11-06 10:20:35.000000000 -0500
+++ configure.ac        2006-11-06 10:21:55.000000000 -0500
@@ -916,16 +916,17 @@
        AC_CHECK_LIB(dld, dladdr, [
        AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
 
-   if test x"$build" = x"$host"; then
-     AC_CHECK_FILES(/proc/self/exe, [
-       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
-   else
-     case $host in
-     *-linux*)
-       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])
-       ;;
-     esac
-   fi
+#   if test x"$build" = x"$host"; then
+#     AC_CHECK_FILES(/proc/self/exe, [
+#       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
+#   else
+#     case $host in
+#     *-linux*)
+#       AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])
+#       ;;
+#     esac
+#   fi
+   AC_DEFINE(HAVE_PROC_SELF_EXE, 0)
 
    AM_ICONV
    AM_LC_MESSAGES

While that suppressed the previous failures in that particular test,
I now see the failure...

checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

but now it has moved to the classpath subdirectory. So we are slowly
making progress here. Basically all the custom multilib code in libjava
has to be yanked in favor of Geoff's multi.m4 in config.
             Jack


On Mon, Nov 06, 2006 at 01:17:20PM +0000, Andrew Haley wrote:
> Jack Howarth writes:
>  > I should add that the proposed patch doesn't fail to build on a G5.
>  > The bootstrap and install completes as expected. So somehow this patch
>  > is incomplete in implementing Geoff's use of the new multi.m4. Unfortunately
>  > Geoff seems disinterested in fixing this so we will have to puzzle it
>  > out on our own.
> 
> OK.  Well, my problem is that I have no idea what the problem is.  gcj
> multilib in x86 GNU/Linux has been working more or less forever, and I
> don't know whay Darwin should have any particular difficulties.
> 
> Andrew.



More information about the Java mailing list