From nobody Fri Dec 19 07:17:15 2025 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+48196+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+48196+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1569570437; cv=none; d=zoho.com; s=zohoarc; b=VdSD8t9dinQhYBuAQhOL0d5Ss/vkhvmzXKl4IqOHPu0zAO+sO1ursgp60Y8dhVd+DP7L+ji73TQWBQ+naT211XnoyT/7+lewiC7wkybKnJCJdp+eK4nHhodduCNbsyD1FAQ9bT+Zw8jwVVS9bZ1JOg8SE/XcbsZ408mwjU9RIoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569570437; h=Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=/mYhGNdZT5rGuSJgrgmtX/NtWDb3SvkvcQ3TIBc/a20=; b=E+78L4RtDJ8y6yVcRyHrcMBJOCMtlg2XuHnEtMCCP6vjEOwiWzWWCHuGj1e++IbUP2mlcWGojhO5yXWO2TkRnsoZ7JIFJ2sxLZnkwZKK3sLUMGERqaGXyMX6rXcQLpEXVlwJH+Uq0IZ4TilC0kX+VCL7jt/wZnd2egA0uhMBhNE= 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+48196+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 1569570437158905.9053989516569; Fri, 27 Sep 2019 00:47:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VG2PYY1788612xA4eUaAoRm6; Fri, 27 Sep 2019 00:47:16 -0700 X-Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Fri, 27 Sep 2019 00:47:15 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2019 00:47:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,554,1559545200"; d="scan'208";a="389884686" X-Received: from shwde7172.ccr.corp.intel.com ([10.239.158.22]) by fmsmga005.fm.intel.com with ESMTP; 27 Sep 2019 00:47:14 -0700 From: "Liming Gao" To: devel@edk2.groups.io Subject: [edk2-devel] [Patch 04/12] MdePkg Base.h: Add definition for CLANG9 tool chain Date: Fri, 27 Sep 2019 15:46:27 +0800 Message-Id: <1569570395-11240-5-git-send-email-liming.gao@intel.com> In-Reply-To: <1569570395-11240-1-git-send-email-liming.gao@intel.com> References: <1569570395-11240-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: qXQuJYAFIiVpJaXYoS0yukWax1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1569570436; bh=kn71NvhFubFbhdnrAVBN1st0gMIuKaYqk+khAasPE2s=; h=Date:From:Reply-To:Subject:To; b=LffkZ0zqp6Jsid5TDbeMi0jKwaGGR5eC2GqyFCRx3pYQ54YfBO+hMsh0NFoNHbN137H U6RWKyz2H11eaioROSQOrJcRUwcTD3dz9FR03/+J16oNHQ+YaX9VZofJVxgKxeSzU2ERF 4pmg+CAlGK9i1RRO78o1NRClllopUR0sYlQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 (#48196): https://edk2.groups.io/g/devel/message/48196 Mute This Topic: https://groups.io/mt/34309057/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-