From a0575ac13d1fcf4391a12acd398d535eb11cb67d Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 24 Dec 2015 12:26:48 -0800 Subject: [PATCH] Get rid of -static-libgcc --- plat/win32/gtk-win/jhbuildrc/jhbuildrc | 12 ++---------- plat/win32/mingw-configure | 14 +++----------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/plat/win32/gtk-win/jhbuildrc/jhbuildrc b/plat/win32/gtk-win/jhbuildrc/jhbuildrc index 35cb3199..29083940 100644 --- a/plat/win32/gtk-win/jhbuildrc/jhbuildrc +++ b/plat/win32/gtk-win/jhbuildrc/jhbuildrc @@ -21,10 +21,6 @@ for __p in ('i686-w64-mingw32', 'i686-pc-mingw32', 'i586-mingw32msvc', 'i486-min if not _mingw_tool_prefix: raise RuntimeError('Could not find mingw-gcc') -_static_libgcc = '' -#if _configure_target in ('i686-w64-mingw32', 'i486-mingw32', 'i686-pc-mingw32'): -# _static_libgcc = '-static-libgcc -static-libstdc++' - makeargs = '-j 4' moduleset = os.path.join(_gtkwinjhbuilddir, 'gtk.moduleset') use_lib64 = False @@ -74,16 +70,12 @@ elif _gtkwinconfig == 'reldbg': else: _def_cflags = '-O2' -_ldflags_cmdline = '' -if _static_libgcc: - _ldflags_cmdline=' LDFLAGS="-L%s/lib %s"' % (prefix, _static_libgcc,) - # os.environ['CPPFLAGS'] = "-I%s/include" % (prefix,) # os.environ['CFLAGS'] = "-I%s/include -mms-bitfields -march=i686 %s" % (prefix, _def_cflags) # os.environ['CXXFLAGS'] = "-I%s/include -mms-bitfields -march=i686 %s" % (prefix, _def_cflags) # os.environ['OBJCFLAGS'] = "-I%s/include -mms-bitfields -march=i686 %s" % (prefix, _def_cflags) -_cflags = "-mms-bitfields -march=i686 %s %s" % (_def_cflags, _static_libgcc) +_cflags = "-mms-bitfields -march=i686 %s " % (_def_cflags) _cflags_cmdline = ' CFLAGS="%(_cflags)s" CXXFLAGS="%(_cflags)s" OBJCFLAGS="%(_cflags)s"' % {'_cflags': _cflags} def _remove_gstabs(module): module_autogenargs[module] = module_autogenargs[module].replace('-gstabs+', '-g').replace('-gstabs', '-g') @@ -114,7 +106,7 @@ autogenargs += ' --enable-relocatable --enable-silent-rules --disable-glibtest - for _var in ['AR', 'RANLIB', 'STRIP', 'AS', 'DLLTOOL', 'OBJDUMP', 'NM', 'WINDRES', 'RC', 'INSTALL']: autogenargs += ' ' + _var + '="' + os.environ[_var] + '" ' -autogenargs += _cflags_cmdline + _ldflags_cmdline +autogenargs += _cflags_cmdline # zlib uses custom configure script which doesn't ignore unknown options module_autogenargs['zlib'] = "" diff --git a/plat/win32/mingw-configure b/plat/win32/mingw-configure index 79571b06..d3f79b25 100755 --- a/plat/win32/mingw-configure +++ b/plat/win32/mingw-configure @@ -21,13 +21,6 @@ if [ -z "$_configure_target" ]; then exit 1 fi -STATIC_LIBGCC= -case "$_configure_target" in - i686-w64-mingw32|i486-mingw32|i686-pc-mingw32) : - STATIC_LIBGCC="-static-libgcc -static-libstdc++" - ;; -esac - _mingw_tool_prefix="/usr/bin/$_configure_target" export mgwdir=`dirname $0`/gtk-win @@ -77,11 +70,10 @@ export AR=$_mingw_tool_prefix-ar export RANLIB=$_mingw_tool_prefix-ranlib export STRIP=$_mingw_tool_prefix-strip -export LDFLAGS="$STATIC_LIBGCC -L$mgwtargetdir/lib" export CPPFLAGS="-I$mgwtargetdir/include" -export CFLAGS="-mms-bitfields -march=i686 $_def_cflags $STATIC_LIBGCC" -export CXXFLAGS="-mms-bitfields -march=i686 $_def_cflags $STATIC_LIBGCC" -export OBJCFLAGS="-mms-bitfields -march=i686 $_def_cflags $STATIC_LIBGCC" +export CFLAGS="-mms-bitfields -march=i686 $_def_cflags" +export CXXFLAGS="-mms-bitfields -march=i686 $_def_cflags" +export OBJCFLAGS="-mms-bitfields -march=i686 $_def_cflags" export PKG_CONFIG_LIBDIR="$mgwtargetdir/lib/pkgconfig" export PKG_CONFIG_PATH="$mgwtargetdir/lib/pkgconfig"