From nobody Fri May 3 00:03:51 2024 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+41829+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+41829+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1559579090; cv=none; d=zoho.com; s=zohoarc; b=FqKC73GlYYECCHSxqo+fO9O94mAtH8MSSA+DfZgf4J61cfo10MCFG/Lqz3ptE15Qz6b3XZPZr3NJKrrNrV651tEUKdyzc9FC4BWATNtafRjXRGgzJZt+1Lk64mZI64UcMAzx2x5OQW1YwdFv/5jzgJTqOXVgZWWObw3mdlPP3fc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559579090; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=YwCZFH3d93rDR4i7OBmQM+A4z0RgFeP2wDqTQGoGB08=; b=mEynpab3eJZFtggonGL8CjizVDU09bFcKhFUlNWDBknHNEhV4cjXO67USHZYiLyW8KgZ/DPLyZK3orqam2467XIDtB6oUidCORQhz+aGzqZV9OEFRu062PjCa3gGwTNNHQr0tRSw2C2OtXkhejr5Te3hmCgVccJo/a2+Y8zLBq8= 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+41829+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 1559579090767699.2702005778099; Mon, 3 Jun 2019 09:24:50 -0700 (PDT) Return-Path: X-Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by groups.io with SMTP; Mon, 03 Jun 2019 09:24:49 -0700 X-Received: by mail-wr1-f65.google.com with SMTP id m3so12768062wrv.2 for ; Mon, 03 Jun 2019 09:24:49 -0700 (PDT) X-Gm-Message-State: APjAAAW7Zy32mtJddoJlKporQfKCRJatQfexEfYYXJ56p1v3z78W2cVS G7W3liDFlCptudBnVCRDa9FWf7PxJ0CNPw== X-Google-Smtp-Source: APXvYqxbK7uJB6N8twvP8nKd/MCThaK264szLVOpnqtCr0Xd4bHlo3HQ91TlrpFiCTuF/JNXQZQUmA== X-Received: by 2002:adf:ce03:: with SMTP id p3mr18239241wrn.94.1559579087604; Mon, 03 Jun 2019 09:24:47 -0700 (PDT) X-Received: from e111045-lin.nice.arm.com (206.red-79-157-180.dynamicip.rima-tde.net. [79.157.180.206]) by smtp.gmail.com with ESMTPSA id s63sm6532618wme.17.2019.06.03.09.24.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jun 2019 09:24:46 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, lersek@redhat.com, michael.d.kinney@intel.com, liming.gao@intel.com, Ard Biesheuvel , Jian J Wang , Ting Ye , Xiaoyu Lu Subject: [edk2-devel] [PATCH] CryptoPkg CLANG35: add -std=c99 to dodge OpenSSL C atomics issue Date: Mon, 3 Jun 2019 18:24:42 +0200 Message-Id: <20190603162442.3459-1-ard.biesheuvel@linaro.org> 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,ard.biesheuvel@linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559579090; bh=5UjQVcjNWpQVdu0iviqs+/cjRokkEJutHb4ljCzSjbg=; h=Cc:Date:From:Reply-To:Subject:To; b=tf9Rznol2ISMM+NUgXZyE/f4LSbA7RycOmHytjRM8/v+B+UnM3jU4vSGpQZXsHcUGR/ oC4aE4W4BvU0ojZSL1nb8TZEbukS+ijF6eCUQ2lZihfNgHSe3QKIOg877dR79EI7TiLM+ bsK3dC76ecO/EI727Okt82m3Jj3ybtMEwdo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Commit c51f8bae7cabe ("CryptoPkg: Fix possible build problem with Clang") added -std=3Dc99 to the compiler command line of packages that incorporate parts of OpenSSL, to ensure that the new C atomics code used by OpenSSL for refcounting (which we don't care about) does not pull in system C library headers, which we cannot rely on when (cross)building EDK2 code. Unsurprisingly, CLANG35 (which is only defined for ARM and AARCH64) suffers from the exact same issue, so let's add the same flags there as well. Cc: Jian J Wang Cc: Ting Ye Cc: Xiaoyu Lu Signed-off-by: Ard Biesheuvel Reviewed-by: Jian J Wang Reviewed-by: Leif Lindholm --- CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf | 1 + CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 1 + CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf | 1 + CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + 6 files changed, 6 insertions(+) diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Li= brary/BaseCryptLib/BaseCryptLib.inf index 2a581ceac70c..4a76e7e65377 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -97,4 +97,5 @@ # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 =20 + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/PeiCryptLib.inf index 8fdc6920ec2e..7827ff87553d 100644 --- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf @@ -94,4 +94,5 @@ # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 =20 + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf b/CryptoPkg= /Library/BaseCryptLib/RuntimeCryptLib.inf index 9d639fd01eae..c222bcaf2b69 100644 --- a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf @@ -102,4 +102,5 @@ # --diag_remark=3D1 : Reduce severity of "#1-D: last line of file en= ds without a newline" RVCT:*_*_ARM_CC_FLAGS =3D -JCryptoPkg/Include --diag_remark=3D1 =20 + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf b/CryptoPkg/Lib= rary/BaseCryptLib/SmmCryptLib.inf index c9f4abb22aea..987a6c743f2b 100644 --- a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf @@ -99,4 +99,5 @@ =20 XCODE:*_*_*_CC_FLAGS =3D -mmmx -msse =20 + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index 39749518027c..ac7f6f6ca7df 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -601,6 +601,7 @@ GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/= Library/OpensslLib/OpensslLibCrypto.inf index 8c290caacf1b..6fd31cbb3767 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -557,6 +557,7 @@ GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -Wno-error=3Dformat -Wno-format -Wno-error=3Dunuse= d-but-set-variable -DNO_MSABI_VA_FUNCS GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-error=3Dunused-but-set-variable GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) -Wno-error=3Dmaybe-uniniti= alized -Wno-format -Wno-error=3Dunused-but-set-variable + GCC:*_CLANG35_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized GCC:*_CLANG38_*_CC_FLAGS =3D -std=3Dc99 -Wno-error=3Duninitialized =20 # suppress the following warnings in openssl so we don't break the build= with warnings-as-errors: --=20 2.17.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 (#41829): https://edk2.groups.io/g/devel/message/41829 Mute This Topic: https://groups.io/mt/31912226/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-