scons: Eliminate libgcc_s_sjlj-1.dll dependency
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.
diff --git a/scons/crossmingw.py b/scons/crossmingw.py
index 8af0d93..cc04622 100644
--- a/scons/crossmingw.py
+++ b/scons/crossmingw.py
@@ -194,5 +194,8 @@
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)