aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-12-06 11:47:50 -0500
committerJack Lloyd <[email protected]>2019-12-06 13:18:57 -0500
commit6fccb9ccbc3a44bc3db872802d9d0d05558abf0a (patch)
tree0defd445f0f3cb5da144854d8ab7a0b87ea3592d
parent74a8685830775c1463e3eb484e2faf824e6862cd (diff)
Fix Windows linking to consistently use .lib suffix as required
Also fix the zlib basename for Windows. Resolves #2210
-rwxr-xr-xconfigure.py10
-rw-r--r--doc/building.rst2
-rw-r--r--src/build-data/cc/msvc.txt2
-rw-r--r--src/lib/compression/zlib/info.txt3
-rw-r--r--src/lib/entropy/win32_stats/info.txt2
-rw-r--r--src/lib/prov/openssl/info.txt2
-rw-r--r--src/lib/rng/system_rng/info.txt2
-rw-r--r--src/lib/utils/socket/info.txt2
-rw-r--r--src/lib/x509/certstor_system_windows/info.txt4
-rw-r--r--src/scripts/ci/appveyor.yml8
10 files changed, 19 insertions, 18 deletions
diff --git a/configure.py b/configure.py
index 2c04dbc90..028417a4b 100755
--- a/configure.py
+++ b/configure.py
@@ -1138,7 +1138,7 @@ class CompilerInfo(InfoObject): # pylint: disable=too-many-instance-attributes
'add_lib_dir_option': '-L',
'add_compile_definition_option': '-D',
'add_sysroot_option': '',
- 'add_lib_option': '-l',
+ 'add_lib_option': '-l%s',
'add_framework_option': '-framework ',
'preproc_flags': '-E',
'compile_flags': '-c',
@@ -2120,7 +2120,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
'ar_output_to': cc.ar_output_to,
'link_to': ' '.join(
- [cc.add_lib_option + lib for lib in link_to('libs')] +
+ [(cc.add_lib_option % lib) for lib in link_to('libs')] +
[cc.add_framework_option + fw for fw in link_to('frameworks')]
),
@@ -2129,7 +2129,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
[('"' + cc.add_framework_option + fw + '"') for fw in link_to('frameworks')]
),
- 'fuzzer_lib': (cc.add_lib_option + options.fuzzer_lib) if options.fuzzer_lib else '',
+ 'fuzzer_lib': (cc.add_lib_option % options.fuzzer_lib) if options.fuzzer_lib else '',
'libs_used': [lib.replace('.lib', '') for lib in link_to('libs')],
'include_paths': build_paths.format_include_paths(cc, options.with_external_includedir),
@@ -2198,8 +2198,8 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
# llvm-link and msvc require just naming the file directly
variables['link_to_botan'] = os.path.join(build_dir, variables['static_lib_name'])
else:
- variables['link_to_botan'] = '%s%s %s%s' % (cc.add_lib_dir_option, build_dir,
- cc.add_lib_option, variables['libname'])
+ variables['link_to_botan'] = '%s%s %s' % (cc.add_lib_dir_option, build_dir,
+ (cc.add_lib_option % variables['libname']))
return variables
diff --git a/doc/building.rst b/doc/building.rst
index 9227c8a6e..9e475d2bd 100644
--- a/doc/building.rst
+++ b/doc/building.rst
@@ -858,7 +858,7 @@ Provide an alternative name for a boost library. Depending on the platform and
boost's build configuration these library names differ significantly (see `Boost docs
<https://www.boost.org/doc/libs/1_70_0/more/getting_started/unix-variants.html#library-naming>`_).
The provided library name must be suitable as identifier in a linker parameter,
-e.g on unix: ``boost_system`` or windows: ``libboost_regex-vc71-x86-1_70.lib``.
+e.g on unix: ``boost_system`` or windows: ``libboost_regex-vc71-x86-1_70``.
--without-documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index a7dc9bbb0..71fc25ce7 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -9,7 +9,7 @@ output_to_exe "/OUT:"
add_include_dir_option "/I"
add_lib_dir_option "/LIBPATH:"
add_compile_definition_option "/D"
-add_lib_option ""
+add_lib_option "%s.lib"
compile_flags "/nologo /c"
diff --git a/src/lib/compression/zlib/info.txt b/src/lib/compression/zlib/info.txt
index 8e3a12261..1102bc5e1 100644
--- a/src/lib/compression/zlib/info.txt
+++ b/src/lib/compression/zlib/info.txt
@@ -5,5 +5,6 @@ ZLIB -> 20160412
load_on vendor
<libs>
-all -> z
+all!windows -> z
+windows -> zlib
</libs>
diff --git a/src/lib/entropy/win32_stats/info.txt b/src/lib/entropy/win32_stats/info.txt
index 3e3268183..065d48cda 100644
--- a/src/lib/entropy/win32_stats/info.txt
+++ b/src/lib/entropy/win32_stats/info.txt
@@ -15,5 +15,5 @@ win32
</os_features>
<libs>
-windows -> user32.lib
+windows -> user32
</libs>
diff --git a/src/lib/prov/openssl/info.txt b/src/lib/prov/openssl/info.txt
index 043ade614..32e71a848 100644
--- a/src/lib/prov/openssl/info.txt
+++ b/src/lib/prov/openssl/info.txt
@@ -10,7 +10,7 @@ openssl.h
<libs>
all!windows -> crypto
-windows -> libeay32.lib
+windows -> libeay32
</libs>
<requires>
diff --git a/src/lib/rng/system_rng/info.txt b/src/lib/rng/system_rng/info.txt
index da4fce4e3..e77328b82 100644
--- a/src/lib/rng/system_rng/info.txt
+++ b/src/lib/rng/system_rng/info.txt
@@ -10,7 +10,7 @@ crypto_ng
</os_features>
<libs>
-uwp -> bcrypt.lib
+uwp -> bcrypt
</libs>
<requires>
diff --git a/src/lib/utils/socket/info.txt b/src/lib/utils/socket/info.txt
index ceeaa18ee..3862f0f74 100644
--- a/src/lib/utils/socket/info.txt
+++ b/src/lib/utils/socket/info.txt
@@ -11,7 +11,7 @@ socket_udp.h
<libs>
linux -> rt
mingw -> ws2_32
-windows -> ws2_32.lib
+windows -> ws2_32
haiku -> network
solaris -> socket,nsl
qnx -> socket
diff --git a/src/lib/x509/certstor_system_windows/info.txt b/src/lib/x509/certstor_system_windows/info.txt
index 8d6dce6c6..0499feeec 100644
--- a/src/lib/x509/certstor_system_windows/info.txt
+++ b/src/lib/x509/certstor_system_windows/info.txt
@@ -11,5 +11,5 @@ certstor_windows.h
</header:public>
<libs>
-windows -> crypt32.lib
-</libs> \ No newline at end of file
+windows -> crypt32
+</libs>
diff --git a/src/scripts/ci/appveyor.yml b/src/scripts/ci/appveyor.yml
index b323a1f6d..4fc88d4bc 100644
--- a/src/scripts/ci/appveyor.yml
+++ b/src/scripts/ci/appveyor.yml
@@ -23,7 +23,7 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib32-msvc-14.0"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc140-mt-x32-1_69.lib"
+ BOOST_SYSTEM_LIBRARY: "libboost_system-vc140-mt-x32-1_69"
MAKE_TOOL: nmake
TARGET_CC: msvc
@@ -34,7 +34,7 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib32-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x32-1_69.lib"
+ BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x32-1_69"
MAKE_TOOL: jom
TARGET_CC: msvc
@@ -45,7 +45,7 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib64-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69.lib"
+ BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69"
MAKE_TOOL: jom
TARGET_CC: msvc
@@ -56,7 +56,7 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BOOST_ROOT: "C:\\Libraries\\boost_1_69_0"
BOOST_LIBRARYDIR: "C:\\Libraries\\boost_1_69_0\\lib64-msvc-14.1"
- BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69.lib"
+ BOOST_SYSTEM_LIBRARY: "libboost_system-vc141-mt-x64-1_69"
MAKE_TOOL: jom
TARGET_CC: msvc