FreeBSD ``make check'' broken last two weeks

Loren J. Rittle rittle@supra.rsch.comm.mot.com
Mon Apr 19 20:12:00 GMT 1999


I configure gcc to use shared libraries on all targets.

For the last two week's snapshots, I had to manually link
egcs-build-directory/i386-unknown-freebsdelf/libstdc++/libstdc++.a.2.9.0
to egcs-build-directory/i386-unknown-freebsdelf/libstdc++/libstdc++.a
or else ``make check'' produced many additional errors since ``-L...''
is not added to the testsuite's compile rules when libstdc++.a is not
found in the build tree.  For some reason, this linkage is made
automatically for other targets but not for FreeBSD.

E.g. here are the steps used to create the static version of the
library under Solaris (seen in the log of ``make bootstrap''):

rm -f tlibstdc++.a.2.9.0
ar rc tlibstdc++.a.2.9.0 `cat stdlist`
mv tlibstdc++.a.2.9.0 libstdc++.a.2.9.0
true libstdc++.a.2.9.0
rm -f libstdc++.a
ln -s libstdc++.a.2.9.0 libstdc++.a || cp libstdc++.a.2.9.0 libstdc++.a

Here are the steps used under FreeBSD:

rm -f tlibstdc++.a.2.9.0
ar rc tlibstdc++.a.2.9.0 `cat stdlist`
mv tlibstdc++.a.2.9.0 libstdc++.a.2.9.0
ranlib libstdc++.a.2.9.0

Tracing this back to the Makefiles, we find comments that lead us to a
mismatch between production rules and requirements of the testsuite.
This patch fixes the problem for FreeBSD and OpenBSD.  Due to comments
in x86-interix.ml, I have NOT corrected the similar mismatch.

Index: freebsd.ml
===================================================================
RCS file: /cvs/egcs/egcs/libstdc++/config/freebsd.ml,v
retrieving revision 1.1
diff -u -r1.1 freebsd.ml
--- freebsd.ml  1999/03/05 01:21:14     1.1
+++ freebsd.ml  1999/04/20 03:02:59
@@ -1,6 +1,6 @@
 # Elf with shared libm, so we can link it into the shared libstdc++.
 
-LIBS    = $(ARLIB) $(SHLIB) $(SHLINK) mshlink
+LIBS    = $(ARLIB) $(ARLINK) $(SHLIB) $(SHLINK) mshlink
 SHFLAGS = -Wl,-soname,$(MSHLINK)
 SHDEPS  = -lm
 DEPLIBS = ../$(SHLIB)
Index: openbsd.ml
===================================================================
RCS file: /cvs/egcs/egcs/libstdc++/config/openbsd.ml,v
retrieving revision 1.1
diff -u -r1.1 openbsd.ml
--- openbsd.ml  1999/02/18 18:57:55     1.1
+++ openbsd.ml  1999/04/20 03:02:59
@@ -1,6 +1,6 @@
 # Base shared lib for OpenBSD i386
 
-LIBS    = $(ARLIB) $(SHLIB) $(SHLINK) mshlink
+LIBS    = $(ARLIB) $(ARLINK) $(SHLIB) $(SHLINK) mshlink
 SHFLAGS = -nostdlib -Wl,-Bshareable,-Bforcearchive
 SHDEPS  = -lm
 DEPLIBS = ../$(SHLIB)


More information about the Gcc-patches mailing list