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

Geert Stappers stappers at stappers.nl
Mon Jul 15 05:29:08 UTC 2019


On Sun, Jul 14, 2019 at 08:08:27PM +0200, Heinrich Schuchardt wrote:
> On 14.07.19 17:00, Christian Nilsson wrote:
> > On Sun, 14 Jul 2019, 16:18 Heinrich Schuchardt 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
> > 
> > 
> > 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.
 
Quoting http://lists.ipxe.org/pipermail/ipxe-devel/2019-June/006673.html
} You cannot break what's already broken.

> 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.

Does the ARM system have code that handles unaligned exceptions?



Groeten
Geert Stappers
-- 
Leven en laten leven



More information about the ipxe-devel mailing list