From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bzUyBFo+; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: philmd@redhat.com) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by groups.io with SMTP; Tue, 24 Sep 2019 08:45:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569339936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=UI6f0sVD/KLPLGgqSPltYQ4CSjVqRnUzTqzX7mRQl/o=; b=bzUyBFo+De2flaYTkNScEERybGeUdNJK4l8JrsYrTswl/F80lTFgVEdQi1JN0ekLC1OpjW Wc50KWzQRFqn+nZWhAG2X26o6o6rH7mTBQJ0BCBb711kOsJ1aerIO0B886+xx1aO1r5DU6 K9vm8gv36SUCSELiEKKDQw0rL73VEa0= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-xbubLUPoOdqN9XFB6EB71g-1; Tue, 24 Sep 2019 11:45:34 -0400 Received: by mail-wr1-f69.google.com with SMTP id v18so744951wro.16 for ; Tue, 24 Sep 2019 08:45:34 -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:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mGhVLniU32Jm2Wo+GYRY70ak9uqEgOoDbT1PlRw8q2s=; b=nUJuzxLI/LrVxavBAQqfY+l6lTANNfTgfOn+YNMU4wR+YDRcLdF+OhrlRVlLoTBRQz n1KdWUaFS/mMbizxcKb05ZQgjkCcY+Z8jsVi6N+4+PvaUwBGp5NIndsOZimr6wc97j/S ABNFK8qcD5VsN6qV2xnUD73+E9aRHiZrDt/WQVxA4JC7aZWxjbiBlph8m62ATvVStQmb VbqQ44UYXaj+9742si0GkMNuH2z/2bHZAE8jxoUC/2KD0dHcLJkiUEHpdWvQCOSuwmOd +s+3prnVOB8QDtPXtF6X9c1u/0a/QqzPsl5sriLAW+zVxSD5/bwi8aMTcTQIqUwIJguw 9etw== X-Gm-Message-State: APjAAAV8N7jHLxyvip+g0Qx+04jBqU9c6/hTSNgoy1cyQZaEa6kGzAb8 t8XsoGzFgyBZgrwzBmeGwJmOwcgwKLQ5n5IDT2u8uKvWEfJzBsOM+za6WTR+C7PR4phHi5xYiHg 4py2xUzcVSqVDHQ== X-Received: by 2002:a5d:494d:: with SMTP id r13mr3001532wrs.166.1569339933458; Tue, 24 Sep 2019 08:45:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJNFu/eklbK30gKW6f5t23qkb0sRGFqMrRAKB7iK0BBzHUdKgUijRygGXb6k/Z08QtQvhlLA== X-Received: by 2002:a5d:494d:: with SMTP id r13mr3001523wrs.166.1569339933284; Tue, 24 Sep 2019 08:45:33 -0700 (PDT) Return-Path: Received: from [192.168.1.115] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id 207sm556948wme.17.2019.09.24.08.45.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Sep 2019 08:45:32 -0700 (PDT) Subject: Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch To: devel@edk2.groups.io, liming.gao@intel.com Cc: Michael D Kinney References: <20190924150519.10304-1-liming.gao@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <2a1109f6-737d-2189-783c-db1fd45d2d84@redhat.com> Date: Tue, 24 Sep 2019 17:45:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190924150519.10304-1-liming.gao@intel.com> X-MC-Unique: xbubLUPoOdqN9XFB6EB71g-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 9/24/19 5:05 PM, Liming Gao wrote: > EBC compiler doesn't support C11 static_assert macro. > So, define STATIC_ASSERT as empty to pass EBC arch build. > STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8= d0 >=20 > Cc: Michael D Kinney > Signed-off-by: Liming Gao > --- > MdePkg/Include/Base.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h > index ed85b98318..70e4d8daf1 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -799,12 +799,15 @@ typedef UINTN *BASE_LIST; > @param Message Raised compiler diagnostic message when expression= is false. > =20 > **/ > -#ifdef _MSC_EXTENSIONS > +#ifdef MDE_CPU_EBC > + #define STATIC_ASSERT(Expression, Message) > +#elif _MSC_EXTENSIONS > #define STATIC_ASSERT static_assert > #else > #define STATIC_ASSERT _Static_assert > #endif > =20 > + > // > // Verify that ProcessorBind.h produced UEFI Data Types that are complia= nt with > // Section 2.3.1 of the UEFI 2.3 Specification. >=20 Reviewed-by: Philippe Mathieu-Daude