summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-03-23 04:12:37 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-23 04:12:37 +0530
commita4f5c8c6d1a4a9297e20e923b3af5f261c3dce21 (patch)
tree54eda75b0e9e7717c8246594a6c0e75d0e7762d2
parentb9c1b02a574595c852abb8eaee889bd9d39722b3 (diff)
mingw-runtime.recipe: Fix packaging of libgcc_s_sjlj
There's no import library for it, so look for the DLL directly in that case. https://bugzilla.gnome.org/show_bug.cgi?id=794588
-rw-r--r--cerbero/build/filesprovider.py14
-rw-r--r--recipes/mingw-runtime.recipe2
2 files changed, 14 insertions, 2 deletions
diff --git a/cerbero/build/filesprovider.py b/cerbero/build/filesprovider.py
index 668e7d6c..38a3d50e 100644
--- a/cerbero/build/filesprovider.py
+++ b/cerbero/build/filesprovider.py
@@ -45,9 +45,11 @@ def find_dll_implib(libname, prefix, libdir, ext, regex):
dlltool = os.environ.get('DLLTOOL', None)
if not dlltool:
raise FatalError('dlltool was not found, check cerbero configuration')
+ implib_notfound = []
for implib in implibs:
path = os.path.join(prefix, implibdir, implib)
if not os.path.exists(path):
+ implib_notfound.append(implib)
continue
try:
dllname = shell.check_call([dlltool, '-I', path])
@@ -57,7 +59,17 @@ def find_dll_implib(libname, prefix, libdir, ext, regex):
if dllname == '':
continue
return [os.path.join(libdir, dllname)]
- m.warning("No dllname from implibs {}".format(implibs))
+ # If import libraries aren't found, look for a DLL by exactly the specified
+ # name. This is to cover cases like libgcc_s_sjlj-1.dll which don't have an
+ # import library since they're only used at runtime.
+ dllname = 'lib{}.dll'.format(libname)
+ path = os.path.join(prefix, libdir, dllname)
+ if os.path.exists(path):
+ return [os.path.join(libdir, dllname)]
+ if len(implib_notfound) == len(implibs):
+ m.warning("No implibs found for library name {}".format(libname))
+ else:
+ m.warning("No dllname found from implibs {}".format(implibs))
return []
diff --git a/recipes/mingw-runtime.recipe b/recipes/mingw-runtime.recipe
index 15ddb152..2634d7c4 100644
--- a/recipes/mingw-runtime.recipe
+++ b/recipes/mingw-runtime.recipe
@@ -10,7 +10,7 @@ class Recipe(recipe.Recipe):
stype = SourceType.CUSTOM
runtime_dep = True
- files_libs = ['libstdc++', 'libwinpthread', 'libgomp', 'libgcc_s_sjlj']
+ files_libs = ['libstdc++', 'libwinpthread', 'libgomp', 'libgcc_s_sjlj-1']
files_satic = []
files_headers = ['include/GL']