This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: --disable-static
Bryce McKinlay wrote:
> Tom Tromey wrote:
>
> > Bryce> I would like to be able to do this. However, the build fails
> > Bryce> due to missing libffi symbols when linking jv-convert. This is
> > Bryce> the same error I was seeing with multilib builds on
> > Bryce> Alpha. Maybe we should just install a libffi shared library??
> >
> > I might have a fix for this.
> > I'll probably check it in today.
>
> Thanks.
>
> Now I get a different error when trying to use "--disable-static":
Actually, the error occurs all the time, if your building libgcj outside the gcc
tree. Someone has put in some dirty hacks that assume "../libstdc++" exists. The
attached patch gets rid of that, and also removes "-L$(here)" which is an
inapropriate flag for $JAVAC. (this needs to be applied to Makefile.am as well)
The old problem with "--disable-static" and libffi persists, however. The problem
is this line in the makefile:
libffi_files = `$(AR) t ../libffi/.libs/libffi.a 2>/dev/null | sed 's/\.o/\.lo/g'
| sed 's/^/..\/libffi\//g'`
libffi.a does not exist when doing a "--disable-static" or alpha multilib build.
The linker does not seem to complain about this, but of course the libffi stuff is
missing from the libgcj.so, resulting in link errors for jv-convert etc. I guess
we need to install a libffi shared library (any reason why not?), or hack libffi's
makefile to ignore disable-static, or something.
regards
[ bryce ]
Index: Makefile.in
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.in,v
retrieving revision 1.67
diff -u -r1.67 Makefile.in
--- Makefile.in 2000/05/01 21:36:39 1.67
+++ Makefile.in 2000/05/04 09:40:49
@@ -204,7 +204,7 @@
libgcj_la_LIBADD = $(javao_files) $(nat_files) $(c_files) $(GCOBJS) \
$(THREADOBJS) $(libffi_files) $(LIBLTDL)
-libgcj_la_LDFLAGS = -L../libstdc++ -rpath $(toolexeclibdir) \
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
@@ -240,7 +240,7 @@
jv_convert_SOURCES =
EXTRA_jv_convert_SOURCES = $(convert_source_files)
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
- -rpath `if test -d ../libstdc++; then cd ../libstdc++; pwd; fi` -rpath $(toolexeclibdir)
+ -rpath $(toolexeclibdir)
jv_convert_LINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) \
-o jv-convert
@@ -253,7 +253,7 @@
gij_SOURCES = gij.cc
-gij_LDFLAGS = -rpath `if test -d ../libstdc++; then cd ../libstdc++; pwd; fi` -rpath $(toolexeclibdir)
+gij_LDFLAGS = -rpath $(toolexeclibdir)
gij_LINK = $(LIBTOOL) --mode=link $(GCJ) -L$(here) $(JC1FLAGS) $(LDFLAGS) \
-o gij
@@ -1671,13 +1671,13 @@
$(built_java_source_files:.java=.class): $(built_java_source_files)
javac="$(JAVAC)"; \
- $$javac -L$(here) $(JCFLAGS) -classpath $(here):`cd $(srcdir) && /bin/pwd` \
+ $$javac $(JCFLAGS) -classpath $(here):`cd $(srcdir) && /bin/pwd` \
-d $(here) $?
libgcj.zip: $(java_source_files) $(cond_awt_java_source_files)
$(MAKE) $(built_java_source_files:.java=.class)
javac="$(JAVAC)"; cd $(srcdir); \
- $$javac -L$(here) $(JCFLAGS) -classpath $(here):`/bin/pwd` -d $(here) \
+ $$javac $(JCFLAGS) -classpath $(here):`/bin/pwd` -d $(here) \
$(subst $(srcdir)/,,$?)
-@rm -f libgcj.zip
$(ZIP) -r libgcj java gnu -n .class -i '*.class' -i '*/'