[vlc-commits] win32: also statically link libgcc to C++ code

Rafaël Carré git at videolan.org
Tue Jul 12 10:24:59 CEST 2016


vlc/vlc-2.2 | branch: master | Rafaël Carré <funman at videolan.org> | Tue May  3 13:45:18 2016 +0200| [eea2d9d001caecc57365e06d37ab9458aa2b24a4] | committer: Rafaël Carré

win32: also statically link libgcc to C++ code

If libtool is dumb then we can be dumber

(cherry picked from commit bd63d6f28d7b6534630bf32a990352e6b9440f4d)
Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=eea2d9d001caecc57365e06d37ab9458aa2b24a4
---

 configure.ac                     |    3 +++
 extras/package/win32/package.mak |   11 -----------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6bba3db..e663f99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,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 db28134..df3740d 100644
--- a/extras/package/win32/package.mak
+++ b/extras/package/win32/package.mak
@@ -58,17 +58,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` ;\
-	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"



More information about the vlc-commits mailing list