[vlc-commits] Win32: Check for the shared libgcc in all LIBRARY_PATHs
Edward Wang
git at videolan.org
Wed Sep 5 14:00:50 CEST 2012
vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Tue Sep 4 20:46:52 2012 -0400| [dfae35ab8f7b5ef8cc43bdf613c741298edb6e2b] | committer: Rafaël Carré
Win32: Check for the shared libgcc in all LIBRARY_PATHs
Some mingw-w64 3.0 toolchains like mine, for example, have those DLLs in the second or possibly third field of LIBRARY_PATH. Skipping these could lead to weird C++ dlopen errors.
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfae35ab8f7b5ef8cc43bdf613c741298edb6e2b
---
extras/package/win32/package.mak | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/extras/package/win32/package.mak b/extras/package/win32/package.mak
index 7bcab42..9de0d1c 100644
--- a/extras/package/win32/package.mak
+++ b/extras/package/win32/package.mak
@@ -68,9 +68,14 @@ endif
cp "$(top_builddir)/npapi-vlc/installed/lib/npvlc.dll" "$(win32_destdir)/"
# Compiler shared DLLs, when using compilers built with --enable-shared
-# If gcc_s_sjlj/stdc++-6 DLLs exist, our C++ modules were linked to them
- gcc_lib_dir=`$(CXX) -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1` ; \
- cp "$${gcc_lib_dir}/libstdc++-6.dll" "$${gcc_lib_dir}/libgcc_s_sjlj-1.dll" "$(win32_destdir)/" ; true
+# 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 \
+ cp "$$x/libstdc++-6.dll" "$$x/libgcc_s_sjlj-1.dll" "$(win32_destdir)/" ; true ;\
+ done
# SDK
mkdir -p "$(win32_destdir)/sdk/lib/"
More information about the vlc-commits
mailing list