From d66b04921fca5d3a60709bb192a96e0d04c75d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 11 May 2016 18:48:04 +0200 Subject: [PATCH] Windows: Fix GCC/Clang argument being passed to MSVC Fixes #4620 (cherry picked from commits 972b0f78b3f89ea5096bc37658ceb859ad47fa44 and c7292b1f3d22323352a14e756497b03d66c90666) --- drivers/builtin_openssl2/SCsub | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub index a51b0a3ed6a..395dd21eef4 100644 --- a/drivers/builtin_openssl2/SCsub +++ b/drivers/builtin_openssl2/SCsub @@ -650,8 +650,10 @@ env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) #env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) env_ssl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) -env_ssl.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]); + +# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) +import os +if not (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): # not Windows and not MSVC + env_ssl.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]) env_ssl.add_source_files(env.drivers_sources,openssl_sources) - -