diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-08-17 03:03:21 +0200 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2006-08-17 01:03:21 +0000 |
commit | 97c074fd44a293120ac300f792994573ba5bd268 (patch) | |
tree | 95b7d3068d6d990fedb42e0c637b55e97c1f98bd /libjava/Makefile.am | |
parent | 9180c238de746a8883e81552d446c3359284b7dd (diff) | |
download | gcc-97c074fd44a293120ac300f792994573ba5bd268.tar.gz |
jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
gcc/java/ChangeLog
* jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
libjava/ChangeLog
* configure, Makefile.in: Rebuilt.
* Makefile.am (toolexeclib_LTLIBRARIES): Add libgcj_bc.la.
(libgcj_bc_la_SOURCES): New variable.
(libgcj_bc_la_LDFLAGS): Likewise.
(libgcj_bc_la_LIBADD): Likewise.
(libgcj_bc_la_DEPENDENCIES): Likewise.
(libgcj_bc_la_LINK): Likewise.
(libgcj_bc_dummy_LINK): Likewise.
(libgcj_bc.la): New target.
(install-exec-hook): Likewise.
* libgcj.spec.in (*lib): Use LIBGCJ_SPEC.
* libgcj_bc.c: New file.
* configure.ac (LIBGCJ_SPEC): New subst.
* configure.host (use_libgcj_bc): New variable.
Co-Authored-By: Bryce McKinlay <bryce@mckinlay.net.nz>
From-SVN: r116204
Diffstat (limited to 'libjava/Makefile.am')
-rw-r--r-- | libjava/Makefile.am | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 06049fd7d51..f04f993380a 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -36,6 +36,10 @@ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) toolexeclib_LTLIBRARIES = libgcj.la libgij.la libgcj-tools.la toolexecmainlib_DATA = libgcj.spec +if USE_LIBGCJ_BC +toolexeclib_LTLIBRARIES += libgcj_bc.la +endif + if XLIB_AWT toolexeclib_LTLIBRARIES += lib-gnu-awt-xlib.la endif @@ -277,6 +281,31 @@ lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) lib_gnu_awt_xlib_la_LINK = $(LIBLINK) +## Support for libgcj_bc: dummy shared library. +## +## This lets us have one soname in BC objects and another in C++ ABI objects. +libgcj_bc_la_SOURCES = libgcj_bc.c +libgcj_bc_la_LDFLAGS = -rpath $(toolexeclibdir) -no-static -version-info 1:0:0 +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. +## USE_LIBGCJ_BC shouldn't be set on other targets. +libgcj_bc_dummy_LINK = $(CC) -L$(here)/.libs $(CFLAGS) $(LDFLAGS) -shared \ + -fPIC -nostdlib + +## This rule creates the libgcj_bc dummy library in the .libs directory, for use +## when testing. +libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) + $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \ + $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) || exit; \ + rm .libs/libgcj_bc.so; \ + mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \ + $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ + -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \ + rm .libs/libgcj_bc.so.1; \ + $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1 + ## Note that property_files is defined in sources.am. propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files))) @@ -507,6 +536,22 @@ extra_headers = java/lang/Object.h java/lang/Class.h $(extra_headers) $(srcdir)/java/lang/Object.h $(srcdir)/java/lang/Class.h: @: +## Support for libgcj_bc: dummy shared library used only at link-time. +if USE_LIBGCJ_BC +## Install libgcj_bc dummy lib in the target directory. We also need to delete +## libtool's .la file, this prevents libtool resetting the lib again +## later. +install-exec-hook: install-toolexeclibLTLIBRARIES + @echo Installing dummy lib libgcj_bc.so.1.0.0; \ + rm $(toolexeclibdir)/libgcj_bc.so; \ + mv $(toolexeclibdir)/libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so; \ + $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ + -o $(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \ + rm $(toolexeclibdir)/libgcj_bc.so.1; \ + $(LN_S) libgcj_bc.so.1.0.0 $(toolexeclibdir)/libgcj_bc.so.1; \ + rm $(toolexeclibdir)/libgcj_bc.la; +endif + ## Install the headers. It is fairly ugly that we have to do this by ## hand. install-data-local: |