Re: libjava broken on the trunk on i386-darwin8.11

View: New views
11 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: libjava broken on the trunk on i386-darwin8.11

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dave Korn wrote:
> Andrew Pinski wrote:
>> And this was caused by Dave Korn's change on the 2009-09-22.
>> He added -no-undefined to libgij_la_LDFLAGS which causes libtool to
>> remove -Wl,-undefined -Wl,dynamic_lookup from the link line.
>
>   Ow, sorry about that, I didn't know it would change things for Darwin.  I'll
> whip up a fix that adds the flag only for windows platforms, thanks for the
> bug report.

  I'm now bootstrapping this.  Andrew, would you like to check if it fixes
your problem on Darwin?

libjava/ChangeLog:

        * configure.host (libgcj_sublib_ltflags): New variable.
        * configure.ac (LIBGCJ_SUBLIB_LTFLAGS): AC_SUBST variable for
        the above in makefiles.
        * configure: Regenerate.

        * Makefile.am (libgcj_la_LDFLAGS_NOUNDEF): Rename from this ...
        (LIBJAVA_LDFLAGS_NOUNDEF): ... to this, initialise from
        LIBGCJ_SUBLIB_LTFLAGS (only when building sublibs), and ...
        (libgij_la_LDFLAGS, libgcj_tools_la_LDFLAGS, libjvm_la_LDFLAGS,
        lib_gnu_awt_xlib_la_LDFLAGS, libgcj_bc_la_LDFLAGS): ... use it in
        all these places to replace hard-coded -no-undefined and -bindir
        flags, as well as ...
        (libgcj_la_LDFLAGS): ... updating existing reference here.
        * Makefile.in: Regenerate.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.
        * gcj/Makefile.in: Likewise.


    cheers,
      DaveK


Index: configure.host
===================================================================
--- configure.host (revision 152310)
+++ configure.host (working copy)
@@ -18,6 +18,7 @@
 #   libgcj_cflags Special CFLAGS to use when building
 #   libgcj_cxxflags Special CXXFLAGS to use when building
 #   libgcj_javaflags Special JAVAFLAGS to use when building
+#   libgcj_sublib_ltflags  Special Libtool flags to use when building.
 #   libgcj_interpreter  If the bytecode interpreter supports this platform.
 #   enable_java_net_default  If java.net native code should be enabled by
 #                            default.
@@ -41,6 +42,7 @@ libgcj_flags=
 libgcj_cflags=
 libgcj_cxxflags=
 libgcj_javaflags=
+libgcj_sublib_ltflags=
 libgcj_interpreter=
 enable_java_net_default=yes
 enable_hash_synchronization_default=no
@@ -347,6 +349,7 @@ case "${host}" in
    BACKTRACESPEC=
  # Win32 DLLs are limited to 64k exported symbols each.
  enable_libgcj_sublibs_default=yes
+ libgcj_sublib_ltflags=-no-undefined -bindir $(bindir)
   ;;
 esac
 
Index: configure.ac
===================================================================
--- configure.ac (revision 152310)
+++ configure.ac (working copy)
@@ -206,11 +206,14 @@ AC_EXEEXT
 # libgcj_cflags    - host specific C compiler flags
 # libgcj_cxxflags  - host specific C++ compiler flags
 # libgcj_javaflags - host specific Java compiler flags
+# libgcj_sublib_ltflags - host specific Libtool flags
+#                          (only used when building sublibs)
 # and a number of others; see the list at the start of the file.
 
 libgcj_cflags=
 libgcj_cxxflags=
 libgcj_javaflags=
+libgcj_sublib_ltflags=
 
 . ${srcdir}/configure.host
 
@@ -223,11 +226,13 @@ fi
 LIBGCJ_CFLAGS="${libgcj_cflags}"
 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_SUBLIB_LTFLAGS="${libgcj_sublib_ltflags}"
 LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
 LIBGCJ_LD_SYMBOLIC_FUNCTIONS="${libgcj_ld_symbolic_functions}"
 AC_SUBST(LIBGCJ_CFLAGS)
 AC_SUBST(LIBGCJ_CXXFLAGS)
 AC_SUBST(LIBGCJ_JAVAFLAGS)
+AC_SUBST(LIBGCJ_SUBLIB_LTFLAGS)
 AC_SUBST(LIBGCJ_LD_SYMBOLIC)
 AC_SUBST(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 
Index: Makefile.am
===================================================================
--- Makefile.am (revision 152310)
+++ Makefile.am (working copy)
@@ -201,12 +201,12 @@ if BUILD_SUBLIBS
 toolexeclib_LTLIBRARIES += libgcj-noncore.la
 libgcj_noncore_la_LIBADD_SUBOBJECTS = $(NONCORE_PACKAGE_SOURCE_FILES_LO)
 libgcj_la_LIBADD_SUBOBJECTS = $(CORE_PACKAGE_SOURCE_FILES_LO)
-libgcj_la_LDFLAGS_NOUNDEF = -no-undefined -bindir $(bindir)
+LIBJAVA_LDFLAGS_NOUNDEF = $(LIBGCJ_SUBLIB_LTFLAGS)
 else
 # If not building sublibraries, everything goes in libgcj,
 # and it cannot be usefully built shared on PE platforms.
 libgcj_la_LIBADD_SUBOBJECTS = $(ALL_PACKAGE_SOURCE_FILES_LO)
-libgcj_la_LDFLAGS_NOUNDEF =
+LIBJAVA_LDFLAGS_NOUNDEF =
 endif
 
 if USE_LIBGCJ_BC
@@ -388,7 +388,7 @@ endif
 ## See jv_convert_LDADD.
 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
 ## The mysterious backslash in the grep pattern is consumed by make.
-libgij_la_LDFLAGS = -rpath $(toolexeclibdir) -no-undefined -bindir $(bindir) \
+libgij_la_LDFLAGS = -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 libgij_la_LINK = $(CXXLINK) $(libgij_la_LDFLAGS)
 
@@ -445,7 +445,7 @@ xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
 # certain linuxthread functions get linked:
 ## The mysterious backslash in the grep pattern is consumed by make.
 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
- $(LIBLTDL) $(SYS_ZLIBS) $(libgcj_la_LDFLAGS_NOUNDEF) \
+ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 libgcj_la_LIBADD = \
@@ -495,7 +495,7 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findire
  -fsource-filename=$(here)/classpath/tools/all-classes.lst
 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
 libgcj_tools_la_LIBADD = libgcj.la -lm
 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
 if BUILD_SUBLIBS
@@ -512,7 +512,7 @@ endif
 ## See jv_convert_LDADD.
 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC) \
- -no-undefined -bindir $(bindir)
+ $(LIBJAVA_LDFLAGS_NOUNDEF)
 libjvm_la_LINK = $(CXXLINK) $(libjvm_la_LDFLAGS)
 
 ## The .db file.  This rule is only used for native builds, so it is
@@ -542,7 +542,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \
 ## The mysterious backslash in the grep pattern is consumed by make.
 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
  @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-        -rpath $(toolexeclibdir) -no-undefined -bindir $(bindir) \
+        -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS)
 
@@ -552,7 +552,7 @@ lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_aw
 ## This library is not linked against libgcj.
 libgcj_bc_la_SOURCES = libgcj_bc.c
 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
 libgcj_bc_la_DEPENDENCIES = libgcj.la
 libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS)
 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.

Re: libjava broken on the trunk on i386-darwin8.11

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dave,

* Dave Korn wrote on Wed, Sep 30, 2009 at 03:47:51AM CEST:
> --- configure.host (revision 152310)
> +++ configure.host (working copy)

> @@ -347,6 +349,7 @@ case "${host}" in
>     BACKTRACESPEC=
>   # Win32 DLLs are limited to 64k exported symbols each.
>   enable_libgcj_sublibs_default=yes
> + libgcj_sublib_ltflags=-no-undefined -bindir $(bindir)

This is shell script, so you need to quote spaces on the right hand side
of the assignment, otherwise this is a temporary variable setting for
the duration of invoking a "-bindir" command.

More generally though, why don't you simply pass these flags
unconditionally on all systems, not just w32 ones?

Cheers,
Ralf

Re: libjava broken on the trunk on i386-darwin8.11

by Andrew Pinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 29, 2009 at 10:34 PM, Ralf Wildenhues
<Ralf.Wildenhues@...> wrote:

> Hi Dave,
>
> * Dave Korn wrote on Wed, Sep 30, 2009 at 03:47:51AM CEST:
>> --- configure.host    (revision 152310)
>> +++ configure.host    (working copy)
>
>> @@ -347,6 +349,7 @@ case "${host}" in
>>       BACKTRACESPEC=
>>       # Win32 DLLs are limited to 64k exported symbols each.
>>       enable_libgcj_sublibs_default=yes
>> +     libgcj_sublib_ltflags=-no-undefined -bindir $(bindir)
>
> This is shell script, so you need to quote spaces on the right hand side
> of the assignment, otherwise this is a temporary variable setting for
> the duration of invoking a "-bindir" command.
>
> More generally though, why don't you simply pass these flags
> unconditionally on all systems, not just w32 ones?
>

They were passed unconditionally and that broke darwin.  Which is the
reason for the change :).

Thanks,
Andrew Pinski

Re: libjava broken on the trunk on i386-darwin8.11

by Ralf Wildenhues :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Andrew Pinski wrote on Wed, Sep 30, 2009 at 07:50:24AM CEST:
> On Tue, Sep 29, 2009 at 10:34 PM, Ralf Wildenhues wrote:
> >
> > More generally though, why don't you simply pass these flags
> > unconditionally on all systems, not just w32 ones?
>
> They were passed unconditionally and that broke darwin.  Which is the
> reason for the change :).

Oh, sorry about that.  In that case however, why doesn't libjava on
Darwin have a link dependency on libiconv (or whatever library that
defines these symbols)?  Seems like the better fix to me.
(Did we already go through this?  I can't remember.)

Thanks,
Ralf

Re: libjava broken on the trunk on i386-darwin8.11

by Andrew Pinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 29, 2009 at 10:58 PM, Ralf Wildenhues
<Ralf.Wildenhues@...> wrote:

> * Andrew Pinski wrote on Wed, Sep 30, 2009 at 07:50:24AM CEST:
>> On Tue, Sep 29, 2009 at 10:34 PM, Ralf Wildenhues wrote:
>> >
>> > More generally though, why don't you simply pass these flags
>> > unconditionally on all systems, not just w32 ones?
>>
>> They were passed unconditionally and that broke darwin.  Which is the
>> reason for the change :).
>
> Oh, sorry about that.  In that case however, why doesn't libjava on
> Darwin have a link dependency on libiconv (or whatever library that
> defines these symbols)?  Seems like the better fix to me.
> (Did we already go through this?  I can't remember.)

it is not just libiconv but _environ also which is only supplied by
the dynamic linker and there is no library which contains that symbol.

Thanks,
Andrew Pinski

Re: libjava broken on the trunk on i386-darwin8.11

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ralf Wildenhues wrote:

> Hi Dave,
>
> * Dave Korn wrote on Wed, Sep 30, 2009 at 03:47:51AM CEST:
>> --- configure.host (revision 152310)
>> +++ configure.host (working copy)
>
>> @@ -347,6 +349,7 @@ case "${host}" in
>>     BACKTRACESPEC=
>>   # Win32 DLLs are limited to 64k exported symbols each.
>>   enable_libgcj_sublibs_default=yes
>> + libgcj_sublib_ltflags=-no-undefined -bindir $(bindir)
>
> This is shell script, so you need to quote spaces on the right hand side
> of the assignment, otherwise this is a temporary variable setting for
> the duration of invoking a "-bindir" command.

  That's just one of the many hazards of writing a patch at 4 am and hoping
it'll be right so that you'll have a successful build available when you wake
up!  Sigh...

> checking for fastjar... no
> checking for gjar... no
> checking for zip... /usr/bin/zip
> checking for unzip... /usr/bin/unzip
> checking whether to enable maintainer-specific portions of Makefiles... no
> /gnu/gcc/gcc-unpatched/libjava/configure.host: line 352: bindir: command not found
> /gnu/gcc/gcc-unpatched/libjava/configure.host: line 352: -bindir: command not found
> checking if the linker (/gnu/gcc/obj-java-pinski/./gcc/collect-ld) is GNU ld...

... also looks like I need to escape that dollar sign, rather than trying to
expand a makefile variable in a bash script...

  I'll have the respin up shortly.

    cheers,
      DaveK


[PATCH] Re: libjava broken on the trunk on i386-darwin8.11

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dave Korn wrote:

>   I'm now bootstrapping this.  Andrew, would you like to check if it fixes
> your problem on Darwin?

  As we see upthread, the first spin lacked some quoting.  Here's the fixed
version, tested by blowing away the $target/libjava directory and rebuilding
with "make configure-target-libjava all-target-libjava install-target-libjava"
(using DESTDIR for the install stage).  Build completed successfully and
verified manually that the correct definition of LIBGCJ_SUBLIB_LTFLAGS made it
into the generated $target/libjava/Makefile and the correct files got
installed into the correct locations in the DESTDIR, for
target=i686-pc-cygwin.  Same ChangeLog as before:

> libjava/ChangeLog:
>
> * configure.host (libgcj_sublib_ltflags): New variable.
> * configure.ac (LIBGCJ_SUBLIB_LTFLAGS): AC_SUBST variable for
> the above in makefiles.
> * configure: Regenerate.
>
> * Makefile.am (libgcj_la_LDFLAGS_NOUNDEF): Rename from this ...
> (LIBJAVA_LDFLAGS_NOUNDEF): ... to this, initialise from
> LIBGCJ_SUBLIB_LTFLAGS (only when building sublibs), and ...
> (libgij_la_LDFLAGS, libgcj_tools_la_LDFLAGS, libjvm_la_LDFLAGS,
> lib_gnu_awt_xlib_la_LDFLAGS, libgcj_bc_la_LDFLAGS): ... use it in
> all these places to replace hard-coded -no-undefined and -bindir
> flags, as well as ...
> (libgcj_la_LDFLAGS): ... updating existing reference here.
> * Makefile.in: Regenerate.
> * include/Makefile.in: Likewise.
> * testsuite/Makefile.in: Likewise.
> * gcj/Makefile.in: Likewise.
  Tests running now, assuming no regressions OK for head?

    cheers,
      DaveK


Index: libjava/configure.host
===================================================================
--- libjava/configure.host (revision 152317)
+++ libjava/configure.host (working copy)
@@ -18,6 +18,7 @@
 #   libgcj_cflags Special CFLAGS to use when building
 #   libgcj_cxxflags Special CXXFLAGS to use when building
 #   libgcj_javaflags Special JAVAFLAGS to use when building
+#   libgcj_sublib_ltflags  Special Libtool flags to use when building.
 #   libgcj_interpreter  If the bytecode interpreter supports this platform.
 #   enable_java_net_default  If java.net native code should be enabled by
 #                            default.
@@ -41,6 +42,7 @@ libgcj_flags=
 libgcj_cflags=
 libgcj_cxxflags=
 libgcj_javaflags=
+libgcj_sublib_ltflags=
 libgcj_interpreter=
 enable_java_net_default=yes
 enable_hash_synchronization_default=no
@@ -347,6 +349,7 @@ case "${host}" in
    BACKTRACESPEC=
  # Win32 DLLs are limited to 64k exported symbols each.
  enable_libgcj_sublibs_default=yes
+ libgcj_sublib_ltflags='-no-undefined -bindir $(bindir)'
   ;;
 esac
 
Index: libjava/configure.ac
===================================================================
--- libjava/configure.ac (revision 152317)
+++ libjava/configure.ac (working copy)
@@ -206,11 +206,14 @@ AC_EXEEXT
 # libgcj_cflags    - host specific C compiler flags
 # libgcj_cxxflags  - host specific C++ compiler flags
 # libgcj_javaflags - host specific Java compiler flags
+# libgcj_sublib_ltflags - host specific Libtool flags
+#                          (only used when building sublibs)
 # and a number of others; see the list at the start of the file.
 
 libgcj_cflags=
 libgcj_cxxflags=
 libgcj_javaflags=
+libgcj_sublib_ltflags=
 
 . ${srcdir}/configure.host
 
@@ -223,11 +226,13 @@ fi
 LIBGCJ_CFLAGS="${libgcj_cflags}"
 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_SUBLIB_LTFLAGS="${libgcj_sublib_ltflags}"
 LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
 LIBGCJ_LD_SYMBOLIC_FUNCTIONS="${libgcj_ld_symbolic_functions}"
 AC_SUBST(LIBGCJ_CFLAGS)
 AC_SUBST(LIBGCJ_CXXFLAGS)
 AC_SUBST(LIBGCJ_JAVAFLAGS)
+AC_SUBST(LIBGCJ_SUBLIB_LTFLAGS)
 AC_SUBST(LIBGCJ_LD_SYMBOLIC)
 AC_SUBST(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am (revision 152317)
+++ libjava/Makefile.am (working copy)
@@ -201,12 +201,12 @@ if BUILD_SUBLIBS
 toolexeclib_LTLIBRARIES += libgcj-noncore.la
 libgcj_noncore_la_LIBADD_SUBOBJECTS = $(NONCORE_PACKAGE_SOURCE_FILES_LO)
 libgcj_la_LIBADD_SUBOBJECTS = $(CORE_PACKAGE_SOURCE_FILES_LO)
-libgcj_la_LDFLAGS_NOUNDEF = -no-undefined -bindir $(bindir)
+LIBJAVA_LDFLAGS_NOUNDEF = $(LIBGCJ_SUBLIB_LTFLAGS)
 else
 # If not building sublibraries, everything goes in libgcj,
 # and it cannot be usefully built shared on PE platforms.
 libgcj_la_LIBADD_SUBOBJECTS = $(ALL_PACKAGE_SOURCE_FILES_LO)
-libgcj_la_LDFLAGS_NOUNDEF =
+LIBJAVA_LDFLAGS_NOUNDEF =
 endif
 
 if USE_LIBGCJ_BC
@@ -388,7 +388,7 @@ endif
 ## See jv_convert_LDADD.
 libgij_la_LIBADD = -L$(here)/.libs libgcj.la
 ## The mysterious backslash in the grep pattern is consumed by make.
-libgij_la_LDFLAGS = -rpath $(toolexeclibdir) -no-undefined -bindir $(bindir) \
+libgij_la_LDFLAGS = -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 libgij_la_LINK = $(CXXLINK) $(libgij_la_LDFLAGS)
 
@@ -445,7 +445,7 @@ xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
 # certain linuxthread functions get linked:
 ## The mysterious backslash in the grep pattern is consumed by make.
 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
- $(LIBLTDL) $(SYS_ZLIBS) $(libgcj_la_LDFLAGS_NOUNDEF) \
+ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \
  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
  $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS)
 libgcj_la_LIBADD = \
@@ -495,7 +495,7 @@ libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findire
  -fsource-filename=$(here)/classpath/tools/all-classes.lst
 libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \
  -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
 libgcj_tools_la_LIBADD = libgcj.la -lm
 libgcj_tools_la_DEPENDENCIES = libgcj.la libgcj.spec
 if BUILD_SUBLIBS
@@ -512,7 +512,7 @@ endif
 ## See jv_convert_LDADD.
 libjvm_la_LIBADD = -L$(here)/.libs libgcj.la
 libjvm_la_LDFLAGS = -avoid-version $(LIBGCJ_LD_SYMBOLIC) \
- -no-undefined -bindir $(bindir)
+ $(LIBJAVA_LDFLAGS_NOUNDEF)
 libjvm_la_LINK = $(CXXLINK) $(libjvm_la_LDFLAGS)
 
 ## The .db file.  This rule is only used for native builds, so it is
@@ -542,7 +542,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \
 ## The mysterious backslash in the grep pattern is consumed by make.
 lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \
  @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \
-        -rpath $(toolexeclibdir) -no-undefined -bindir $(bindir) \
+        -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \
         -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_awt_xlib_la_LDFLAGS)
 
@@ -552,7 +552,7 @@ lib_gnu_awt_xlib_la_LINK = $(LIBLINK) $(lib_gnu_aw
 ## This library is not linked against libgcj.
 libgcj_bc_la_SOURCES = libgcj_bc.c
 libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 \
- $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) -no-undefined -bindir $(bindir)
+ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBJAVA_LDFLAGS_NOUNDEF)
 libgcj_bc_la_DEPENDENCIES = libgcj.la
 libgcj_bc_la_LINK = $(LIBLINK) $(libgcj_bc_la_LDFLAGS)
 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.

Re: [PATCH] Re: libjava broken on the trunk on i386-darwin8.11

by Andrew Haley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dave Korn wrote:

> Dave Korn wrote:
>
>>   I'm now bootstrapping this.  Andrew, would you like to check if it fixes
>> your problem on Darwin?
>
>   As we see upthread, the first spin lacked some quoting.  Here's the fixed
> version, tested by blowing away the $target/libjava directory and rebuilding
> with "make configure-target-libjava all-target-libjava install-target-libjava"
> (using DESTDIR for the install stage).  Build completed successfully and
> verified manually that the correct definition of LIBGCJ_SUBLIB_LTFLAGS made it
> into the generated $target/libjava/Makefile and the correct files got
> installed into the correct locations in the DESTDIR, for
> target=i686-pc-cygwin.  Same ChangeLog as before:
>
>> libjava/ChangeLog:
>>
>> * configure.host (libgcj_sublib_ltflags): New variable.
>> * configure.ac (LIBGCJ_SUBLIB_LTFLAGS): AC_SUBST variable for
>> the above in makefiles.
>> * configure: Regenerate.
>>
>> * Makefile.am (libgcj_la_LDFLAGS_NOUNDEF): Rename from this ...
>> (LIBJAVA_LDFLAGS_NOUNDEF): ... to this, initialise from
>> LIBGCJ_SUBLIB_LTFLAGS (only when building sublibs), and ...
>> (libgij_la_LDFLAGS, libgcj_tools_la_LDFLAGS, libjvm_la_LDFLAGS,
>> lib_gnu_awt_xlib_la_LDFLAGS, libgcj_bc_la_LDFLAGS): ... use it in
>> all these places to replace hard-coded -no-undefined and -bindir
>> flags, as well as ...
>> (libgcj_la_LDFLAGS): ... updating existing reference here.
>> * Makefile.in: Regenerate.
>> * include/Makefile.in: Likewise.
>> * testsuite/Makefile.in: Likewise.
>> * gcj/Makefile.in: Likewise.
>
>   Tests running now, assuming no regressions OK for head?

Sure.  Andrew Pinski, is this OK?

Andrew.

Re: [PATCH] Re: libjava broken on the trunk on i386-darwin8.11

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Haley wrote:
> Dave Korn wrote:

>>   Tests running now, assuming no regressions OK for head?
>
> Sure.  Andrew Pinski, is this OK?

  Tests passed with usual results:
http://gcc.gnu.org/ml/gcc-testresults/2009-09/msg02784.html

  Just waiting to hear from AP that it fixes his problem before I commit.

    cheers,
      DaveK

Re: [PATCH] Re: libjava broken on the trunk on i386-darwin8.11

by Andrew Pinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 30, 2009 at 6:56 AM, Andrew Haley <aph@...> wrote:
> Sure.  Andrew Pinski, is this OK?

Sorry I did not get back until now, I had to update my autoconf and automake.

YES this works on i386-darwin8.11.

Thanks,
Andrew Pinski

Re: [PATCH] Re: libjava broken on the trunk on i386-darwin8.11

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Pinski wrote:
> On Wed, Sep 30, 2009 at 6:56 AM, Andrew Haley <aph@...> wrote:
>> Sure.  Andrew Pinski, is this OK?
>
> Sorry I did not get back until now, I had to update my autoconf and automake.
>
> YES this works on i386-darwin8.11.

  Thanks for verifying!  Committed at r.152347.

    cheers,
      DaveK