]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg CLANG35: add -std=c99 to dodge OpenSSL C atomics issue
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 3 Jun 2019 16:19:41 +0000 (18:19 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 3 Jun 2019 16:33:53 +0000 (18:33 +0200)
Commit c51f8bae7cabe ("CryptoPkg: Fix possible build problem with
Clang") added -std=c99 to the CLANG38 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.

Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
CryptoPkg/Library/OpensslLib/OpensslLib.inf
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf

index 2a581ceac70c0531f892ddc94210e6716bb1eb4a..4a76e7e65377e3034741fe9f173e9f30e48c440f 100644 (file)
@@ -97,4 +97,5 @@
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
index 8fdc6920ec2ed3d1004f7df6ea8e52ceef7f2eda..7827ff87553db714f08a5f054c8e9e422c499e1e 100644 (file)
@@ -94,4 +94,5 @@
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
index 9d639fd01eaec4a09ff0337346ad0185c0412053..c222bcaf2b69af7dd93f42ad2f556fef6fadc272 100644 (file)
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
   # --diag_remark=1     : Reduce severity of "#1-D: last line of file ends without a newline"\r
   RVCT:*_*_ARM_CC_FLAGS = -JCryptoPkg/Include --diag_remark=1\r
 \r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
index c9f4abb22aeaae206fd993b57cb3d7d129fe6d03..987a6c743f2b61b4cacc0487fb986c42a80d4aaa 100644 (file)
@@ -99,4 +99,5 @@
 \r
   XCODE:*_*_*_CC_FLAGS = -mmmx -msse\r
 \r
 \r
   XCODE:*_*_*_CC_FLAGS = -mmmx -msse\r
 \r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99\r
index 39749518027c83e79063dc918c721b76bf30e251..ac7f6f6ca7df61d8d25b4ab31ade55e9968fd01d 100644 (file)
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable\r
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable\r
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable\r
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable\r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r
index 8c290caacf1bf2279f1f9258c2f352b9bcc0a507..6fd31cbb376772918d727fa2c5b4d6bee88665f8 100644 (file)
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable\r
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable\r
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable\r
   GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-format -Wno-error=unused-but-set-variable\r
+  GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r
   GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r