This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH fix bootstrap on solaris (part one)
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, Roger Sayle <roger at eyesopen dot com>
- Date: Sat, 10 Apr 2004 21:38:19 +0200
- Subject: PATCH fix bootstrap on solaris (part one)
Hi,
Caroline's patch brought down solaris too. Here the first part to make
it work again.
In the same turn, suggested by Roger, remove the ifdef on top of
cfgrtl.c and place it where it is needed.
Ok for mainline?
Thanks,
Andreas
2004-04-10 Andreas Tobler <a.tobler@schweiz.ch>
* bb-reorder.c: Fix bootstrap failure on solaris. Place
ifdef HAVE_return around gen_ret call.
* cfgrtl.c: Remove ifdef HAVE_return and place it around
the place where it is needed.
Index: gcc/bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.67
diff -u -r1.67 bb-reorder.c
--- gcc/bb-reorder.c 9 Apr 2004 19:57:38 -0000 1.67
+++ gcc/bb-reorder.c 10 Apr 2004 19:34:42 -0000
@@ -1684,9 +1684,11 @@
(old_label),
BB_END (new_bb));
}
+#ifdef HAVE_return
else if (GET_CODE (old_label) == RETURN)
new_jump = emit_jump_insn_after (gen_return (),
BB_END (new_bb));
+#endif
else
abort ();
Index: gcc/cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.116
diff -u -r1.116 cfgrtl.c
--- gcc/cfgrtl.c 9 Apr 2004 19:57:39 -0000 1.116
+++ gcc/cfgrtl.c 10 Apr 2004 19:34:45 -0000
@@ -57,11 +57,6 @@
#include "cfglayout.h"
#include "expr.h"
-/* Stubs in case we don't have a return insn. */
-#ifndef HAVE_return
-#define HAVE_return 0
-#define gen_return() NULL_RTX
-#endif
/* The labels mentioned in non-jump rtl. Valid during find_basic_blocks. */
/* ??? Should probably be using LABEL_NUSES instead. It would take a
@@ -1134,10 +1129,11 @@
e->flags &= ~EDGE_FALLTHRU;
if (target == EXIT_BLOCK_PTR)
{
- if (HAVE_return)
+#ifdef HAVE_return
emit_jump_insn_after (gen_return (), BB_END (jump_block));
- else
+#else
abort ();
+#endif
}
else
{