public inbox for
 help / color / mirror / Atom feed
* [PATCH] link libgcj directly to libiconv to resolve symbols
@ 2013-07-05 13:51 Jack Howarth
  0 siblings, 0 replies; only message in thread
From: Jack Howarth @ 2013-07-05 13:51 UTC (permalink / raw)
  To: java; +Cc: per, aph, tromey

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

   Currently the build of the libgcj shared library in libjava omits a direct linkage against the
libiconv shared library to resolve the undefined _libiconv, _libiconv_close and _libiconv_open
symbols in libgcj. My understanding of shared library best practices is that shared libraries
should always be linked directly to the those shared libraries required to resolve their undefined
symbols rather than postponing this linkage until when the shared library is used (as is currently
done in libjava/
   The attached patch achieves this by removing the @LIBMATHSPEC@ from *lib: in libjava/
and moving it as $(LDLIBICONV) onto libgcj_la_LDFLAGS in libjava/ and libjava/ 
Bootstrap and regression tested on x86_64-apple-darwin12 for gcc trunk and gcc-4_8-branch.
Okay for gcc trunk and gcc-4_8-branch?

[-- Attachment #2: link_libgcj_to_libiconv.diff --]
[-- Type: text/plain, Size: 2336 bytes --]

2013-07-05  Jack Howarth  <>


        PR java/49441 
        * (*lib:): Remove @LDLIBICONV@.
        * (libgcj_la_LDFLAGS): Add $(LDLIBICONV).
	* (libgcj_la_LDFLAGS): Regenerated.

Index: libjava/
--- libjava/	(revision 200713)
+++ libjava/	(working copy)
@@ -7,6 +7,6 @@
 *startfile: @THREADSTARTFILESPEC@ %(startfileorig)
 %rename lib liborig
Index: libjava/
--- libjava/	(revision 200713)
+++ libjava/	(working copy)
@@ -492,7 +492,7 @@ xlib_nat_files = $(xlib_nat_source_files
 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
 	-version-info `grep -v '^\#' $(srcdir)/libtool-version` \
 libgcj_la_LIBADD = \
 	classpath/native/fdlibm/ \
 	java/lang/Object.lo \
Index: configure
--- configure	(revision 200713)
+++ configure	(working copy)
@@ -7416,6 +7416,13 @@ if test x${is_cross_compiler} = xyes ; t
   target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
+# Pass --with-sysroot on darwin without SDK in /
+case "${target}" in
+  x86_64-*-darwin1[3-9]*)
+    host_configargs="--with-sysroot=\"`xcrun --show-sdk-path`\"  ${host_configargs}"
+    ;;
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
   target_configargs="--enable-multilib ${target_configargs}"

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

only message in thread, other threads:[~2013-07-05 13:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-05 13:51 [PATCH] link libgcj directly to libiconv to resolve symbols 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).