From ea040e1a5eaf3a39ef8b1fdfda4697b68922b6a1 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Feb 2014 03:25:34 +0000 Subject: [PATCH] [SCons] Always link to static standard libraries with MinGW --- SConstruct | 2 ++ src/SConscript | 3 --- src/matlab/SConscript | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 8e8450948..9b0920a03 100644 --- a/SConstruct +++ b/SConstruct @@ -731,6 +731,8 @@ if env['coverage']: print 'Error: coverage testing is only available with GCC.' exit(0) +if env['toolchain'] == 'mingw': + env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) def config_error(message): print 'ERROR:', message diff --git a/src/SConscript b/src/SConscript index a17351389..2135cac67 100644 --- a/src/SConscript +++ b/src/SConscript @@ -68,9 +68,6 @@ if localenv['OS'] in ('Darwin', 'Windows', 'Cygwin'): localenv.Append(LIBS=localenv['boost_libs'], LIBPATH=localenv['boost_lib_dir']) -if localenv['toolchain'] == 'mingw': - localenv.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) - # Build the Cantera shared library using the correct name if localenv['layout'] != 'debian': # Define the name according to the environmental variable diff --git a/src/matlab/SConscript b/src/matlab/SConscript index 871bd9ed6..3a913c961 100644 --- a/src/matlab/SConscript +++ b/src/matlab/SConscript @@ -25,7 +25,6 @@ if localenv['OS'] == 'Windows': linkflags.append('/MACHINE:' + machtype) elif localenv['CC'] == 'gcc': linkflags.append('-Wl,--export-all-symbols') - linkflags.extend(['-static-libgcc', '-static-libstdc++']) elif localenv['OS'] == 'Darwin': linklibs = list(env['cantera_libs'])