From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.1497.1571131966104819690 for ; Tue, 15 Oct 2019 02:32:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eWRFwbAJ; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571131965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EpWVdNEEHq73QGuLurEuCcZ9ttzcQraR9hv9rbOfY8o=; b=eWRFwbAJRZl0cxXTC4XOZBZF6VITpSumzEq7E5CNSwKNZ/kaBHrdX9QqhKprl3F80PRMTb lUzfQFEWcl6FvP3fi+xg1lqfTzBoJpFkULVhxWAeM3cxM+TlPuEBXHl7wVvvmCUIT2kSjh LP3trITIXA9RlN3rwuklTQy6WXKg4zk= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-7D3bkDhfMwi9vCOzIRwPdA-1; Tue, 15 Oct 2019 05:32:42 -0400 Received: by mail-wr1-f71.google.com with SMTP id t11so9834250wro.10 for ; Tue, 15 Oct 2019 02:32:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=elkYlTIY/9q5zpVHTHw5TgF4g4REU8oz4Lmzyt8cRiE=; b=R9hkkJJeg9rgID/3vRto6eCXyh/7UBJOLJbdMnP6aAbmC+LmjIawpUH4LLSvolgJY2 D+X0RAeysLj/25v6XUvOZWF67saPGftlmCuW6BFvG8+gYqJQEI3x0feZRfm41xzMBu8N ffpU1LbKnquCPx5ium8Ep2uzoUAFW7vva284lJXoaWioDlTGbgmIApB9lCvehFuM6eLn s5mqklwNtGZ9atiW7BiQC/fH885J+HrLgVR3lHnQ+7A83gIg/NEX4j02uJPVs5rBoTrj rLYuZdVlNzxcumOc8IHVzNcoSmumvbKY0DMGS0fjiRqQdNmv8GdbSu2Gy4QR6x1ury6k W5Gg== X-Gm-Message-State: APjAAAUD/ScKE7qWWDl9N22Er1QmdGdK2/UAZSD3iHfEa4PQEMSuivMR V9uNdLbhuz8sQXkyV3z7rYB1N4oD9tC+bWye6RiO9mVfFkxuScvqQ9Yqjqek4womG5IoFgy5OHl wW7xLDge41RP0dw== X-Received: by 2002:a5d:46d2:: with SMTP id g18mr12917714wrs.245.1571131961318; Tue, 15 Oct 2019 02:32:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfkyN/cZ21Doj4+g/jKuDPmdeda0ZjKCcKpmw7K6tWEEYnM8l0bCiU1Cx/9Wc12sUm0lYOCg== X-Received: by 2002:a5d:46d2:: with SMTP id g18mr12917699wrs.245.1571131961053; Tue, 15 Oct 2019 02:32:41 -0700 (PDT) Return-Path: Received: from [192.168.1.36] (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id 36sm27666035wrp.30.2019.10.15.02.32.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Oct 2019 02:32:40 -0700 (PDT) Subject: Re: [edk2-devel] [Patch v2 04/11] MdePkg Base.h: Add definition for CLANG9 tool chain To: devel@edk2.groups.io, liming.gao@intel.com References: <1571099210-12432-1-git-send-email-liming.gao@intel.com> <1571099210-12432-5-git-send-email-liming.gao@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Tue, 15 Oct 2019 11:32:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <1571099210-12432-5-git-send-email-liming.gao@intel.com> X-MC-Unique: 7D3bkDhfMwi9vCOzIRwPdA-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 10/15/19 2:26 AM, Liming Gao wrote: > CLANG9 tool chain defines __clang__ macro only, > doesn't define __GNUC__ macro. But, it uses some same definitions with GC= C. > So, update base definition for CLANG9 tool chain. >=20 > 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(-) >=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(__cl= ang__) > // > // X64 only. Use MS ABI version of GCC built-in macros for variable arg= ument lists. > // > @@ -1274,7 +1274,7 @@ typedef UINTN RETURN_STATUS; > =20 > **/ > #define RETURN_ADDRESS(L) ((L =3D=3D 0) ? _ReturnAddress() : (VOI= D *) 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/Pr= ocessorBind.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 symbo= ls. > /// Define this macro to unify the usage. > diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/Proc= essorBind.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 symbo= ls. > /// Define this macro to unify the usage. >=20 Reviewed-by: Philippe Mathieu-Daude