[PATCH] backends: Ignore GCC8 -Wpacked-not-aligned for m68k_corenote.c.

Mark Wielaard mark@klomp.org
Thu Oct 26 14:28:00 GMT 2017


On Tue, 2017-10-24 at 14:35 +0200, Mark Wielaard wrote:
> The GCC8 -Wpacked-not-aligned warns if a structure field with explicit
> padding in a packed structure will be misaligned. m68k prstatus core
> notes are described by a packed structure which has such aligned structure
> fields.

Well, that worked, but only because of two typos canceling each other
out...

> +# m68k prstatus core notes are described by a packed structure
> +# which has not naturally aligned fields. Since we don't access
> +# these fields directly, but take their offset to be used later
> +# to extract the data through elfxx_xlatetom/memmove, this isn't
> +# an issue.
> +m68k_corenote_Wpacked_not_aligned = yes

Missing no_ ...

> +++ b/config/eu.am
> @@ -74,6 +74,7 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
> >  	    $(if $($(*F)_no_Werror),,-Werror) \
> >  	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
> >  	    $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
> > +	    $(if $($(*F)_no_Wpacked_not_aligned),,-Wno-packed-not-aligned) \

Double ,, causing everything to get -Wno-packaged-not-aligned.

Oops. Fixed patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-backends-Ignore-GCC8-Wpacked-not-aligned-for-m68k_co.patch
Type: text/x-patch
Size: 2595 bytes
Desc: 
URL: <http://sourceware.org/pipermail/elfutils-devel/attachments/20171026/ced60b83/attachment.bin>


More information about the Elfutils-devel mailing list