This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH for multiply defined symbols with recent libiberty change


> 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 \



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]