system76 / edk2

EDK II
http://www.tianocore.org/edk2/
Other
1 stars 3 forks source link

Fix compiling BaseTools with GCC 12 #37

Closed crawfxrd closed 2 years ago

crawfxrd commented 2 years ago

Cherry-pick commits from upstream to fix building with GCC 12.

Test:

Ref: system76/firmware-open#313

XV-02 commented 2 years ago

While testing this on a set-up somewhat akin to the originating issue (Arch based distro with GCC-12) I'm consistently running into errors while attempting to build modules or execute commands within edk2.

Test building lemp10 (the firmware in the original issue) I receive:

build.py...
 : error 7000: Failed to execute command
       make tbuild [/home/system76/firmware-open/edk2/Build/UefiPayloadPkgX64/RELEASE_GCC5/X64/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe]

build.py...
 : error F002: Failed to build module
       /home/system76/firmware-open/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe.inf [X64, GCC5, RELEASE]

- Failed -

I'm going to pull the complete stdout for the build attempt, and also try other models, as well as building with ggc-11 as indicated.

crawfxrd commented 2 years ago

That's expected. This only fixes building BaseTools. I've updated the test cases.

I'm planning to switch to toolchain for building firmware-open in https://github.com/system76/firmware-open/pull/335, which will address the other failures (for now).

XV-02 commented 2 years ago

Should I test this in concert with https://github.com/system76/firmware-open/pull/335 then, or focus on testing that PR and then returning to this one?

crawfxrd commented 2 years ago

This one can be tested standalone by doing make -C BaseTools from edk2.