This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.4/3.5 PATCH: gcc/Makefile.in fix for IRIX 5 Ada comparison failure
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Jan 2004 21:14:15 +0100 (MET)
- Subject: 3.4/3.5 PATCH: gcc/Makefile.in fix for IRIX 5 Ada comparison failure
I've now successfully (i.e. without optimization) bootstrapped mainline gcc
on IRIX 5.3, starting from GNAT 3.11p.
Both the C/Ada bootstrap and make gnatlib_and_tools were successful, except
for a few comparison failures:
Bootstrap comparison failure!
ada/a-except.o differs
ada/memtrack.o differs
ada/s-assert.o differs
ada/s-memory.o differs
make[1]: *** [gnucompare] Error 1
It turns out that those files are built with -g (which has to be removed if
building with the native as), which is done for most of the bootstrap by
config/mips/t-iris5-as:
# omit -g, gcc doesn't support the o32 mdebug debugging format and warns about
# every invocation with -g*
# add -save-temps to avoid comparison failure due to embedded temp file names
BOOT_CFLAGS = -O2 -save-temps
Unfortunately, ada/Make-lang.in sets FORCE_DEBUG_ADAFLAGS = -g and uses
this in a few places (i.e. for those four files above), causing the
comparison failure. The obvious fix is to override that variable in the
tmake_file (as well as GNATLIBCFLAGS = -g -O2, which only gives lots of
warnings from gcc). Unfortunately, this fails because the language
makefile fragments are include last in gcc/Makefile.in.
If one changes this and adds the corresponding overrides to t-iris5-as, the
bootstrap finishes successfully.
Ok for mainline and 3.4 branch?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Thu Jan 22 13:11:35 2004 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.in: Move target, host overrides after per-language
fragments.
* config/mips/t-iris5-as (FORCE_DEBUG_ADAFLAGS): Clear.
(GNATLIBCFLAGS): Remove -g.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1232
diff -u -p -r1.1232 Makefile.in
--- gcc/Makefile.in 21 Jan 2004 02:53:20 -0000 1.1232
+++ gcc/Makefile.in 23 Jan 2004 17:35:17 -0000
@@ -681,16 +683,6 @@ PRETTY_PRINT_H = pretty-print.h input.h
DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H)
C_PRETTY_PRINT_H = $(PRETTY_PRINT_H) $(C_COMMON_H) $(TREE_H)
-# target overrides
-ifneq ($(tmake_file),)
-include $(tmake_file)
-endif
-
-# host overrides
-ifneq ($(xmake_file),)
-include $(xmake_file)
-endif
-
#
# Now figure out from those variables how to compile and link.
@@ -950,6 +942,19 @@ ifneq ($(LANG_MAKEFRAGS),)
include $(LANG_MAKEFRAGS)
endif
+# target and host overrides must follow the per-language makefile fragments
+# so they can override or augment language-specific variables
+
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
+# host overrides
+ifneq ($(xmake_file),)
+include $(xmake_file)
+endif
+
#
# -----------------------------
Index: gcc/config/mips/t-iris5-as
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/t-iris5-as,v
retrieving revision 1.2
diff -u -p -r1.2 t-iris5-as
--- gcc/config/mips/t-iris5-as 6 Jul 2003 23:05:12 -0000 1.2
+++ gcc/config/mips/t-iris5-as 23 Jan 2004 17:35:27 -0000
@@ -5,3 +5,7 @@ BOOT_CFLAGS = -O2 -save-temps
# omit -g1
LIBGCC2_DEBUG_CFLAGS =
+
+# omit -g
+FORCE_DEBUG_ADAFLAGS =
+GNATLIBCFLAGS = -O2