public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Nix <nix@esperi.org.uk>
Cc: java@gcc.gnu.org, Tom Tromey <tromey@redhat.com>
Subject: Re: [RFC PATCH] make libgcj_bc prims symbol sizes correct
Date: Mon, 17 Aug 2009 17:24:00 -0000	[thread overview]
Message-ID: <4A899226.8070705@redhat.com> (raw)
In-Reply-To: <4A892751.9050509@redhat.com>

This is what I went with.  On all systems which can use libgcj_bc,
Linux/{Free,Net,Open}BSD/Hurd and perhaps few others, USE_LIBGCJ_BC
is set.  In that case, we add

  %{findirect-dispatch:-fPIC}

to libgcj.spec, which causes all BC-compiled programs to be linked PIC.
PIC-compiled executables don't have copy relocs and do not depend on
symbols like _Jv_intClass having any particular size.

Please let me know if this works for you.

Andrew.


2009-08-17  Andrew Haley  <aph@redhat.com>

	* Makefile.am (libgcj_bc_la_LIBADD): Delete.
	* libgcj.spec.in: (LIBGCJ_BC_SPEC): New spec.
	* configure.ac (LIBGCJ_BC_SPEC): New spec.


Index: configure.ac
===================================================================
--- configure.ac	(revision 150834)
+++ configure.ac	(working copy)
@@ -1078,8 +1078,10 @@
 LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
 if test "$use_libgcj_bc" = yes; then
   LIBGCJ_SPEC="%{static|static-libgcj|!s-bc-abi:-lgcj;:-lgcj_bc}"
+  LIBGCJ_BC_SPEC="%{findirect-dispatch:-fPIC}"
 fi
 AC_SUBST(LIBGCJ_SPEC)
+AC_SUBST(LIBGCJ_BC_SPEC)

 HASH_SYNC_SPEC=
 # Hash synchronization is only useful with posix threads right now.
Index: libgcj.spec.in
===================================================================
--- libgcj.spec.in	(revision 150834)
+++ libgcj.spec.in	(working copy)
@@ -9,4 +9,4 @@
 %rename lib liborig
 *lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)

-*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ -fkeep-inline-functions
+*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 150834)
+++ Makefile.am	(working copy)
@@ -358,10 +358,10 @@
 ## Support for libgcj_bc: dummy shared library.
 ##
 ## This lets us have one soname in BC objects and another in C++ ABI objects.
+## 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)
-libgcj_bc_la_LIBADD = libgcj.la
 libgcj_bc_la_DEPENDENCIES = libgcj.la
 libgcj_bc_la_LINK = $(LIBLINK)
 ## This is specific to Linux/{Free,Net,Open}BSD/Hurd and perhaps few others.

  reply	other threads:[~2009-08-17 17:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-15  0:08 Nix
2009-08-15  8:56 ` Andrew Haley
2009-08-15  9:34   ` Andrew Haley
2009-08-15 19:13     ` Nix
2009-08-17  9:54       ` Andrew Haley
2009-08-17 17:24         ` Andrew Haley [this message]
2009-08-17 21:21           ` Nix
2009-08-18  8:42             ` Andrew Haley
2009-08-18 22:25               ` Nix

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=4A899226.8070705@redhat.com \
    --to=aph@redhat.com \
    --cc=java@gcc.gnu.org \
    --cc=nix@esperi.org.uk \
    --cc=tromey@redhat.com \
    /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).