Comment # 9 on bug 1230425 from Joey Lee
(In reply to Joey Lee from comment #5)
> Then we should find a good timing for switching to gcc12. My plan is that
> SLE16. Before this we should still use gcc-7 in 15-SP7.

Finally I choice gcc-12 for building ovmf on 15-SP7:

-------------------------------------------------------------------
Mon Oct 21 06:26:22 UTC 2024 - Joey Lee <jlee@suse.com>

- Update to edk2-stable202408
    - Features (https://github.com/tianocore/edk2/releases): 
...
    - We also got image size issue when cross compiling x86_64 FD_SIZE_2MB
image
      on aarch64 environment. So using x86_64-suse-linux-gcc-12 on SLE15-SP7 or
      Leap 15.4 codebases. Here is the pseudocode in ovmf.spec:
         ifnarch x86_64
         BuildRequires:  cross-x86_64-binutils
         if sle_version >= 150500 && sle_version <= 150700
         BuildRequires:  cross-x86_64-gcc12 
         else 
         BuildRequires:  cross-x86_64-gcc+gcc_version 
         endif
         endif
        - The x86_64-suse-linux-gcc-12 be auto-linked to x86_64-suse-linux-gcc
          after installed cross-x86_64-gcc12. So we don't need to add any
          downstream patch for corss compiling x86_64 2MB image on aarch64.


-------------------------------------------------------------------
Wed Oct  9 06:10:52 UTC 2024 - Joey Lee <jlee@suse.com>

- Using gcc12 for building x86_64 ovmf image:
  As the item 'Changed the approach for creating the edk2 source code tarball'
  in 'Update to edk2-stable202405' change log. We modified the folder name in
  edk2-edk2-stable%{version}.tar.gz source code tarball to avoid the size
  problem against FD_SIZE_2MB config. (bsc#1230425)
  We can use gcc-12 to avoid the size problem because gcc-12 supported
  __FILE_NAME__ macro for reproducing the size of firmware image. So we
  applied the above 5c8bdb190f6d patch and aldo the following SLE15-SP7/
  Leap 15.7 specific patch for setting the gcc-12 as the default compiler
  for x86_64 ovmf:
        - ovmf-BaseTools-Using-gcc12-for-building-image.patch
          'BaseTools: Using gcc12 for building x86_64 ovmf image'
        - This patch only be applied to x86_64 image when building on SUSE
          15.5/15.6/15.7 codebases. Here is the pseudocode in ovmf.spec:
                ifarch x86_64
                if sle_version >= 150500 && sle_version <= 150700
                Patch13 ovmf-BaseTools-Using-gcc12-for-building-image.patch
                endif
                endif
          The main target is SLE15-SP7 and Leap 15.7. The SUSE 15.5/15.6 is
          for building in Virtualization development project on OBS:


You are receiving this mail because: