From c691a8413f650b162f968ab8dc5290e189a42c5e Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 13 Oct 2020 15:23:41 +0100 Subject: [PATCH] depends: Rename Boost libraries to follow MinGW/GCC convention Boost uses the MSVC naming convention when building Windows libraries, which causes issues with lld. --- depends/packages/boost.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index b4377bd30..4d2d6a93e 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -47,3 +47,12 @@ endef define $(package)_stage_cmds ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install endef + +# Boost uses the MSVC convention of libboost_foo.lib as the naming pattern when +# compiling for Windows, even though we use MinGW which follows the libfoo.a +# convention. This causes issues with lld, so we rename all .lib files to .a. +ifeq ($(host_os),mingw32) +define $(package)_postprocess_cmds + for f in lib/*.lib; do mv -- "$$$$f" "$$$${f%.lib}.a"; done +endef +endif