I know this patch doesn't look very clean. But I don't know automake
well enough to make it better. Here is the problem I am trying to fix.
I got:
# /work/ia64/bin/cygnus/20000303/gcc/xgcc
-B/usr/ia64-cygnus-linux/ia64-cygnus-linux/bin/
-B/usr/ia64-cygnus-linux/ia64-cygnus-linux/lib/ -B/work/ia64/bin/cygnus/20000303/gcc/
-g -O2 -pipe -Dno_inhibit_libc -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates
-fexceptions -Wl,-soname,libstdc++-libc6.1-2.so.3 -shared -o
libstdc++-3-libc6.1-2-2.10-ia64-000216.so `cat piclist` -lm
gcc: installation problem, cannot exec
`/work/ia64/bin/cygnus/20000303/gcc/collect2': Argument list too long
What happened were
1. I built as, ld, gcc, and libstdc++ together.
2. I enabled shared libbfd.
As the result, ./ld/ld-new, which is a shell script, uses too many
arguments when it was executed the first time. The first time when
you run ./ld/ld-new, it creates .libs/lt-lt-ld-new if shared libbfd
is enabled. After that, everything seems ok. I am trying to add a
rule to ld/Makefile.am such that we will run ./ld/ld-new just once
after it is built. I don't care if it really works or not. The idea
is to create .libs/lt-lt-ld-new if necessary. However, I couldn't
find a clean way to do so with automake. Any suggestions?
Thanks.
--
H.J. Lu ([EMAIL PROTECTED])
---
2000-03-09 H.J. Lu <[EMAIL PROTECTED]>
* Makefile.am (lt-ld-new): New target.
(ld-new$(EXEEXT)): Depend on it.
(clean-lt-ld-new): New target.
(clean): Depend on it.
* Makefile.in: Rebuild.
--- Makefile.am.orig Thu Mar 9 10:23:09 2000
+++ Makefile.am Thu Mar 9 11:34:40 2000
@@ -674,6 +674,23 @@ check-DEJAGNU: site.exp
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
+# We want to run the new linker once to create .libs/lt-ld-new if
+# necessary. Otherwise, the new linker may not work. We don't care
+# if it really works or not.
+ld-new$(EXEEXT): lt-ld-new
+
+lt-ld-new: $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES)
+ @rm -f ld-new$(EXEEXT)
+ $(LINK) $(ld_new_LDFLAGS) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
+ mv $@ ld-new$(EXEEXT)
+ -./ld-new$(EXEEXT) -v > $@ 2>&1
+ touch $@
+
+clean-lt-ld-new:
+ -rm -f lt-ld-new
+
+clean: clean-lt-ld-new
+
# Rules for testing by relinking ld itself.
# A similar test is in the testsuite. This target is for ease of use
# when porting ld.