From bd63d6f28d7b6534630bf32a990352e6b9440f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org> Date: Tue, 3 May 2016 13:45:18 +0200 Subject: [PATCH] win32: also statically link libgcc to C++ code If libtool is dumb then we can be dumber --- configure.ac | 3 +++ extras/package/win32/package.mak | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index 7f4a57e3ed0d..25a283ca4493 100644 --- a/configure.ac +++ b/configure.ac @@ -218,6 +218,9 @@ case "${host_os}" in fi ;; *mingw32* | *cygwin* | *wince* | *mingwce*) + dnl Force libtool to not link to (shared) libgcc_s when detecting C++ dependencies + dnl When doing this test with -static-libgcc it will link on (static) libgcc_eh + CXXFLAGS="${CXXFLAGS} -static-libgcc" AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)]) diff --git a/extras/package/win32/package.mak b/extras/package/win32/package.mak index 9e76dedee9de..8bbe34515abf 100644 --- a/extras/package/win32/package.mak +++ b/extras/package/win32/package.mak @@ -59,20 +59,6 @@ if BUILD_SKINS cp -r $(prefix)/share/vlc/skins2 $(win32_destdir)/skins endif -# Compiler shared DLLs, when using compilers built with --enable-shared -# The shared DLLs may not necessarily be in the first LIBRARY_PATH, we -# should check them all. - -library_path_list=`$(CXX) -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2` ;\ - if cygpath --version >/dev/null 2>/dev/null; then \ - library_path_list="`cygpath -p $$library_path_list`" ;\ - fi; \ - IFS=':' ;\ - for x in $$library_path_list ;\ - do \ - test -f "$$x/libgcc_s_sjlj-1.dll" && cp "$$x/libgcc_s_sjlj-1.dll" "$(win32_destdir)/" ; \ - test -f "$$x/libgcc_s_seh-1.dll" && cp "$$x/libgcc_s_seh-1.dll" "$(win32_destdir)/" ; \ - done - # SDK mkdir -p "$(win32_destdir)/sdk/lib/" cp -r $(prefix)/include "$(win32_destdir)/sdk" -- GitLab