This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix libgij.so relinking


Hi!

Without this patch I'm getting
...
/usr/bin/ld: cannot find -lgcj
collect2: ld returned 1 exit status
libtool: install: error: relink `libgij.la' with the above command before installing it

during make install in libjava.
This patch handles libgij the same as other shared libraries in libjava.
Ok to commit?

2005-01-24  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.am (libgij_la_LIBADD): Add -L$(here)/.libs.
	(libgij_la_LDFLAGS): Add.
	* Makefile.in: Rebuilt.

--- libjava/Makefile.am.jj	2004-12-30 04:39:38.000000000 -0500
+++ libjava/Makefile.am	2004-12-31 11:53:06.000000000 -0500
@@ -203,8 +203,12 @@ AM_CPPFLAGS = -I$(top_srcdir) -Iinclude 
 ##
 
 libgij_la_SOURCES = gij.cc
-libgij_la_LIBADD = libgcj.la
 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
+## See jv_convert_LDADD.
+libgij_la_LIBADD = -L$(here)/.libs libgcj.la
+## The mysterious backslash in the grep pattern is consumed by make.
+libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
+        -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 
 libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
 	link.cc defineclass.cc interpret.cc verify.cc \
--- libjava/Makefile.in.jj	2004-12-30 04:39:38.000000000 -0500
+++ libjava/Makefile.in	2004-12-31 12:06:23.000000000 -0500
@@ -4603,8 +4603,10 @@ AM_CPPFLAGS = -I$(top_srcdir) -Iinclude 
 	$(GCC_UNWIND_INCLUDE) $(ZINCS) $(LIBFFIINCS)
 
 libgij_la_SOURCES = gij.cc
-libgij_la_LIBADD = libgcj.la
 libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
+libgij_la_LIBADD = -L$(here)/.libs libgcj.la
+libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
+        -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
 libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
 	link.cc defineclass.cc interpret.cc verify.cc \
 	$(nat_source_files) $(math_c_source_files) $(java_source_files) \

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]