From: Jack Howarth <howarth@bromo.med.uc.edu>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] corrected ChangeLog - replace hardcoded -lm in libgcj.spec.in for darwin
Date: Thu, 19 Aug 2010 16:08:00 -0000 [thread overview]
Message-ID: <20100819160032.GA6163@bromo.med.uc.edu> (raw)
This is the previously approved patch with unnecessary entries
for regenerated Makefile.in's removed from the ChangeLog.
Jack
----------------------------------------------------------------------------
The attached patch replaces the hard-coded -lm in libjava/libgcj.spec.in
with the contents of LIBMATHSPEC as conditionally defined in configure.ac.
Bootstrapped and regression tested on x86_64-apple-darwin10. Okay for gcc
trunk?
Jack
ps Before this patch "gcj --main=testme -O testme.java" produced...
/sw/lib/gcc4.6/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/sw/lib/gcc4.6/lib/libgcj.12.dylib (compatibility version 13.0.0, current version 13.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
whereas with the patch libSystem properly appears last...
/sw/lib/gcc4.6/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/sw/lib/gcc4.6/lib/libgcj.12.dylib (compatibility version 13.0.0, current version 13.0.0)
/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
The separation of /sw/lib/gcc4.6/lib/libgcc_s.1.dylib and /usr/lib/libSystem.B.dylib in the linkage
order appears due to the duplicate -lgcc_ext.10.5 occurances in the linkage as a result of -shared-libgcc...
COLLECT_GCC_OPTIONS= '-mmacosx-version-min=10.6.5' '-v' '-O' '-shared-libgcc' '-mtune=generic'
/sw/lib/gcc4.6/libexec/gcc/x86_64-apple-darwin10.5.0/4.6.0/collect2 -dynamic -arch x86_64 -macosx_version_min 10.6.5 -weak_reference_mismatches non-weak -o a.out -lcrt1.10.5.o -L/sw/lib/gcc4.6/lib/gcc/x86_64-apple-darwin10.5.0/4.6.0 -L/sw/lib/gcc4.6/lib/gcc/x86_64-apple-darwin10.5.0/4.6.0/../../.. /var/tmp//cclJxmz2.o /var/tmp//ccKe7aS5.o -lgcc_ext.10.5 -lgcj -L/sw/lib -liconv -lz -allow_stack_execute -lgcc_ext.10.5 -lSystem
2010-08-18 Jack Howarth <howarth@bromo.med.uc.edu>
* libjava/configure.ac: Set LIBMATHSPEC to -lm except on darwin.
* libjava/libgcj.spec.in: Use LIBMATHSPEC.
* libjava/configure: Regenerate.
Index: libjava/configure.ac
===================================================================
--- libjava/configure.ac (revision 163335)
+++ libjava/configure.ac (working copy)
@@ -928,6 +928,16 @@
;;
esac
+LIBMATHSPEC=
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin*)
+ ;;
+*)
+ LIBMATHSPEC=-lm
+ ;;
+esac
+
# Check for --no-merge-exidx-entries, an ARM-specific linker option.
AC_CACHE_CHECK([for --no-merge-exidx-entries], [libgcj_cv_exidx],
[saved_ldflags="$LDFLAGS"
@@ -953,6 +963,7 @@
AC_SUBST(extra_ldflags_libjava)
AC_SUBST(extra_ldflags)
AC_SUBST(LIBSTDCXXSPEC)
+AC_SUBST(LIBMATHSPEC)
AC_SUBST(LIBGCJTESTSPEC)
Index: libjava/libgcj.spec.in
===================================================================
--- libjava/libgcj.spec.in (revision 163335)
+++ libjava/libgcj.spec.in (working copy)
@@ -7,6 +7,6 @@
*startfile: @THREADSTARTFILESPEC@ %(startfileorig)
%rename lib liborig
-*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
+*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ @LIBMATHSPEC@ @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions
reply other threads:[~2010-08-19 16:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100819160032.GA6163@bromo.med.uc.edu \
--to=howarth@bromo.med.uc.edu \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).