> > Eric and Dominique could you try it on your respective systems?  Thanks in
> > advance.
>
> It works for me, thanks.

It does not for me:

In file included from ../../work/gcc/config/rs6000/rs6000.c:1475:0:
../../work/gcc/config/rs6000/rs6000-cpus.def:54:0: error: "MASK_STRICT_ALIGN" 
redefined [-Werror]
 #define MASK_STRICT_ALIGN 0
 ^
In file included from ./tm.h:15:0,
                 from ../../work/gcc/config/rs6000/rs6000.c:24:
../../work/gcc/config/rs6000/rs6000.h:490:0: note: this is the location of the 
previous definition
 #define MASK_STRICT_ALIGN  OPTION_MASK_STRICT_ALIGN
 ^
cc1plus: all warnings being treated as errors

I had to use the following modified patch

--- ../_gcc_clean/gcc/config/rs6000/rs6000-cpus.def     2012-10-18 
00:34:51.000000000 +0200
+++ ../work/gcc/config/rs6000/rs6000-cpus.def   2012-10-19 14:14:59.000000000 
+0200
@@ -46,6 +46,17 @@
 
 #define POWERPC_7400_MASK      (OPTION_MASK_PPC_GFXOPT | OPTION_MASK_ALTIVEC)
 
+/* Deal with ports that do not have -mstrict-align.  */
+#ifdef OPTION_MASK_STRICT_ALIGN
+#define OPTION_MASK_STRICT_ALIGN_OPTIONAL OPTION_MASK_STRICT_ALIGN
+#else
+#define OPTION_MASK_STRICT_ALIGN 0
+#define OPTION_MASK_STRICT_ALIGN_OPTIONAL 0
+#ifndef MASK_STRICT_ALIGN
+#define MASK_STRICT_ALIGN 0
+#endif
+#endif
+
 /* Mask of all options to set the default isa flags based on -mcpu=<xxx>.  */
 #define POWERPC_MASKS          (OPTION_MASK_ALTIVEC                    \
                                 | OPTION_MASK_CMPB                     \
@@ -64,7 +75,7 @@
                                 | OPTION_MASK_PPC_GPOPT                \
                                 | OPTION_MASK_RECIP_PRECISION          \
                                 | OPTION_MASK_SOFT_FLOAT               \
-                                | OPTION_MASK_STRICT_ALIGN             \
+                                | OPTION_MASK_STRICT_ALIGN_OPTIONAL    \
                                 | OPTION_MASK_VSX)
 
 #endif

in order to recompile gcc (not a clean bootstrap), i.e.,

+#define OPTION_MASK_STRICT_ALIGN_OPTIONAL 0

and

+#ifndef MASK_STRICT_ALIGN
+#define MASK_STRICT_ALIGN 0
+#endif

I think this patch could be simplied as

+#ifndef OPTION_MASK_STRICT_ALIGN
+#define OPTION_MASK_STRICT_ALIGN 0
+#ifndef MASK_STRICT_ALIGN
+#define MASK_STRICT_ALIGN 0
+#endif
+#endif
#define OPTION_MASK_STRICT_ALIGN_OPTIONAL OPTION_MASK_STRICT_ALIGN

Apparently

 #define MASK_STRICT_ALIGN  OPTION_MASK_STRICT_ALIGN

defines MASK_STRICT_ALIGN (to which value?) even if
OPTION_MASK_STRICT_ALIGN is not defined.

Dominique


Reply via email to