From nobody Mon Feb 9 03:13:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49161+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49161+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571295371; cv=none; d=zoho.com; s=zohoarc; b=MJSw8G9soSktsIdIuXJFttEolp89BqbxhYA/OZyFmStxTO1mkGyFU9vyDX5cqenUUq14vw5NFUtAWWS80rsXOXsyom3njewoBVvHXICvf0INSD+pjtTbfx7Kqz+vvzwXS2UUjWWGOopFkQRBkBRNcOuP46i5fgV3HUVE2QGCQGg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571295371; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=dszmQd1tUV26RlFY7p+64Q6aFU+d5WPrqW15dbLJAWQ=; b=DxIZlySSxLBD9Cf/I6LhFvmfIX40AH4nwdUMUwq8IXlrBsoadpqpcRXdnDe9HMvPaP57BHMFuTa03AJhpYkwwaciourUqIIi1Xqh+sRgOg9e7x3/C48lrmjTmi1Fjsj2N3LSrsEZ4IqMzHLN6LQykit1cgEkHdIJDsjNGuUhUQo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49161+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1571295371342671.5327513722876; Wed, 16 Oct 2019 23:56:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vJnLYY1788612xPWKqcJh8gf; Wed, 16 Oct 2019 23:56:10 -0700 X-Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web10.3108.1571295367890091277 for ; Wed, 16 Oct 2019 23:56:10 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 23:56:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="208577864" X-Received: from shwde7172.ccr.corp.intel.com ([10.239.158.22]) by fmsmga001.fm.intel.com with ESMTP; 16 Oct 2019 23:56:09 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Michael Kinney Subject: [edk2-devel] [Patch v3 04/11] MdePkg Base.h: Add definition for CLANG9 tool chain Date: Thu, 17 Oct 2019 14:55:48 +0800 Message-Id: <1571295356-11608-5-git-send-email-liming.gao@intel.com> In-Reply-To: <1571295356-11608-1-git-send-email-liming.gao@intel.com> References: <1571295356-11608-1-git-send-email-liming.gao@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liming.gao@intel.com X-Gm-Message-State: sMQRsrnPErHepn1CGeEDcYUXx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571295370; bh=jUTh5g0jyHOMNNboRLWUxtqrvX2nEg+B3VoZUIGNO1Y=; h=Cc:Date:From:Reply-To:Subject:To; b=aOmLVV5aVFE0L1u/0Cfrx6n4sSjbDoG/jqoLj+EcM63eyxNgJMhE5Kvd1CdUfbt/FIN kBwBshGzH+lQBKUVarLAcdLsno079QcEvGdyJU6mg6ezTZ5h6I1qLSCH9f2cKErtWhrPU ceCxqfIhj75/6ip5E6VUmef9CRYwxMrpCmE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1603 CLANG9 tool chain defines __clang__ macro only, doesn't define __GNUC__ macro. But, it uses some same definitions with GCC. So, update base definition for CLANG9 tool chain. Signed-off-by: Liming Gao Cc: Michael Kinney Reviewed-by: Philippe Mathieu-Daude Reviewed-by: Michael D Kinney --- MdePkg/Include/Base.h | 6 +++--- MdePkg/Include/Ia32/ProcessorBind.h | 4 ++-- MdePkg/Include/X64/ProcessorBind.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index d94b8a5f93..4680e64136 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -621,9 +621,9 @@ typedef char* VA_LIST; #define VA_END(Marker) (Marker =3D (VA_LIST) 0) #define VA_COPY(Dest, Start) ((void)((Dest) =3D (Start))) =20 -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) =20 -#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS) +#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS) && !defined(__clan= g__) // // X64 only. Use MS ABI version of GCC built-in macros for variable argume= nt lists. // @@ -1274,7 +1274,7 @@ typedef UINTN RETURN_STATUS; =20 **/ #define RETURN_ADDRESS(L) ((L =3D=3D 0) ? _ReturnAddress() : (VOID *= ) 0) -#elif defined(__GNUC__) +#elif defined (__GNUC__) || defined (__clang__) void * __builtin_return_address (unsigned int level); /** Get the return address of the calling function. diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/Proc= essorBind.h index 497c58b33b..fa4b7e8e98 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -281,7 +281,7 @@ typedef INT32 INTN; /// Microsoft* compiler specific method for EFIAPI calling convention. /// #define EFIAPI __cdecl -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) /// /// GCC specific method for EFIAPI calling convention. /// @@ -294,7 +294,7 @@ typedef INT32 INTN; #define EFIAPI #endif =20 -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) /// /// For GNU assembly code, .global or .globl can declare global symbols. /// Define this macro to unify the usage. diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/Proces= sorBind.h index 6f65acd609..387e9c5c9c 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -313,7 +313,7 @@ typedef INT64 INTN; #define EFIAPI #endif =20 -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) /// /// For GNU assembly code, .global or .globl can declare global symbols. /// Define this macro to unify the usage. --=20 2.13.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49161): https://edk2.groups.io/g/devel/message/49161 Mute This Topic: https://groups.io/mt/34694443/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-