Page MenuHomeFreeBSD

stand: compile ia32 EFI loader with -malign-double
ClosedPublic

Authored by vexeduxr on Feb 19 2026, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 19, 3:14 AM
Unknown Object (File)
Thu, Jun 18, 4:30 AM
Unknown Object (File)
Wed, Jun 17, 10:22 AM
Unknown Object (File)
Tue, Jun 16, 9:29 AM
Unknown Object (File)
Mon, Jun 15, 6:03 PM
Unknown Object (File)
Wed, Jun 10, 1:57 PM
Unknown Object (File)
Fri, Jun 5, 3:26 PM
Unknown Object (File)
Sun, May 31, 1:58 PM
Subscribers

Details

Summary

The UEFI spec says:

Structures are aligned on boundaries equal to the largest internal
datum of the structure and internal data are implicitly padded to
achieve natural alignment.

Unlike the old Intel EFI toolkit, the EDK2 headers expect ia32 builds to
use -malign-double to achive this.

Make EFI versions of libsa32, liblua32, and ficl32. With the difference
being that they are compiled with -malign-double.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

stand/efi/Makefile.inc
13

I think this is needed only for the 32-bit build. It would cause problems for the 64-bit build, no?

Oh, I'd be tempted to call these lib*32efi as well.

stand/efi/Makefile.inc
13

It should be a nop for the 64-bit build. I'll put it under DO32

Only pass -malign-double for the 32-bit build.
Suffix 32-bit EFI libraries with efi

Make the LIB*32 variable assignment more seamless.

I wanted to let this sit for a while since I didn't like that we had to build everything twice, but I can't seem to find a better solution for now.

This revision was not accepted when it landed; it landed in state Needs Review.Sat, May 30, 2:45 AM
This revision was automatically updated to reflect the committed changes.