From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0EEC494119B for ; Thu, 12 Sep 2024 06:56:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=uz1Nl0Wq+ti57IzBrP5a+5ScMTv395a66ZGJifjNKCs=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:User-Agent:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20240830; t=1726124173; v=1; x=1726383372; b=S+dNdhPusC5eVw0PVQCPMW7m21TkOSLyss2iKTt320bbKKkEnrTGVNiW3O7CUf3QheYT9PB2 ExfNAZiAiPloJwoIhYJIs+HozFhzHb4fS+AqQofyRq2J/WgSo/nQPaDkLLqSUo3UodQeu6bSz3N JbkeDETBgUQ0YA3NzsYIozmlEyM3P6iBp4pZ3Fd/J6ptawt437GdVhg59FbBBwz5zPhseY6pB0e 9kpfsi7oTqp6aI4bjclY7QZY2dHbdp9GySM+V/1wE0UjBae+oD56Eu1gw6M/bcZM8qRhIZv24m4 qomNSVwYRujzxXIXWsHLIf84GepGAK1q75RM1mN3E6JuQ== X-Received: by 127.0.0.2 with SMTP id 98hcYY7687511xMtJktvfIba; Wed, 11 Sep 2024 23:56:12 -0700 X-Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web10.41712.1726124171626222046 for ; Wed, 11 Sep 2024 23:56:12 -0700 X-Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-374bd0da617so462836f8f.3 for ; Wed, 11 Sep 2024 23:56:11 -0700 (PDT) X-Gm-Message-State: szzQcFIKcgk4s3ppeFbvpCmsx7686176AA= X-Google-Smtp-Source: AGHT+IG2nUCJWTN9/KVtg7bsOLtfqgAcb1MiiAkXzag7YriRjAzxSsOURVDI3LxDPxGny/rC2dvAgA== X-Received: by 2002:a5d:61c2:0:b0:371:a60e:a821 with SMTP id ffacd0b85a97d-378c2d4c9c6mr952230f8f.38.1726124169388; Wed, 11 Sep 2024 23:56:09 -0700 (PDT) X-Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadc04041csm11785619a91.27.2024.09.11.23.56.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2024 23:56:08 -0700 (PDT) Date: Thu, 12 Sep 2024 14:56:05 +0800 From: "joeyli via groups.io" To: Chun-Yi Lee Cc: devel@edk2.groups.io, Zhiguang Liu , Michael D Kinney Subject: Re: [edk2-devel] [PATCH] MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12 Message-ID: <20240912065605.GZ3296@linux-l9pv.suse> References: <20240912065209.12517-1-jlee@suse.com> MIME-Version: 1.0 In-Reply-To: <20240912065209.12517-1-jlee@suse.com> User-Agent: Mutt/1.11.4 (2019-03-13) Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 11 Sep 2024 23:56:12 -0700 Resent-From: jlee@suse.com Reply-To: devel@edk2.groups.io,jlee@suse.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=S+dNdhPu; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Hi all, On Thu, Sep 12, 2024 at 02:52:09PM +0800, Chun-Yi Lee wrote: > 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__. > I also filed a merge request for this patch: MdePkg DebugLib: Enable FILE NAME as DEBUG ASSERT for GCC12 #6193 https://github.com/tianocore/edk2/pull/6193 Thanks a lot! Joey Lee > Cc: Zhiguang Liu > Cc: Michael D Kinney > Signed-off-by: Chun-Yi Lee > --- > 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 (#120555): https://edk2.groups.io/g/devel/message/120555 Mute This Topic: https://groups.io/mt/108408749/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-