From 4244dc9ec472ec2653761b7836577139df24efd6 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Wed, 22 Apr 2015 12:23:53 -0500 Subject: [PATCH] statically link DLLs (#1213427) --- wine-mono-build-static.patch | 18 ++++++++++++++++++ wine-mono.spec | 10 +++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 wine-mono-build-static.patch diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch new file mode 100644 index 0000000..927c305 --- /dev/null +++ b/wine-mono-build-static.patch @@ -0,0 +1,18 @@ +--- wine-mono-4.5.6/build-winemono.sh.orig 2015-04-20 10:34:32.150114394 -0500 ++++ wine-mono-4.5.6/build-winemono.sh 2015-04-20 10:33:13.699274928 -0500 +@@ -64,6 +64,7 @@ + if test 1 != $REBUILD || test ! -e Makefile; then + CFLAGS="-O0 -g -pipe -Wall -Werror=format-security -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic" \ + CPPFLAGS="-O0 -gdwarf-2 -gstrict-dwarf" ../mono/configure --prefix="$CURDIR/build-cross-$ARCH-install" --build=$BUILD --target=$MINGW --host=$MINGW --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no || exit 1 ++ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i libtool + sed -e 's/-lgcc_s//' -i libtool + fi + WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 +@@ -112,6 +112,7 @@ + if test 1 != $REBUILD || test ! -e Makefile; then + CFLAGS="-O0 -g -pipe -Wall -Werror=format-security -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic" \ + ../mono/configure --prefix="$CURDIR/build-cross-cli-install" --with-mcs-docs=no --disable-system-aot || exit 1 ++ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i libtool + fi + if test 1 = $USE_MONOLITE; then + make get-monolite-latest || exit 1 diff --git a/wine-mono.spec b/wine-mono.spec index e2fd124..1c42092 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,8 +1,9 @@ +%undefine _hardened_build %{?mingw_package_header} Name: wine-mono Version: 4.5.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -13,6 +14,7 @@ Patch0: wine-mono-build-msifilename.patch # https://github.com/mono/mono/commit/1445d4821c8091c395264542344dca9df22a2c82 Patch1: wine-mono-valgrind.patch Patch2: wine-mono-build-cflags.patch +Patch3: wine-mono-build-static.patch # see git://github.com/madewokherd/wine-mono @@ -26,6 +28,7 @@ BuildRequires: mingw64-cpp BuildRequires: mingw64-gcc BuildRequires: mingw64-gcc-c++ BuildRequires: mingw64-crt +BuildRequires: mingw64-winpthreads-static # 32 BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-headers @@ -33,6 +36,7 @@ BuildRequires: mingw32-cpp BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-crt +BuildRequires: mingw32-winpthreads-static BuildRequires: autoconf automake BuildRequires: libtool @@ -54,6 +58,7 @@ Windows Mono library required for Wine. %patch0 -p1 -b.msifilename %patch1 -dmono -p1 -b.valgrind %patch2 -p1 -b.cflags +%patch3 -p1 -b.static %build MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh @@ -90,6 +95,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Mon Apr 20 2015 Michael Cronenworth - 4.5.6-3 +- statically link DLLs (#1213427) + * Sun Mar 08 2015 Michael Cronenworth - 4.5.6-2 - disable optimizations in CLI, workaround for gcc5