From: Trevor Saunders <tbsaunde+...@tbsaunde.org> Similar to ROUND_TYPE_ALIGN it seems to make sense to copy the information in the target macros to libobjc as an incremental step. Its worth noting a large portion of the definitions of this macro only exist to work around ADJUST_FIELD_ALIGN being used in target libs, so once all target macros are gone from target libs we should be able to remove most of the definitions of BIGGEST_FIELD_ALIGNMENT in gcc/, at which point there won't be a significant amount of dupplication.
libobjc/ChangeLog: 2015-10-30 Trevor Saunders <tbsaunde+...@tbsaunde.org> PR libobjc/24775 * encoding.c (objc_layout_structure_next_member): Remove usage of BIGGEST_FIELD_ALIGNMENT. --- libobjc/encoding.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libobjc/encoding.c b/libobjc/encoding.c index 867372d..7438d64 100644 --- a/libobjc/encoding.c +++ b/libobjc/encoding.c @@ -1158,8 +1158,18 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout) } /* The following won't work for vectors. */ -#ifdef BIGGEST_FIELD_ALIGNMENT - desired_align = MIN (desired_align, BIGGEST_FIELD_ALIGNMENT); +#if defined __x86_64__ || defined __i386__ +#if defined __CYGWIN__ || defined __MINGW32__ + desired_align = MIN (desired_align, 64); +#elif defined __x86_64__ + desired_align = MIN (desired_align, 128); +#else + desired_align = MIN (desired_align, 32); +#endif +#elif defined __tilepro__ || defined __frv__ || defined __arm__ + desired_align = MIN (desired_align, 64); +#elif defined __tilegx__ + desired_align = MIN (desired_align, 128); #endif #ifdef ADJUST_FIELD_ALIGN desired_align = ADJUST_FIELD_ALIGN (type, desired_align); -- 2.6.2