This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33168] [4.3 Regression] GCC Boot failure, building libstc++
- From: "janis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Oct 2007 18:24:19 -0000
- Subject: [Bug target/33168] [4.3 Regression] GCC Boot failure, building libstc++
- References: <bug-33168-14842@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from janis at gcc dot gnu dot org 2007-10-16 18:24 -------
Segher has a patch for related PR 31490 that fixed the original 32-bit
bootstrap problem. Yesterday I confirmed that it also fixes the 64-bit
powerpc64-linux bootstrap for all languages but Ada. The only test differences
between a 64-bit build with his patch and a 32-bit build without it are
gcc.dg/20051207-3.c, which he earlier said is expected to behave differently
with this patch, and cc1 segfaults with some of the
gcc.c-torture/compile/limits-*.c tests, which also fail with a C-only 64-bit
bootstrap without the patch.
Here's the patch I tested:
Index: gcc/varasm.c
===================================================================
--- gcc/varasm.c (revision 129361)
+++ gcc/varasm.c (working copy)
@@ -536,10 +536,20 @@
else
{
sect = *slot;
+
+ /* Sanity check user variables for flag changes. */
if ((sect->common.flags & ~SECTION_DECLARED) != flags
&& ((sect->common.flags | flags) & SECTION_OVERRIDE) == 0)
{
- /* Sanity check user variables for flag changes. */
+ /* Allow mixed writable and read-only objects in named sections. */
+ if ((sect->common.flags & SECTION_NAMED) != 0
+ && ((sect->common.flags ^ flags) & ~SECTION_DECLARED)
+ == SECTION_WRITE)
+ {
+ sect->common.flags |= SECTION_WRITE;
+ return sect;
+ }
+
if (decl == 0)
decl = sect->named.decl;
gcc_assert (decl);
When I first tested this patch a month ago (with a 32-bit bootstrap) there was
a discussion between Segher and Dinar Temirbulatov about the best way to fix
this; I've copied both of them.
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at kernel dot
| |crashing dot org,
| |dtemirbulatov at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33168