From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.417.1571712488605490492 for ; Mon, 21 Oct 2019 19:48:08 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: michael.d.kinney@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 18:44:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,325,1566889200"; d="scan'208";a="200616838" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga003.jf.intel.com with ESMTP; 21 Oct 2019 18:44:54 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 21 Oct 2019 18:44:53 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX153.amr.corp.intel.com ([169.254.12.244]) with mapi id 14.03.0439.000; Mon, 21 Oct 2019 18:44:54 -0700 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "Gao, Liming" , "Kinney, Michael D" Subject: Re: [edk2-devel] [Patch v3 04/11] MdePkg Base.h: Add definition for CLANG9 tool chain Thread-Topic: [edk2-devel] [Patch v3 04/11] MdePkg Base.h: Add definition for CLANG9 tool chain Thread-Index: AQHVhLf68ftNXd1UzEqG39NlL35IW6dl6vAw Date: Tue, 22 Oct 2019 01:44:53 +0000 Message-ID: References: <1571295356-11608-1-git-send-email-liming.gao@intel.com> <1571295356-11608-5-git-send-email-liming.gao@intel.com> In-Reply-To: <1571295356-11608-5-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael D Kinney > -----Original Message----- > From: devel@edk2.groups.io On > Behalf Of Liming Gao > Sent: Wednesday, October 16, 2019 11:56 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D > Subject: [edk2-devel] [Patch v3 04/11] MdePkg Base.h: > Add definition for CLANG9 tool chain >=20 > 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. >=20 > Signed-off-by: Liming Gao > Cc: Michael Kinney > Reviewed-by: Philippe Mathieu-Daude > --- > MdePkg/Include/Base.h | 6 +++--- > MdePkg/Include/Ia32/ProcessorBind.h | 4 ++-- > MdePkg/Include/X64/ProcessorBind.h | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) >=20 > 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(__clang__) > // > // X64 only. Use MS ABI version of GCC built-in macros > for variable argument 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/ProcessorBind.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/ProcessorBind.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. > -- > 2.13.0.windows.1 >=20 >=20 >=20