From 67a733cd316638b31b5771f61e3b7f1d11f731f9 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 7 Oct 2019 23:02:44 +0300 Subject: Release version 1.1.1+5 Adapt for building with Clang on Windows --- libcrypto/build/root.build | 8 +++++--- libcrypto/libcrypto/buildfile | 15 ++++++++------- libcrypto/manifest | 2 +- libcrypto/tests/build/root.build | 6 ++++++ libssl/build/root.build | 8 +++++--- libssl/libssl/buildfile | 11 ++++++----- libssl/manifest | 2 +- libssl/tests/build/root.build | 6 ++++++ openssl/build/root.build | 8 +++++--- openssl/manifest | 2 +- openssl/openssl/buildfile | 11 ++++++----- 11 files changed, 50 insertions(+), 29 deletions(-) diff --git a/libcrypto/build/root.build b/libcrypto/build/root.build index f93eb56..0b6d720 100644 --- a/libcrypto/build/root.build +++ b/libcrypto/build/root.build @@ -9,6 +9,8 @@ using c h{*}: extension = h c{*}: extension = c -# The test target for cross-testing (running tests under Wine, etc). -# -test.target = $c.target +if ($c.target.system == 'win32-msvc') + c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + c.coptions += /wd4251 /wd4275 /wd4800 diff --git a/libcrypto/libcrypto/buildfile b/libcrypto/libcrypto/buildfile index 34c62bc..2c81156 100644 --- a/libcrypto/libcrypto/buildfile +++ b/libcrypto/libcrypto/buildfile @@ -33,6 +33,8 @@ linux = ($tclass == 'linux') bsd = ($tclass == 'bsd') windows = ($tclass == 'windows') +msvc_runtime = ($c.target.system == 'win32-msvc') + gcc = ($c.class == 'gcc') msvc = ($c.class == 'msvc') mingw = ($c.target.system == 'mingw32') @@ -74,13 +76,12 @@ else # particular, we don't pass -DOPENSSL_USE_APPLINK preprocessor option no # compile uplink.c and auto-generated uplink-x86_64.asm. # - if $msvc - { + if $msvc_runtime c.poptions += -DOPENSSL_SYS_WIN32 -D_CRT_SECURE_NO_DEPRECATE \ -D_WINSOCK_DEPRECATED_NO_WARNINGS + if $msvc c.coptions += /Gs0 /GF /Gy - } else c.poptions += -D_MT } @@ -212,11 +213,11 @@ else if $mingw libs{crypto}: c.loptions += -Wl,--enable-auto-image-base - c.libs += $regex.apply(ws2_32 gdi32 crypt32, \ - '(.+)', \ - $msvc ? '\1.lib' : '-l\1') + c.libs += $regex.apply(ws2_32 gdi32 crypt32, \ + '(.+)', \ + $msvc_runtime ? '\1.lib' : '-l\1') - if $msvc + if $msvc_runtime { # Suppress the 'object file does not define any public symbols' warning. # diff --git a/libcrypto/manifest b/libcrypto/manifest index 31ecdb7..df73bd4 100644 --- a/libcrypto/manifest +++ b/libcrypto/manifest @@ -3,7 +3,7 @@ name: libcrypto # Note: remember to update doc-url below! # -version: 1.1.1+4 +version: 1.1.1+5 upstream-version: 1.1.1c project: openssl diff --git a/libcrypto/tests/build/root.build b/libcrypto/tests/build/root.build index 02e2e5d..b14a261 100644 --- a/libcrypto/tests/build/root.build +++ b/libcrypto/tests/build/root.build @@ -7,6 +7,12 @@ using c h{*}: extension = h c{*}: extension = c +if ($c.target.system == 'win32-msvc') + c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + c.coptions += /wd4251 /wd4275 /wd4800 + # Every exe{} in this subproject is by default a test. # exe{*}: test = true diff --git a/libssl/build/root.build b/libssl/build/root.build index 2a4a530..e5ca350 100644 --- a/libssl/build/root.build +++ b/libssl/build/root.build @@ -7,6 +7,8 @@ using c h{*}: extension = h c{*}: extension = c -# The test target for cross-testing (running tests under Wine, etc). -# -test.target = $c.target +if ($c.target.system == 'win32-msvc') + c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + c.coptions += /wd4251 /wd4275 /wd4800 diff --git a/libssl/libssl/buildfile b/libssl/libssl/buildfile index 1f5838a..3187435 100644 --- a/libssl/libssl/buildfile +++ b/libssl/libssl/buildfile @@ -14,6 +14,8 @@ linux = ($tclass == 'linux') bsd = ($tclass == 'bsd') windows = ($tclass == 'windows') +msvc_runtime = ($c.target.system == 'win32-msvc') + gcc = ($c.class == 'gcc') msvc = ($c.class == 'msvc') mingw = ($c.target.system == 'mingw32') @@ -47,13 +49,12 @@ else # Note that upstream also passes -DOPENSSL_USE_APPLINK if compiled with VC. # We drop this option (see libcrypto/buildfile) for details. # - if $msvc - { + if $msvc_runtime c.poptions += -DOPENSSL_SYS_WIN32 -D_CRT_SECURE_NO_DEPRECATE \ -D_WINSOCK_DEPRECATED_NO_WARNINGS + if $msvc c.coptions += /Gs0 /GF /Gy - } else c.poptions += -D_MT } @@ -109,9 +110,9 @@ else c.libs += $regex.apply(ws2_32 gdi32 crypt32, \ '(.+)', \ - $msvc ? '\1.lib' : '-l\1') + $msvc_runtime ? '\1.lib' : '-l\1') - if $msvc + if $msvc_runtime c.libs += advapi32.lib } diff --git a/libssl/manifest b/libssl/manifest index 9314a27..0db26ed 100644 --- a/libssl/manifest +++ b/libssl/manifest @@ -3,7 +3,7 @@ name: libssl # Note: remember to update doc-url below! # -version: 1.1.1+4 +version: 1.1.1+5 upstream-version: 1.1.1c project: openssl diff --git a/libssl/tests/build/root.build b/libssl/tests/build/root.build index 02e2e5d..b14a261 100644 --- a/libssl/tests/build/root.build +++ b/libssl/tests/build/root.build @@ -7,6 +7,12 @@ using c h{*}: extension = h c{*}: extension = c +if ($c.target.system == 'win32-msvc') + c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + c.coptions += /wd4251 /wd4275 /wd4800 + # Every exe{} in this subproject is by default a test. # exe{*}: test = true diff --git a/openssl/build/root.build b/openssl/build/root.build index 2a4a530..e5ca350 100644 --- a/openssl/build/root.build +++ b/openssl/build/root.build @@ -7,6 +7,8 @@ using c h{*}: extension = h c{*}: extension = c -# The test target for cross-testing (running tests under Wine, etc). -# -test.target = $c.target +if ($c.target.system == 'win32-msvc') + c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS + +if ($c.class == 'msvc') + c.coptions += /wd4251 /wd4275 /wd4800 diff --git a/openssl/manifest b/openssl/manifest index 9715011..e0c4a5e 100644 --- a/openssl/manifest +++ b/openssl/manifest @@ -3,7 +3,7 @@ name: openssl # Note: remember to update doc-url below! # -version: 1.1.1+4 +version: 1.1.1+5 upstream-version: 1.1.1c priority: security diff --git a/openssl/openssl/buildfile b/openssl/openssl/buildfile index b03de5f..5d87cd0 100644 --- a/openssl/openssl/buildfile +++ b/openssl/openssl/buildfile @@ -15,6 +15,8 @@ linux = ($tclass == 'linux') bsd = ($tclass == 'bsd') windows = ($tclass == 'windows') +msvc_runtime = ($c.target.system == 'win32-msvc') + gcc = ($c.class == 'gcc') msvc = ($c.class == 'msvc') @@ -43,13 +45,12 @@ else # Note that upstream also passes -DOPENSSL_USE_APPLINK if compiled with VC. # We drop this option (see libcrypto/buildfile) for details. # - if $msvc - { + if $msvc_runtime c.poptions += -DOPENSSL_SYS_WIN32 -D_CRT_SECURE_NO_DEPRECATE \ -D_WINSOCK_DEPRECATED_NO_WARNINGS + if $msvc c.coptions += /Gs0 /GF /Gy - } else c.poptions += -D_MT } @@ -91,7 +92,7 @@ else { c.libs += $regex.apply(ws2_32 gdi32 crypt32, \ '(.+)', \ - $msvc ? '\1.lib' : '-l\1') - if $msvc + $msvc_runtime ? '\1.lib' : '-l\1') + if $msvc_runtime c.libs += advapi32.lib } -- cgit v1.1