This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
multilib(tool)bing
- To: java-patches at sourceware dot cygnus dot com
- Subject: multilib(tool)bing
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 15 Mar 2000 19:16:22 -0300
Libtool drops most multilib-related flags from link command-lines.
This can only be properly worked around by using libtool from CVS and
adding `-Wc,' before each argument to be passed to the compiler driver
that would run the linker. This would probably use some support from
automake, but even then, on some platforms, in which libtool runs the
linker directly, the flags would be dropped. The only really clean
solution would be to try to arrange for the upcoming multi-language
libtool to deal with multilib-related flags too. Maybe it already
does.
Meanwhile, I've been trying to come up with a simple solution that
would work on most cases. Last time, I had posted an ugly and
pervasive patch for the top-level Makefile.in. This time, I've come
up with a much simpler approach. How do you like it?
Index: ChangeLog
from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config-ml.in: For libtoolized multilibbed libraries, create
a compiler wrapper to hide multilib-related flags from libtool.
Index: config-ml.in
===================================================================
RCS file: /cvs/java/libgcj/config-ml.in,v
retrieving revision 1.4
diff -u -r1.4 config-ml.in
--- config-ml.in 1999/09/06 19:28:20 1.4
+++ config-ml.in 2000/03/15 22:14:16
@@ -699,7 +699,21 @@
break
fi
done
- ml_config_env='CC="${CC} $flags"'
+ if grep '^LIBTOOL_DEPS=' ${ml_recprog} > /dev/null; then
+ ml_ltCC=${ML_POPDIR}/${ml_dir}/ltCC
+ if test ! -f ${ml_ltCC}; then
+ cat > ${ml_ltCC}-$$ << EOF
+#! ${CONFIG_SHELL-/bin/sh}
+exec ${CC} $flags \${1+"\$@"}
+EOF
+ chmod +x ${ml_ltCC}-$$
+ mv ${ml_ltCC}-$$ ${ml_ltCC} ||
+ rm -f ${ml_ltCC}-$$
+ fi
+ ml_config_env="CC=${ml_ltCC}"
+ else
+ ml_config_env='CC="${CC} $flags"'
+ fi
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me