On 08/10/17 14:15, Laszlo Ersek wrote:
> So I think it comes down to another toolchain difference between RHEL-7
> and Fedora-26. Likely gcc -- the commit you identified is also related
> to a C compiler. In particular:
> - on RHEL-7, the system compiler (gcc-4.8.5) is mapped to the "GCC48"
> toolchain settings of edk2, which lack support for LTO (link time
> - in the Fedora package's SPEC file, the "GCC49" toolchain settings are
> selected for the build in a fixed manner, which also lack support for
> - in kraxel's SPEC file, Fedora-26's gcc-7 compiler is mapped to the
> "GCC5" toolchain settings, which *enable* LTO (for DEBUG).
> The test you suggested to David elsewhere in this thread confirms that
> the Fedora -- well, "virt-preview" -- package, built with GCC49
> settings, works, and that Gerd's package, built with GCC5 settings,
> I'll spin up a Fedora-26 guest and build OVMF there.
I confirm that building with gcc-7.1.1 on Fedora-26, using the GCC5
toolchain settings and the DEBUG target (= optimizations enabled), the
problem reproduces for me.
Keeping everything the same except switching DEBUG to NOOPT (=
optimizations disabled) the OVMF binary returns to working state.
So, OVMF is being mis-built / mis-optimized by gcc-7.1, with the DEBUG
GCC5 settings. I'll try to tweak both the code and the gcc flags.
vfio-users mailing list