scons: Eliminate libgcc_s_sjlj-1.dll dependency
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Feb 2011 09:12:11 +0000 (09:12 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 3 Feb 2011 09:16:49 +0000 (09:16 +0000)
Certain mingw32 cross compilers (e.g. RedHat's) defaults to use DLL gcc
runtime.

Given the main deliverable from this project are self-contained drivers,
which are loaded by any application, this dependency can cause havoc.

scons/crossmingw.py

index 8af0d93f01abbc67aca0094e556a5749cee7f755..cc046229e2c6dcfc93da4099c3633bf107087330 100644 (file)
@@ -194,5 +194,8 @@ def generate(env):
     env.AppendUnique(SHLINKFLAGS = ['-Wl,--enable-stdcall-fixup'])
     #env.AppendUnique(SHLINKFLAGS = ['-Wl,--kill-at'])
 
+    # Avoid depending on gcc runtime DLLs
+    env.AppendUnique(LINKFLAGS = ['-static-libgcc'])
+
 def exists(env):
     return find(env)