3.4 PATCH: Fix IRIX 6 bootstrap failure (-Werror fallout)
Rainer Orth
ro@TechFak.Uni-Bielefeld.DE
Tue Nov 4 20:53:00 GMT 2003
A IRIX 6.5 bootstrap ran into some problems with -Werror, too:
* Two warning in crtstuff.c:
/.vol/gcc/src/gcc/gcc/crtstuff.c:377: warning: no previous prototype for '__do_global_dtors'
/.vol/gcc/src/gcc/gcc/crtstuff.c:522: warning: no previous prototype for '__do_global_ctors'
make[4]: *** [crtbegin.o] Error 1
* Every O32 compilation would fail with -Werror:
/.vol/gcc/src/gcc/gcc/libgcc2.c:0: warning: -g is only supported using GNU as with -mabi=32,
/.vol/gcc/src/gcc/gcc/libgcc2.c:0: warning: -g option disabled
make[3]: *** [libgcc/mabi=32/_muldi3.o] Error 1
Unless there is a way to selectively disable -g for all O32 compilations
when the native as is in use, we need -Wno-error for all of libgcc.
This patch fixes both and allows the bootstrap to complete successfully
without regressions.
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Tue Nov 4 21:04:58 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/mips/t-iris6 (CRTSTUFF_T_CFLAGS): Add -Wno-error.
(TARGET_LIBGCC2_CFLAGS): Define.
* crtstuff.c [HAS_INIT_SECTION] (__do_global_dtors): Declare.
(__do_global_ctors): Likewise.
Index: gcc/crtstuff.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/crtstuff.c,v
retrieving revision 1.64
diff -u -p -r1.64 crtstuff.c
--- gcc/crtstuff.c 31 Oct 2003 20:46:26 -0000 1.64
+++ gcc/crtstuff.c 4 Nov 2003 20:13:54 -0000
@@ -362,6 +362,8 @@ __do_global_ctors_aux (void) /* prologue
#elif defined(HAS_INIT_SECTION) /* ! INIT_SECTION_ASM_OP */
+void __do_global_dtors (void);
+
/* This case is used by the Irix 6 port, which supports named sections but
not an SVR4-style .fini section. __do_global_dtors can be non-static
in this case because we protect it with -hidden_symbol. */
@@ -507,6 +509,8 @@ asm (TEXT_SECTION_ASM_OP);
#endif /* OBJECT_FORMAT_ELF */
#elif defined(HAS_INIT_SECTION) /* ! INIT_SECTION_ASM_OP */
+
+void __do_global_ctors (void);
/* This case is used by the Irix 6 port, which supports named sections but
not an SVR4-style .init section. __do_global_ctors can be non-static
Index: gcc/config/mips/t-iris6
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/t-iris6,v
retrieving revision 1.19
diff -u -p -r1.19 t-iris6
--- gcc/config/mips/t-iris6 17 Oct 2003 11:44:33 -0000 1.19
+++ gcc/config/mips/t-iris6 4 Nov 2003 20:14:10 -0000
@@ -12,7 +12,8 @@ INSTALL_LIBGCC = install-multilib
# end labels to the .ctors and .dtors section when we link using gcc.
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
-CRTSTUFF_T_CFLAGS=-g1
+CRTSTUFF_T_CFLAGS=-g1 -Wno-error
+TARGET_LIBGCC2_CFLAGS = -Wno-error
# This is only needed in the static libgcc as a band-aid until gcc correctly
# implements the N32/N64 ABI structure passing conventions
More information about the Gcc-patches
mailing list