public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
To: <devel@edk2.groups.io>, <joeyli.kernel@gmail.com>
Cc: "'Zhiguang Liu'" <zhiguang.liu@intel.com>,
	"'Michael D Kinney'" <michael.d.kinney@intel.com>,
	"'Chun-Yi Lee'" <jlee@suse.com>
Subject: 回复: [edk2-devel] [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12
Date: Fri, 13 Sep 2024 08:57:26 +0800	[thread overview]
Message-ID: <01ee01db0577$e7e763f0$b7b62bd0$@byosoft.com.cn> (raw)
In-Reply-To: <20240912065209.12517-1-jlee@suse.com>

Please submit it in Github Edk2 as pull request. I agree this is a good
change. 

> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Chun-Yi Lee
> 发送时间: 2024年9月12日 14:52
> 收件人: devel@edk2.groups.io
> 抄送: Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney
> <michael.d.kinney@intel.com>; Chun-Yi Lee <jlee@suse.com>
> 主题: [edk2-devel] [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=1a9b3f04c11eb467a8dc504a3
> 7dad57a371a0d4c
> 
> This patch removed the checking of __clang__ when using __FILE_NAME__.
> 
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Chun-Yi Lee <jlee@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 0db3b78e..fc5c8346 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
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120560): https://edk2.groups.io/g/devel/message/120560
Mute This Topic: https://groups.io/mt/108424554/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2024-09-13  0:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  6:52 [edk2-devel] [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12 Chun-Yi Lee
2024-09-12  6:56 ` joeyli via groups.io
2024-09-13  0:57 ` gaoliming via groups.io [this message]
2024-09-13  1:28   ` 回复: " joeyli via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='01ee01db0577$e7e763f0$b7b62bd0$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox