aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libjava/ChangeLog13
-rw-r--r--libjava/Makefile.am6
-rw-r--r--libjava/Makefile.in13
-rwxr-xr-xlibjava/configure5
-rw-r--r--libjava/configure.ac5
-rw-r--r--libjava/ecjx.cc1
6 files changed, 34 insertions, 9 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 25d1aab..a13b884 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,16 @@
+2008-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgcj/38396
+ * configure.ac (use_libgcj_bc): Set to no if not enable_shared.
+ (LIBGCJ_SPEC): Use -lgcj instead of -lgcj_bc even for -static
+ or -static-libgcj.
+ * Makefile.am (ecjx_SOURCES): Add ecjx.cc.
+ (ecjx_LDADD): Don't add libgcj.la when
+ NATIVE && USE_LIBBGCJ_BC.
+ * ecjx.cc: New file.
+ * Makefile.in: Regenerated.
+ * configure: Regenerated.
+
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index e3ed9b9..d94bb11 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -868,7 +868,7 @@ gij_LDADD = -L$(here)/.libs libgij.la
gij_DEPENDENCIES = libgij.la
## Build an ecjx from a .jar.
-ecjx_SOURCES =
+ecjx_SOURCES = ecjx.cc
## We use the BC ABI here so that we don't need to compile ecj.jar.
## Hopefully the user has compiled it into his system .db.
## However, even if not it will run reasonably quickly.
@@ -888,10 +888,12 @@ else !ENABLE_SHARED
ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR) -fbootclasspath=$(BOOTCLASSPATH)
endif !ENABLE_SHARED
-ecjx_LDADD = -L$(here)/.libs libgcj.la
+ecjx_LDADD = -L$(here)/.libs
ecjx_DEPENDENCIES = libgcj.la libgcj.spec
if USE_LIBGCJ_BC
ecjx_DEPENDENCIES += libgcj_bc.la
+else
+ecjx_LDADD += libgcj.la
endif
else !NATIVE
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 0a24840..81ac0d3 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -76,7 +76,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \
$(top_srcdir)/scripts/jar.in COPYING ChangeLog NEWS THANKS
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am__append_19 = gen-from-JIS
@NATIVE_TRUE@@USE_LIBGCJ_BC_TRUE@am__append_20 = libgcj_bc.la
-@XLIB_AWT_TRUE@am__append_21 = $(xlib_nat_headers)
+@NATIVE_TRUE@@USE_LIBGCJ_BC_FALSE@am__append_21 = libgcj.la
+@XLIB_AWT_TRUE@am__append_22 = $(xlib_nat_headers)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \
@@ -467,8 +468,9 @@ libexecsubPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am__EXEEXT_4 = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gen-from-JIS$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(libexecsub_PROGRAMS) $(noinst_PROGRAMS)
-am_ecjx_OBJECTS =
+am_ecjx_OBJECTS = ecjx.$(OBJEXT)
ecjx_OBJECTS = $(am_ecjx_OBJECTS)
+@NATIVE_TRUE@@USE_LIBGCJ_BC_FALSE@am__DEPENDENCIES_6 = libgcj.la
am_gappletviewer_OBJECTS =
gappletviewer_OBJECTS = $(am_gappletviewer_OBJECTS)
am_gc_analyze_OBJECTS =
@@ -8343,7 +8345,7 @@ gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \
gij_LINK = $(GCJLINK)
gij_LDADD = -L$(here)/.libs libgij.la
gij_DEPENDENCIES = libgij.la
-ecjx_SOURCES =
+ecjx_SOURCES = ecjx.cc
ECJX_BASE_FLAGS = -findirect-dispatch \
--main=org.eclipse.jdt.internal.compiler.batch.GCCMain
@@ -8353,7 +8355,7 @@ ECJX_BASE_FLAGS = -findirect-dispatch \
@ENABLE_SHARED_TRUE@@NATIVE_TRUE@ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) -Djava.class.path=$(ECJ_JAR)
@NATIVE_FALSE@ecjx_LDFLAGS = $(ECJX_BASE_FLAGS) $(ECJ_BUILD_JAR)
@NATIVE_FALSE@ecjx_LDADD =
-@NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs libgcj.la
+@NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs $(am__append_21)
@NATIVE_FALSE@ecjx_DEPENDENCIES =
@NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec \
@NATIVE_TRUE@ $(am__append_20)
@@ -8572,7 +8574,7 @@ gnu/gcj/xlib/natXImage.cc \
gnu/gcj/xlib/natXUnmapEvent.cc
sourcesdir = $(jardir)
-headers_to_make = $(nat_headers) $(am__append_21)
+headers_to_make = $(nat_headers) $(am__append_22)
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
@@ -9554,6 +9556,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boehm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwin.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/defineclass.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecjx.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gij.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret.Plo@am__quote@
diff --git a/libjava/configure b/libjava/configure
index 6d35e46..224ed4c 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -20903,6 +20903,9 @@ else
USING_NO_THREADS_FALSE=
fi
+if test "$enable_shared" != yes; then
+ use_libgcj_bc=no
+fi
if test "$use_libgcj_bc" = yes; then
@@ -20924,7 +20927,7 @@ if test -d sysdep; then true; else mkdir sysdep; fi
LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
if test "$use_libgcj_bc" = yes; then
- LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
+ LIBGCJ_SPEC="%{static|static-libgcj|!s-bc-abi:-lgcj;:-lgcj_bc}"
fi
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 6844057..91adc20 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1046,6 +1046,9 @@ AC_SUBST(THREADCXXFLAGS)
AM_CONDITIONAL(USING_POSIX_THREADS, test "$THREADS" = posix)
AM_CONDITIONAL(USING_WIN32_THREADS, test "$THREADS" = win32)
AM_CONDITIONAL(USING_NO_THREADS, test "$THREADS" = none)
+if test "$enable_shared" != yes; then
+ use_libgcj_bc=no
+fi
AM_CONDITIONAL(USE_LIBGCJ_BC, test "$use_libgcj_bc" = yes)
if test -d sysdep; then true; else mkdir sysdep; fi
@@ -1055,7 +1058,7 @@ AC_CONFIG_LINKS(sysdep/descriptor.h:$descriptor_h)
LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
if test "$use_libgcj_bc" = yes; then
- LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
+ LIBGCJ_SPEC="%{static|static-libgcj|!s-bc-abi:-lgcj;:-lgcj_bc}"
fi
AC_SUBST(LIBGCJ_SPEC)
diff --git a/libjava/ecjx.cc b/libjava/ecjx.cc
new file mode 100644
index 0000000..4fa662b
--- /dev/null
+++ b/libjava/ecjx.cc
@@ -0,0 +1 @@
+// Dummy