public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* why doesn't libgcj link against libiconv?
@ 2011-06-16 14:33 Jack Howarth
  2011-06-16 14:54 ` Jack Howarth
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Howarth @ 2011-06-16 14:33 UTC (permalink / raw)
  To: java

   I am running into a very odd bug on darwin with both gcc-4_6-branch
and gcc trunk. Last year I added a patch to insure that when gcc was
built with -with-libiconv-prefix=/sw, that libgcj.spec would provide the
necessary linkage "-L/sw/lib -liconv" to access the correct libiconv.
For some unknown reason the installed libgcj.spec now loses LDLIBICONV.
The weird part is that the libgcj.spec generated in the build directory
still has it...

[MacPro:~] howarth% cd /sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin11.0.0/libjava
[MacPro:darwin_objdir/x86_64-apple-darwin11.0.0/libjava] howarth% more libgcj.spec
#
# This spec file is read by gcj when linking.
# It is used to specify the standard libraries we need in order
# to link with libgcj.
#
%rename startfile startfileorig
*startfile:  %(startfileorig)

%rename lib liborig
*lib:  %{s-bc-abi:} -lgcj    -L/sw/lib -liconv    -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}  %(libgcc)  %(liborig) -no_pie

*jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions     -fkeep-inline-functions

but the installed libgcc.spec doesn't...

[MacPro:~] howarth% cd /sw/lib/gcc4.7/lib
[MacPro:lib/gcc4.7/lib] howarth% more libgcj.spec
#
# This spec file is read by gcj when linking.
# It is used to specify the standard libraries we need in order
# to link with libgcj.
#
%rename startfile startfileorig
*startfile:  %(startfileorig)

%rename lib liborig
*lib:  %{s-bc-abi:} -lgcj        -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}  %(libgcc)  %(liborig) -no_pie

*jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions     -fkeep-inline-functions


Note that I hardcoded -no_pie I added to libgcj.spec.in is retained.
     I am wondering if we really need to have @LDLIBICONV@ in libgcj.spec.in to solve this. Why can't 
we simply pass @LDLIBICONV@ to the linkage of libgcj itself so that libgcj,dylib is directly linked against the appropriate
libiconv to resolve those iconv symbols? Would this approach be acceptable?
              Jack

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: why doesn't libgcj link against libiconv?
  2011-06-16 14:33 why doesn't libgcj link against libiconv? Jack Howarth
@ 2011-06-16 14:54 ` Jack Howarth
  0 siblings, 0 replies; 2+ messages in thread
From: Jack Howarth @ 2011-06-16 14:54 UTC (permalink / raw)
  To: java; +Cc: Ralf.Wildenhues

On Thu, Jun 16, 2011 at 10:33:19AM -0400, Jack Howarth wrote:
>    I am running into a very odd bug on darwin with both gcc-4_6-branch
> and gcc trunk. Last year I added a patch to insure that when gcc was
> built with -with-libiconv-prefix=/sw, that libgcj.spec would provide the
> necessary linkage "-L/sw/lib -liconv" to access the correct libiconv.
> For some unknown reason the installed libgcj.spec now loses LDLIBICONV.
> The weird part is that the libgcj.spec generated in the build directory
> still has it...
> 
> [MacPro:~] howarth% cd /sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin11.0.0/libjava
> [MacPro:darwin_objdir/x86_64-apple-darwin11.0.0/libjava] howarth% more libgcj.spec
> #
> # This spec file is read by gcj when linking.
> # It is used to specify the standard libraries we need in order
> # to link with libgcj.
> #
> %rename startfile startfileorig
> *startfile:  %(startfileorig)
> 
> %rename lib liborig
> *lib:  %{s-bc-abi:} -lgcj    -L/sw/lib -liconv    -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}  %(libgcc)  %(liborig) -no_pie
> 
> *jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions     -fkeep-inline-functions
> 
> but the installed libgcc.spec doesn't...
> 
> [MacPro:~] howarth% cd /sw/lib/gcc4.7/lib
> [MacPro:lib/gcc4.7/lib] howarth% more libgcj.spec
> #
> # This spec file is read by gcj when linking.
> # It is used to specify the standard libraries we need in order
> # to link with libgcj.
> #
> %rename startfile startfileorig
> *startfile:  %(startfileorig)
> 
> %rename lib liborig
> *lib:  %{s-bc-abi:} -lgcj        -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}  %(libgcc)  %(liborig) -no_pie
> 
> *jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions     -fkeep-inline-functions
> 
> 
> Note that I hardcoded -no_pie I added to libgcj.spec.in is retained.
>      I am wondering if we really need to have @LDLIBICONV@ in libgcj.spec.in to solve this. Why can't 
> we simply pass @LDLIBICONV@ to the linkage of libgcj itself so that libgcj,dylib is directly linked against the appropriate
> libiconv to resolve those iconv symbols? Would this approach be acceptable?
>               Jack

I've opened PR49441 as I suspect this breakage was caused by...

------------------------------------------------------------------------
r169822 | rwild | 2011-02-04 00:51:57 -0500 (Fri, 04 Feb 2011) | 12 lines

Fix PR java/21206: Unrecognized option '-Wl,-rpath' for jv-convert

libjava/:
        PR java/21206
        * configure.ac (LDLIBICONV): New substituted variable, with
        instances of '-Wl,' removed from LIBICONV.
        * configure: Regenerate.
        * libgcj.spec.in: Use @LDLIBICONV@ not @LIBICONV@.
        * Makefile.in: Regenerate.
        * gcj/Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-16 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-16 14:33 why doesn't libgcj link against libiconv? Jack Howarth
2011-06-16 14:54 ` Jack Howarth

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