Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ovmf for openSUSE:Factory checked in 
at 2024-10-15 14:57:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ovmf (Old)
 and      /work/SRC/openSUSE:Factory/.ovmf.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ovmf"

Tue Oct 15 14:57:37 2024 rev:109 rq:1207855 version:202405

Changes:
--------
--- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes        2024-09-25 
21:52:48.775088003 +0200
+++ /work/SRC/openSUSE:Factory/.ovmf.new.19354/ovmf.changes     2024-10-15 
14:57:43.342977931 +0200
@@ -1,0 +2,35 @@
+Wed Oct  9 06:10:52 UTC 2024 - Joey Lee <j...@suse.com>
+
+- Add ovmf-MdePkg-DebugLib-Enable-FILE-NAME-as-DEBUG-ASSERT-for.patch
+  '5c8bdb190f6d MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12'
+  (bsc#1230425)
+- 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:
+- Changed the edk2-edk2-stable202405.tar.gz back to the tarball which directly
+  downloading from https://github.com/tianocore/edk2.
+  Because we moved to gcc-12 for reducing the size of firmware image. 
+        - Against this change, we modified the setup command in %prep section 
in
+          ovmf.spec back to original statement:
+            new: %setup -q -n edk2-edk2-stable%{version} 
+            old: %setup -q -n edk2
+
+-------------------------------------------------------------------

New:
----
  ovmf-BaseTools-Using-gcc12-for-building-image.patch
  ovmf-MdePkg-DebugLib-Enable-FILE-NAME-as-DEBUG-ASSERT-for.patch

BETA DEBUG BEGIN:
  New:  for x86_64 ovmf:
        - ovmf-BaseTools-Using-gcc12-for-building-image.patch
          'BaseTools: Using gcc12 for building x86_64 ovmf image'
  New:
- Add ovmf-MdePkg-DebugLib-Enable-FILE-NAME-as-DEBUG-ASSERT-for.patch
  '5c8bdb190f6d MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12'
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ovmf.spec ++++++
--- /var/tmp/diff_new_pack.jFMRo4/_old  2024-10-15 14:57:45.135052461 +0200
+++ /var/tmp/diff_new_pack.jFMRo4/_new  2024-10-15 14:57:45.143052794 +0200
@@ -71,6 +71,13 @@
 Patch10:        
%{name}-EmbeddedPkg-Library-Support-SOURCE_DATE_EPOCH-in-Vir.patch
 # Bug 1230587 - OVMF 202405 hangs due to missing fix
 Patch11:        
%{name}-NetworkPkg-TcpDxe-Fixed-system-stuck-on-PXE-boot-flo.patch
+# Bug 1230425 - Using shorter name of build root folder can build out a 
smaller ovmf image
+Patch12:        
%{name}-MdePkg-DebugLib-Enable-FILE-NAME-as-DEBUG-ASSERT-for.patch
+%ifarch x86_64
+%if 0%{?sle_version} >= 150500 && 0%{?sle_version} <= 150700
+Patch13:        %{name}-BaseTools-Using-gcc12-for-building-image.patch
+%endif
+%endif
 BuildRequires:  bc
 BuildRequires:  cross-arm-binutils
 BuildRequires:  cross-arm-gcc%{gcc_version}
@@ -78,6 +85,12 @@
 BuildRequires:  fdupes
 BuildRequires:  gcc
 BuildRequires:  gcc-c++
+%ifarch x86_64
+%if 0%{?sle_version} >= 150500 && 0%{?sle_version} <= 150700
+BuildRequires:  gcc12
+BuildRequires:  gcc12-c++
+%endif
+%endif
 BuildRequires:  iasl
 BuildRequires:  libuuid-devel
 BuildRequires:  mkisofs
@@ -188,12 +201,7 @@
 %endif
 
 %prep
-# We download the edk2-edk2-stable%{version}.tar.gz from
-# https://github.com/tianocore/edk2. Then we repackage the tarball for
-# renaming the root build folder from edk2-edk2-stable%{version}/ to edk2/
-# . This approach can reduce the size of FV image against FD_SIZE_2MB config.
-# Please check ovmf.change rpm changelog for more detail.
-%setup -q -n edk2
+%setup -q -n edk2-edk2-stable%{version}
 
 # bsc#973038 Remove the packages we don't need to avoid any potential
 # license issue.
@@ -326,6 +334,11 @@
 
 # Build BaseTools
 %ifarch x86_64
+%if 0%{?sle_version} >= 150500 && 0%{?sle_version} <= 150700
+echo "gcc_version="`gcc -dumpversion`
+export CC=gcc-12
+export CXX=g++-12
+%endif
        make -C BaseTools
 %endif
 %ifarch aarch64


++++++ edk2-edk2-stable202405.tar.gz ++++++
/work/SRC/openSUSE:Factory/ovmf/edk2-edk2-stable202405.tar.gz 
/work/SRC/openSUSE:Factory/.ovmf.new.19354/edk2-edk2-stable202405.tar.gz 
differ: char 1, line 1




++++++ ovmf-BaseTools-Using-gcc12-for-building-image.patch ++++++
>From d5d287720d28ae6ed384432d6844d601577d14b2 Mon Sep 17 00:00:00 2001
From: Chun-Yi Lee <j...@suse.com>
Date: Mon, 14 Oct 2024 12:02:41 +0800
Subject: [PATCH] BaseTools: Using gcc12 for building x86_64 ovmf image

After '5c8bdb190f6d MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for
GCC12' be merged to mainline. The __FILE_NAME__ marco can be used when
using gcc12 for building firmware image. It's useful for reducing the
final image size of FD_SIZE_2MB. (bsc#1230425)

The default gcc version of SLE15 is gcc7. This patch modified the
tools_def.template file which will be copied to Conf/tools_def.txt
after 'source edksetup.sh' command be run for setting building
environment.

In ovmf.spec, we will only apply this patch to SUSE 15.5/15.6/15.7
for building x86_64 image because the default gcc version of openSUSE
Tumbleweed is gcc14.
---
 BaseTools/Conf/tools_def.template | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index c34ecfd557..6e7ae252b8 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1353,15 +1353,15 @@ RELEASE_GCC5_IA32_DLINK_FLAGS    = 
DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,
 # GCC5 X64 definitions
 ##################
 *_GCC5_X64_OBJCOPY_PATH          = DEF(GCC5_X64_PREFIX)objcopy
-*_GCC5_X64_CC_PATH               = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_SLINK_PATH            = DEF(GCC5_X64_PREFIX)gcc-ar
-*_GCC5_X64_DLINK_PATH            = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_ASLDLINK_PATH         = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_ASM_PATH              = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_PP_PATH               = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_VFRPP_PATH            = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_ASLCC_PATH            = DEF(GCC5_X64_PREFIX)gcc
-*_GCC5_X64_ASLPP_PATH            = DEF(GCC5_X64_PREFIX)gcc
+*_GCC5_X64_CC_PATH               = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_SLINK_PATH            = DEF(GCC5_X64_PREFIX)gcc-ar-12
+*_GCC5_X64_DLINK_PATH            = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_ASLDLINK_PATH         = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_ASM_PATH              = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_PP_PATH               = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_VFRPP_PATH            = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_ASLCC_PATH            = DEF(GCC5_X64_PREFIX)gcc-12
+*_GCC5_X64_ASLPP_PATH            = DEF(GCC5_X64_PREFIX)gcc-12
 *_GCC5_X64_RC_PATH               = DEF(GCC5_X64_PREFIX)objcopy
 
 *_GCC5_X64_ASLCC_FLAGS           = DEF(GCC5_ASLCC_FLAGS) -m64
-- 
2.35.3


++++++ ovmf-MdePkg-DebugLib-Enable-FILE-NAME-as-DEBUG-ASSERT-for.patch ++++++
>From 5c8bdb190f6dd79f38ef6191754c9a26892f8d26 Mon Sep 17 00:00:00 2001
From: Chun-Yi Lee <j...@suse.com>
Date: Thu, 12 Sep 2024 14:32:05 +0800
Subject: [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12

Using __FILE_NAME__ is useful for reducing the size of debug image and
it's also good for reproducable builds. The gcc-12 also supported this
macro.

Ref: 
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=1a9b3f04c11eb467a8dc504a37dad57a371a0d4c

This patch removed the checking of __clang__ when using __FILE_NAME__.

References: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42579
Signed-off-by: Chun-Yi Lee <j...@suse.com>
---
 MdePkg/Include/Library/DebugLib.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Library/DebugLib.h 
b/MdePkg/Include/Library/DebugLib.h
index 0db3b78ec8..fc5c83463d 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -342,13 +342,13 @@ UnitTestDebugAssert (
   #if defined (_ASSERT)
     #undef _ASSERT
   #endif
-  #if defined (__clang__) && defined (__FILE_NAME__)
+  #if defined (__FILE_NAME__)
 #define _ASSERT(Expression)  UnitTestDebugAssert (__FILE_NAME__, 
DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))
   #else
 #define _ASSERT(Expression)  UnitTestDebugAssert (__FILE__, DEBUG_LINE_NUMBER, 
DEBUG_EXPRESSION_STRING (Expression))
   #endif
 #else
-  #if defined (__clang__) && defined (__FILE_NAME__)
+  #if defined (__FILE_NAME__)
 #define _ASSERT(Expression)  DebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, 
DEBUG_EXPRESSION_STRING (Expression))
   #else
 #define _ASSERT(Expression)  DebugAssert (__FILE__, DEBUG_LINE_NUMBER, 
DEBUG_EXPRESSION_STRING (Expression))
-- 
2.35.3

Reply via email to