[PATCH] Fix PR79278, amend ADJUST_FIELD_ALIGN interface

Segher Boessenkool segher@kernel.crashing.org
Thu Feb 2 02:51:00 GMT 2017


On Wed, Feb 01, 2017 at 03:53:09PM -0600, Segher Boessenkool wrote:
> On Wed, Feb 01, 2017 at 11:59:10AM +0100, Richard Biener wrote:
> > Wasn't successful in making a cross to ppc64-linux build its libobjc.
> 
> I'll do a native build.  Just the patch in the first message in this
> thread?  And just running the testsuite is enough, or is there
> something specific you want tested?

Done now.  No new failures on powerpc64-linux {-m32,-m64}.  I needed
the following additional patch; I do not know if that works on other
targets (or if it actually is correct!)


Segher


--- a/libobjc/encoding.c
+++ b/libobjc/encoding.c
@@ -1159,7 +1159,7 @@ objc_layout_structure_next_member (struct objc_struct_layo
   desired_align = MIN (desired_align, BIGGEST_FIELD_ALIGNMENT);
 #endif
 #ifdef ADJUST_FIELD_ALIGN
-  desired_align = ADJUST_FIELD_ALIGN (type, desired_align);
+  desired_align = ADJUST_FIELD_ALIGN (type, type, desired_align);
 #endif
 
   /* Record must have at least as much alignment as any field.



More information about the Gcc-patches mailing list