PATCH for multiply defined symbols with recent libiberty change

Per Bothner bothner@cygnus.com
Mon Sep 21 09:59:00 GMT 1998


> If we intend to use libiberty in gcc, we should remove those definitions in
> cplus-dem.c.

It seems to be it would be more robust to change the linker command
so that cxxmain.o is seem before libiberty.a.  That would avoid
pulling in (files compiled from) cplus-dem.c twice.  I.e.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner

	* Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.

Index: Make-lang.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/Make-lang.in,v
retrieving revision 1.20
diff -u -r1.20 Make-lang.in
--- Make-lang.in	1998/09/16 10:40:40	1.20
+++ Make-lang.in	1998/09/21 16:54:11
@@ -110,8 +110,8 @@
 	  -DVERSION=\"$(version)\" cxxmain.c
 
 $(DEMANGLER_PROG): cxxmain.o underscore.o getopt.o getopt1.o $(LIBDEPS)
-	$(CC) $(ALL_CFLAGS) $(LDFLAGS) $(LIBS) -o $@ \
-	  cxxmain.o underscore.o getopt.o getopt1.o
+	$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
+	  cxxmain.o underscore.o getopt.o getopt1.o $(LIBS)
 
 CXX_SRCS = $(srcdir)/cp/call.c $(srcdir)/cp/decl2.c \
  $(srcdir)/cp/except.c $(srcdir)/cp/input.c $(srcdir)/cp/pt.c \




More information about the Gcc-patches mailing list