mooninite pushed to wine-mono (f22). "enable optimizations, tls patch"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Jun 10 13:34:54 UTC 2015


From eb3fb493f91f8d3b308134647fe8f2a19c9aa5ed Mon Sep 17 00:00:00 2001
From: Michael Cronenworth <mike at cchtml.com>
Date: Thu, 23 Apr 2015 15:38:47 -0500
Subject: enable optimizations, tls patch


diff --git a/wine-mono-build-cflags.patch b/wine-mono-build-cflags.patch
deleted file mode 100644
index b07940c..0000000
--- a/wine-mono-build-cflags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- wine-mono-4.5.6/build-winemono.sh.orig	2015-03-02 11:21:51.000000000 -0600
-+++ wine-mono-4.5.6/build-winemono.sh	2015-03-07 23:40:43.725956614 -0600
-@@ -62,7 +62,8 @@
- 
-     cd "$CURDIR/build-cross-$ARCH"
-     if test 1 != $REBUILD || test ! -e Makefile; then
--        CPPFLAGS="-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
-+        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/-lgcc_s//' -i libtool
-     fi
-     WINEPREFIX=/dev/null make $MAKEOPTS || exit 1
-@@ -108,6 +108,7 @@
- 
-     cd "$CURDIR/build-cross-cli"
-     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
-     fi
-     if test 1 = $USE_MONOLITE; then
---- wine-mono-4.5.6/mono/libgc/win32_threads.c.orig	2015-03-08 00:50:02.940982196 -0600
-+++ wine-mono-4.5.6/mono/libgc/win32_threads.c	2015-03-08 00:50:18.624128240 -0600
-@@ -165,9 +165,6 @@
-  * GC_max_thread_index may temporarily be larger than MAX_THREADS.
-  * To avoid subscript errors, we check on access.
-  */
--#ifdef __GNUC__
--__inline__
--#endif
- LONG GC_get_max_thread_index()
- {
-   LONG my_max = GC_max_thread_index;
diff --git a/wine-mono-build-inline.patch b/wine-mono-build-inline.patch
new file mode 100644
index 0000000..06cdc68
--- /dev/null
+++ b/wine-mono-build-inline.patch
@@ -0,0 +1,12 @@
+--- wine-mono-4.5.6/mono/libgc/win32_threads.c.orig	2015-03-08 00:50:02.940982196 -0600
++++ wine-mono-4.5.6/mono/libgc/win32_threads.c	2015-03-08 00:50:18.624128240 -0600
+@@ -165,9 +165,6 @@
+  * GC_max_thread_index may temporarily be larger than MAX_THREADS.
+  * To avoid subscript errors, we check on access.
+  */
+-#ifdef __GNUC__
+-__inline__
+-#endif
+ LONG GC_get_max_thread_index()
+ {
+   LONG my_max = GC_max_thread_index;
diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch
index 927c305..92a526b 100644
--- a/wine-mono-build-static.patch
+++ b/wine-mono-build-static.patch
@@ -1,16 +1,16 @@
 --- 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 @@
+@@ -63,6 +63,7 @@
+     cd "$CURDIR/build-cross-$ARCH"
      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
+         CPPFLAGS="-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 @@
+@@ -109,6 +110,7 @@
+     cd "$CURDIR/build-cross-cli"
      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
diff --git a/wine-mono-tls.patch b/wine-mono-tls.patch
new file mode 100644
index 0000000..893afec
--- /dev/null
+++ b/wine-mono-tls.patch
@@ -0,0 +1,22 @@
+--- a/mono/utils/mono-compiler.h	2015-02-27 16:42:27.000000000 -0600
++++ b/mono/utils/mono-compiler.h	2015-04-23 10:52:44.137887962 -0500
+@@ -13,7 +13,7 @@
+ #define MONO_FAST_TLS_SET(x,y) x = y
+ #define MONO_FAST_TLS_GET(x) x
+ #define MONO_FAST_TLS_INIT(x)
+-#define MONO_FAST_TLS_DECLARE(x) static __thread gpointer x MONO_TLS_FAST;
++#define MONO_FAST_TLS_DECLARE(x) static __thread gpointer __attribute__((used)) x MONO_TLS_FAST;
+ 
+ #if HAVE_TLS_MODEL_ATTR
+ 
+--- a/mono/metadata/sgen-alloc.c	2015-04-23 11:03:09.641290545 -0500
++++ b/mono/metadata/sgen-alloc.c	2015-04-23 11:02:56.601136395 -0500
+@@ -94,7 +94,7 @@
+ static __thread char *tlab_temp_end;
+ static __thread char *tlab_real_end;
+ /* Used by the managed allocator/wbarrier */
+-static __thread char **tlab_next_addr;
++static __thread char __attribute__((used)) **tlab_next_addr;
+ #endif
+ 
+ #ifdef HAVE_KW_THREAD
diff --git a/wine-mono.spec b/wine-mono.spec
index 1c42092..cd02a80 100644
--- a/wine-mono.spec
+++ b/wine-mono.spec
@@ -3,7 +3,7 @@
 
 Name:           wine-mono
 Version:        4.5.6
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Mono library required for Wine
 
 License:        GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1
@@ -13,8 +13,12 @@ Source0:        http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version
 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
+# to statically link in winpthreads
+Patch2:         wine-mono-build-static.patch
+# https://github.com/mono/mono/commit/16ee0252305fbd4f40ea39c3c4421dc7f103f8a0
+Patch3:         wine-mono-tls.patch
+# this function gets optimized out when inlined
+Patch4:         wine-mono-build-inline.patch
 
 # see git://github.com/madewokherd/wine-mono
 
@@ -57,8 +61,9 @@ Windows Mono library required for Wine.
 %setup -q
 %patch0 -p1 -b.msifilename
 %patch1 -dmono -p1 -b.valgrind
-%patch2 -p1 -b.cflags
-%patch3 -p1 -b.static
+%patch2 -p1 -b.static
+%patch3 -dmono -p1 -b.tls
+%patch4 -p1 -b.inline
 
 %build
 MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh
@@ -95,6 +100,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE
 %{_datadir}/wine/mono/wine-mono-%{version}.msi
 
 %changelog
+* Thu Apr 23 2015 Michael Cronenworth <mike at cchtml.com> - 4.5.6-4
+- enable optimizations, tls patch
+
 * Mon Apr 20 2015 Michael Cronenworth <mike at cchtml.com> - 4.5.6-3
 - statically link DLLs (#1213427)
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/wine-mono.git/commit/?h=f22&id=eb3fb493f91f8d3b308134647fe8f2a19c9aa5ed


More information about the scm-commits mailing list