Bug 211074 - sysutils/uefi-edk2-bhyve: support building with gcc5 or later
Summary: sysutils/uefi-edk2-bhyve: support building with gcc5 or later
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rebecca Cran
URL:
Keywords: feature, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-07-13 08:51 UTC by Jan Beich
Modified: 2020-10-15 02:55 UTC (History)
8 users (show)

See Also:
bugzilla: maintainer-feedback? (fabian.freyer)
gerald: merge-quarterly-


Attachments
v1 (1.84 KB, patch)
2016-07-13 08:51 UTC, Jan Beich
no flags Details | Diff
patch (2.28 KB, patch)
2020-06-10 00:00 UTC, rozhuk.im
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2016-07-13 08:51:31 UTC
Created attachment 172457 [details]
v1

Respect GCC version preference in make.conf e.g., DEFAULT_VERSIONS=gcc=5 . I've only checked poudriere build with the following configuratins.

- 10.3R amd64, gcc48, uefi-edk2-bhyve + uefi-edk2-bhyve-csm: OK
- 10.3R amd64, gcc5, uefi-edk2-bhyve + uefi-edk2-bhyve-csm: OK
Comment 1 Fabian Freyer 2016-07-14 13:05:32 UTC
related to bug #211079, USE_GCC adds a RUN_DEPEND
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-14 13:41:50 UTC
Reporter is committer, assign accordingly
Comment 3 Jan Beich freebsd_committer 2016-09-18 21:43:01 UTC
Resign - still no approval. Not sure why the patch here is blocked by bug 211079 but Clang remains out of scope i.e., after -Werror stuff it fails as

  $ BaseTools/Source/C/bin/GenFw -o Build/BhyveX64/RELEASE_GCC48/X64/BhyvePkg/BhyveAcpiTables/BhyveAcpiTables/OUTPUT/./Facp.acpi -c Build/BhyveX64/RELEASE_GCC48/X64/BhyvePkg/BhyveAcpiTables/BhyveAcpiTables/OUTPUT/./Facp.dll
  GenFw: ERROR 3000: Invalid
    Build/BhyveX64/RELEASE_GCC48/X64/BhyvePkg/BhyveAcpiTables/BhyveAcpiTables/OUTPUT/./Facp.dll unsupported ELF EM_X86_64 relocation 0x18.
  GenFw: ERROR 3000: Invalid
    Build/BhyveX64/RELEASE_GCC48/X64/BhyvePkg/BhyveAcpiTables/BhyveAcpiTables/OUTPUT/./Facp.dll unsupported ELF EM_X86_64 relocation 0x18.
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-17 07:24:44 UTC
Is this still relevant?
Comment 5 Alan Somers freebsd_committer 2018-02-08 15:49:08 UTC
It's more relevant than ever, now that gcc48 is deprecated.
Comment 6 Alan Somers freebsd_committer 2018-02-08 15:51:34 UTC
It looks like upstream has fixed at least some of the problems with Clang.

https://github.com/tianocore/edk2/commit/d3bb711834acd3eda35a07d0be7911bc3dbb9e6f
Comment 7 Rebecca Cran freebsd_committer 2018-12-24 07:11:06 UTC
The "ERROR 3000" message is due to the build trying to use the system ld linker.
Installing binutils from ports and setting up symlinks such that /usr/local/bin/ld is used lets the build complete.
Comment 8 Rebecca Cran freebsd_committer 2018-12-24 07:13:52 UTC
Alan: one problem is that bhyve is stuck on the pretty ancient UDK2014 or UDK2014.SP1 branch (I can't recall which). Once I get my current work on UEFI support in the loader and installer out the way I plan to work on updating BhyvePkg to work with UDK2018.
Comment 9 rozhuk.im 2020-06-10 00:00:31 UTC
Created attachment 215412 [details]
patch

This fix build with gcc9.
Try to fix clang but it require more time to dig into build system.
Comment 10 Rebecca Cran freebsd_committer 2020-06-10 00:54:36 UTC
Thanks. I'm actually in the process of updating the port to use the latest edk2-stable202005 code: the last hurdle is fixing CSM support.

When that's done, there should be no more problems with using newer versions of GCC, though CLANG will still need work.
Comment 11 Rebecca Cran freebsd_committer 2020-06-10 00:55:13 UTC
Take this ticket, since I'm working on updating the port.
Comment 12 Gerald Pfeifer freebsd_committer 2020-06-14 20:16:05 UTC
(In reply to Rebecca Cran from comment #11)
> Take this ticket, since I'm working on updating the port.

Thank you, Rebecca!