[ipxe-devel] [BUG] build failure error=address-of-packed-member with GCC 9.1.0

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jul 14 18:08:27 UTC 2019



On 14.07.19 17:00, Christian Nilsson wrote:
>
>
> On Sun, 14 Jul 2019, 16:18 Heinrich Schuchardt, <xypron.glpk at gmx.de
> <mailto:xypron.glpk at gmx.de>> wrote:
>
>     Hello Michael,
>
>     building bin-i386-efi/snp.efi fails with GCC 9.1.0.
>
>     I am using the testing branch of the Manjaro distribution.
>
>     Best regards
>
>     Heinrich
>
>
>         [BUILD] bin-i386-efi/string.o
>     core/gdbudp.c: In function ‘gdbudp_configure’:
>     core/gdbudp.c:235:47: error: taking address of packed member of ‘struct
>     sockaddr_in’ may result in an unaligned pointer value
>     [-Werror=address-of-packed-member]
>         235 |   fetch_ipv4_setting ( settings, &ip_setting,
>     &source_addr.sin_addr );
>             |
>       ^~~~~~~~~~~~~~~~~~~~~
>         [BUILD] bin-i386-efi/null_nap.o
>         [BUILD] bin-i386-efi/memmap_settings.o
>     cc1: all warnings being treated as errors
>
>     _______________________________________________
>     ipxe-devel mailing list
>     ipxe-devel at lists.ipxe.org <mailto:ipxe-devel at lists.ipxe.org>
>     https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel
>
>
> Hasn't there already been a patch sent to the list for this, with
> carrying concerns. Maybe it is best to continue there instead of
> creating a new thread?
>
>

As http://lists.ipxe.org/pipermail/ does not provide message IDs I would
not know how to answer to any old message within the same thread.

I assumed known errors to be fixed. This issue has been know at least
since May 30th obviously.

The patch in
http://lists.ipxe.org/pipermail/ipxe-devel/2019-June/006670.html
silences the warning but it seems to be unclear if there is a real bug.

I am compiling snp.efi. The UEFI specification requires that the
processor is switched to a mode supporting unaligned access before
loading any EFI binary but this may not be sufficient on 32bit ARM.

The LDRD instruction requires the data source to be four byte aligned
even if strict alignment fault checking is disabled in the system
control register.

Best regards

Heinrich



More information about the ipxe-devel mailing list