On 2015/08/05 21:05, Stuart Henderson wrote: > On 2015/08/05 11:17, Landry Breuil wrote: > > the update to lang/gcc/4.9 > > from 4.9.2 to 4.9.3 broke all mozillas on powerpc, so it would be nice > > to dig into the changelog and figure out what's the issue, otherwise 5.8 > > will ship without mozilla packages on powerpc - and xulrunner kicks out > > a bunch of other pkgs. > > It's part of this commit, specifically the part which makes it add > ".machine ppc" to the file it feeds the assembler. > > https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=0b7179c0e10f3b82553c13ef2cb64c81f2fd789c > > Others had problems with it too and have provided a workaround which > is both simple and MD - > > https://github.com/sba1/adtools/commit/b24ae065714a2390d7718d2c348fe5cfa40c2b48 > > NOTE WELL: I've not tested the gcc diff yet. My build is still running > (it's a poor little 1.2GHz 512MB mac mini with an old IDE HDD so anyone > who starts now on a better machine will quite likely beat me to it).
I've now confirmed that, as expected, this allows the problematic file to be compiled in xulrunner on powerppc. I don't see a downside to the GCC diff as it reverts to the behaviour from 4.9.2. OK to commit it? > However I have modified the problematic .s from the xulrunner build > to remove the newly added .machine ppc line and passed to the assembler > manually which was successful. > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v > retrieving revision 1.16 > diff -u -p -r1.16 Makefile > --- Makefile 19 Jul 2015 21:22:49 -0000 1.16 > +++ Makefile 5 Aug 2015 19:58:36 -0000 > @@ -6,6 +6,7 @@ ONLY_FOR_ARCHS = amd64 arm hppa i386 pow > DPB_PROPERTIES = parallel > > V = 4.9.3 > +REVISION = 0 > FULL_VERSION = $V > FULL_PKGVERSION = $V > > Index: patches/patch-gcc_config_rs6000_rs6000_c > =================================================================== > RCS file: patches/patch-gcc_config_rs6000_rs6000_c > diff -N patches/patch-gcc_config_rs6000_rs6000_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-gcc_config_rs6000_rs6000_c 5 Aug 2015 19:58:36 -0000 > @@ -0,0 +1,27 @@ > +$OpenBSD$ > + > +Disable code which passes ".machine ppc" to the assembler as it breaks > +use of some CPU features. Notably breaks -maltivec which breaks build of > +Mozilla ports including xulrunner. > + > +Borrowed from > https://github.com/sba1/adtools/commit/b24ae065714a2390d7718d2c348fe5cfa40c2b48 > + > +--- gcc/config/rs6000/rs6000.c.orig Wed Aug 5 20:54:32 2015 > ++++ gcc/config/rs6000/rs6000.c Wed Aug 5 20:55:36 2015 > +@@ -4983,6 +4983,8 @@ rs6000_file_start (void) > + if (rs6000_default_cpu == 0 || rs6000_default_cpu[0] == '\0' > + || !global_options_set.x_rs6000_cpu_index) > + { > ++ /* Temporarily disabled as it overrides e.g., -mcpu=440 and -maltivec > */ > ++#if 0 > + fputs ("\t.machine ", asm_out_file); > + if ((rs6000_isa_flags & OPTION_MASK_DIRECT_MOVE) != 0) > + fputs ("power8\n", asm_out_file); > +@@ -4998,6 +5000,7 @@ rs6000_file_start (void) > + fputs ("ppc64\n", asm_out_file); > + else > + fputs ("ppc\n", asm_out_file); > ++#endif > + } > + #endif > + } > >