This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
generic bootstrap failure + patch (protos gone from demangle.h)
- To: law at cygnus dot com
- Subject: generic bootstrap failure + patch (protos gone from demangle.h)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Tue, 8 Dec 1998 20:53:48 -0500 (EST)
- Cc: egcs-patches at cygnus dot com
Jeff,
When you nuked gcc/demangle.h, in favor of include/demangle.h,
we lost some prototypes that only gcc/demangle.h had. (I.e., the
files were out of sync.) This adds the prototypes back in a new file
collect2.h.
Okay to install?
--Kaveh
Here's a sample of the problem:
> cc -DIN_GCC -g -DHAVE_CONFIG_H -I. -I. -I./config -I./../include
> -DTARGET_MACHINE=\"mips-sgi-irix6.2\"
> -c `echo ./collect2.c | sed 's,^\./,,'`
>
> cfe: Error: collect2.c, line 598: redeclaration of 'dump_file';
> previous declaration at line 395 in file 'collect2.c'
> dump_file (name)
> ^
> cfe: Error: collect2.c, line 598: Incompatible function return type
> for this function.
> dump_file (name)
> ----------^
> make[2]: *** [collect2.o] Error 1
Tue Dec 8 20:43:00 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* collect2.h: New header file for prototypes.
* Makefile.in (collect2.o, tlink.o): Depend on collect2.h.
* collect2.c: Include collect2.h.
* tlink.c: Likewise.
diff -rup orig/egcs-CVS19981208/gcc/collect2.h egcs-CVS19981208/gcc/collect2.h
--- orig/egcs-CVS19981208/gcc/collect2.h Tue Dec 8 20:26:28 1998
+++ egcs-CVS19981208/gcc/collect2.h Tue Dec 8 20:17:22 1998
@@ -0,0 +1,16 @@
+#ifndef __COLLECT2_H__
+#define __COLLECT2_H__
+
+extern void do_tlink PARAMS ((char **, char **));
+
+extern void collect_execute PARAMS ((char *, char **, char *));
+
+extern void collect_exit PARAMS ((int)) ATTRIBUTE_NORETURN;
+
+extern int collect_wait PARAMS ((char *));
+
+extern void dump_file PARAMS ((char *));
+
+extern int file_exists PARAMS ((char *));
+
+#endif /* ! __COLLECT2_H__ */
diff -rup orig/egcs-CVS19981208/gcc/Makefile.in egcs-CVS19981208/gcc/Makefile.in
--- orig/egcs-CVS19981208/gcc/Makefile.in Tue Dec 8 19:24:59 1998
+++ egcs-CVS19981208/gcc/Makefile.in Tue Dec 8 20:19:53 1998
@@ -1306,12 +1306,12 @@ collect2$(exeext): collect2.o tlink.o ha
cplus-dem.o underscore.o version.o choose-temp.o mkstemp.o $(LIBS)
collect2.o : collect2.c $(CONFIG_H) system.h gstab.h \
- $(srcdir)/../include/obstack.h $(DEMANGLE_H)
+ $(srcdir)/../include/obstack.h $(DEMANGLE_H) collect2.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_MACHINE=\"$(target_alias)\" $(MAYBE_USE_COLLECT2) \
-c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
-tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h toplev.h
+tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h toplev.h collect2.h
hash.o: hash.c hash.h system.h toplev.h
cplus-dem.o: $(srcdir)/../libiberty/cplus-dem.c $(DEMANGLE_H)
diff -rup orig/egcs-CVS19981208/gcc/collect2.c egcs-CVS19981208/gcc/collect2.c
--- orig/egcs-CVS19981208/gcc/collect2.c Tue Dec 8 19:25:09 1998
+++ egcs-CVS19981208/gcc/collect2.c Tue Dec 8 20:18:49 1998
@@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA. */
#define COLLECT
+#include "collect2.h"
#include "demangle.h"
#include "obstack.h"
#ifdef __CYGWIN__
diff -rup orig/egcs-CVS19981208/gcc/tlink.c egcs-CVS19981208/gcc/tlink.c
--- orig/egcs-CVS19981208/gcc/tlink.c Tue Dec 8 19:26:27 1998
+++ egcs-CVS19981208/gcc/tlink.c Tue Dec 8 20:19:13 1998
@@ -25,6 +25,7 @@ the Free Software Foundation, 675 Mass A
#include "hash.h"
#include "demangle.h"
#include "toplev.h"
+#include "collect2.h"
#define MAX_ITERATIONS 17
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Icon CMT Corp.