[PATCH PR31490] Re: another build failure on ppc64-linux

Segher Boessenkool segher@kernel.crashing.org
Sun Sep 2 19:12:00 GMT 2007


> Bootstrap of current trunk on powerpc64-linux fails in libstdc++
> building system_error.lo.  The code that fails was added a few days 
> ago,
> but the failure seems to be the same as the one reported in PR 31490.  
> I
> verified that the patch from comment #10 of that PR allows bootstrap of
> c,c++,fortran to succeed and now I'm doing a bootstrap and regtest of
> all languages but Ada.  I'll report the results in the PR.

Since there seems to be interest in that patch again, I bootstrapped
it on x86-64 (all default languages); no new fails, except for
gcc.dg/20051207-3.c, which is to be expected since the whole goal
of the patch is to change this behaviour (i.e., to allow both writable
and read-only objects in the same section).

I can't bootstrap and test a powerpc64 compiler in less than 48 hours
or so; the patch does fix the original problem though (tested with a
cross-compiler).

My original patch (attached to PR31490) had some little problems,
here's the thing I actually tested.

I know it needs a testsuite change (and a Changelog entry); I'll wait
for Janis' testing for that though (and thanks for that testing, btw 
:-) )


Segher


--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -536,10 +536,20 @@ get_section (const char *name, unsigned int 
flags, tree de
    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);



More information about the Gcc-patches mailing list