From 0afcd40cca53673ff28ca9a6bad9591f6d66b99a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 4 Jul 2012 21:08:16 +0000 Subject: [PATCH 01/90] Initial setup of the repo --- .gitignore | 0 sources | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 2574a195c412e5471c09c752c96d86dc3aa86f27 Mon Sep 17 00:00:00 2001 From: Andreas Bierfert Date: Thu, 5 Jul 2012 06:35:47 +0200 Subject: [PATCH 02/90] 0.0.4-7 - add mingw-filesystem BR - fix header macro --- .gitignore | 1 + ...a-script-for-making-a-source-tarball.patch | 48 ++++ 0053-Rewrite-source-tarball-script.patch | 66 +++++ ...h-unset-CC-when-cross-compiling-othe.patch | 27 ++ 0055-Ship-MonoPosixHelper.dll.patch | 31 +++ sources | 1 + wine-mono-build-fixidtgeneration.patch | 242 ++++++++++++++++++ wine-mono-build-msifilename.patch | 11 + wine-mono.spec | 132 ++++++++++ 9 files changed, 559 insertions(+) create mode 100644 0052-Add-a-script-for-making-a-source-tarball.patch create mode 100644 0053-Rewrite-source-tarball-script.patch create mode 100644 0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch create mode 100644 0055-Ship-MonoPosixHelper.dll.patch create mode 100644 wine-mono-build-fixidtgeneration.patch create mode 100644 wine-mono-build-msifilename.patch create mode 100644 wine-mono.spec diff --git a/.gitignore b/.gitignore index e69de29..05832fc 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/wine-mono-0.0.4.tar.gz diff --git a/0052-Add-a-script-for-making-a-source-tarball.patch b/0052-Add-a-script-for-making-a-source-tarball.patch new file mode 100644 index 0000000..6cea0a3 --- /dev/null +++ b/0052-Add-a-script-for-making-a-source-tarball.patch @@ -0,0 +1,48 @@ +From ceaaeaddbcea3b1d4cc99135c0ebf9a964861715 Mon Sep 17 00:00:00 2001 +From: Vincent Povirk +Date: Wed, 9 May 2012 16:26:03 -0500 +Subject: [PATCH 52/55] Add a script for making a source tarball. + +--- + archive.sh | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + create mode 100755 archive.sh + +diff --git a/archive.sh b/archive.sh +new file mode 100755 +index 0000000..6f7a048 +--- /dev/null ++++ b/archive.sh +@@ -0,0 +1,29 @@ ++#!/bin/sh ++ ++# usage: sh archive.sh tree-ish ++ ++recursivearchivefiles () ++{ ++ # recursivearchivefiles directory prefix tree-ish output-file ++ cd "$1" ++ for f in `git ls-files`; do ++ if test -d "$f/.git"; then ++ recursivearchivefiles "$PWD"/"$f" "$2""$f"/ "`git rev-parse HEAD:$f`" "$4" ++ cd "$1" ++ fi ++ done ++ ++ TEMPFILE=`tempfile` ++ git archive --format=tar --prefix="$2" "$3" > $TEMPFILE ++ tar Af "$4" "$TEMPFILE" ++ rm "$TEMPFILE" ++} ++ ++OUTPUT_FILE="$PWD/$1.tar" ++ ++rm "$OUTPUT_FILE" ++ ++recursivearchivefiles "$PWD" "$1"/ "$1" "$OUTPUT_FILE" ++ ++gzip "$OUTPUT_FILE" ++ +-- +1.7.10.2 + diff --git a/0053-Rewrite-source-tarball-script.patch b/0053-Rewrite-source-tarball-script.patch new file mode 100644 index 0000000..db65673 --- /dev/null +++ b/0053-Rewrite-source-tarball-script.patch @@ -0,0 +1,66 @@ +From f69c420f65c41fb39aa3d2c013a7affa67fafe94 Mon Sep 17 00:00:00 2001 +From: Vincent Povirk +Date: Mon, 14 May 2012 11:39:29 -0500 +Subject: [PATCH 53/55] Rewrite source tarball script. + +--- + archive.sh | 28 +++++++++++++++++++++++----- + 1 file changed, 23 insertions(+), 5 deletions(-) + +diff --git a/archive.sh b/archive.sh +index 6f7a048..b440001 100755 +--- a/archive.sh ++++ b/archive.sh +@@ -1,16 +1,33 @@ + #!/bin/sh + + # usage: sh archive.sh tree-ish ++# Archives a Git revision with all of its submodules. + + recursivearchivefiles () + { + # recursivearchivefiles directory prefix tree-ish output-file ++ + cd "$1" +- for f in `git ls-files`; do +- if test -d "$f/.git"; then +- recursivearchivefiles "$PWD"/"$f" "$2""$f"/ "`git rev-parse HEAD:$f`" "$4" +- cd "$1" ++ ++ echo Archiving: "$1" ++ ++ # recurse into submodules ++ git ls-tree -r "$3"|grep '^[^ ]* commit'|while read line; do ++ if test "x$line" = x; then ++ continue ++ fi ++ ++ obj=`echo "$line"|sed -e 's/^[^ ]* [^ ]* \([^ ]*\) .*$/\1/'` ++ filename=`echo "$line"|sed -e 's/^[^ ]* [^ ]* [^ ]* \(.*\)$/\1/'` ++ ++ if ! test -e "$1"/"$filename"/.git; then ++ echo Missing submodule: "$1"/"$filename" ++ continue + fi ++ ++ recursivearchivefiles "$1"/"$filename" "$2""$filename"/ "$obj" "$4" ++ ++ cd "$1" + done + + TEMPFILE=`tempfile` +@@ -21,9 +38,10 @@ recursivearchivefiles () + + OUTPUT_FILE="$PWD/$1.tar" + +-rm "$OUTPUT_FILE" ++rm -f "$OUTPUT_FILE" + + recursivearchivefiles "$PWD" "$1"/ "$1" "$OUTPUT_FILE" + ++rm -f "$OUTPUT_FILE.gz" + gzip "$OUTPUT_FILE" + +-- +1.7.10.2 + diff --git a/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch b/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch new file mode 100644 index 0000000..df0dfa9 --- /dev/null +++ b/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch @@ -0,0 +1,27 @@ +From a311dcaa0520d7ab755aea6671740dced221a853 Mon Sep 17 00:00:00 2001 +From: Austin English +Date: Mon, 11 Jun 2012 20:18:24 -0500 +Subject: [PATCH 54/55] build-winemono.sh: unset CC when cross compiling, + otherwise a native compiler will be used which fails. + +--- + build-winemono.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/build-winemono.sh b/build-winemono.sh +index 034cdeb..5fca71c 100755 +--- a/build-winemono.sh ++++ b/build-winemono.sh +@@ -43,6 +43,9 @@ done + + cross_build_mono () + { ++ # Unset CC, if it is set, otherwise the build scripts will attempt to use the wrong compiler ++ unset CC ++ + local MINGW=$1 + local ARCH=$2 + +-- +1.7.10.2 + diff --git a/0055-Ship-MonoPosixHelper.dll.patch b/0055-Ship-MonoPosixHelper.dll.patch new file mode 100644 index 0000000..edc9b1b --- /dev/null +++ b/0055-Ship-MonoPosixHelper.dll.patch @@ -0,0 +1,31 @@ +From 8c857c1e72a145cd9c0904379615d09d4b9d1d98 Mon Sep 17 00:00:00 2001 +From: Vincent Povirk +Date: Wed, 13 Jun 2012 16:10:15 -0500 +Subject: [PATCH 55/55] Ship MonoPosixHelper.dll. + +--- + build-winemono.sh | 4 ++++ + mono | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/build-winemono.sh b/build-winemono.sh +index 5fca71c..f80c3ca 100755 +--- a/build-winemono.sh ++++ b/build-winemono.sh +@@ -63,12 +63,16 @@ cross_build_mono () + sed -e 's/-lgcc_s//' -i libtool + fi + WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 ++ cd "$CURDIR/build-cross-$ARCH/support" ++ WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 + rm -rf "$CURDIR/build-cross-$ARCH-install" ++ cd "$CURDIR/build-cross-$ARCH" + make install || exit 1 + cd "$CURDIR" + + mkdir -p "$CURDIR/image/bin" + cp "$CURDIR/build-cross-$ARCH-install/bin/libmono-2.0.dll" "$CURDIR/image/bin/libmono-2.0-$ARCH.dll" ++ cp "$CURDIR/build-cross-$ARCH/support/.libs/libMonoPosixHelper.dll" "$CURDIR/image/bin/MonoPosixHelper-$ARCH.dll" + } + + build_cli () diff --git a/sources b/sources index e69de29..0ff8081 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +61c5ee49b8847c4dccfdab1fbc0706ae wine-mono-0.0.4.tar.gz diff --git a/wine-mono-build-fixidtgeneration.patch b/wine-mono-build-fixidtgeneration.patch new file mode 100644 index 0000000..f652479 --- /dev/null +++ b/wine-mono-build-fixidtgeneration.patch @@ -0,0 +1,242 @@ +--- build-winemono.sh.orig 2012-06-26 21:09:02.185640667 +0200 ++++ build-winemono.sh 2012-06-26 21:14:24.272370920 +0200 +@@ -157,25 +157,25 @@ + + build_directorytable () + { +- echo 'Directory\tDirectory_Parent\tDefaultDir' +- echo 's72\tS72\tl255' +- echo 'Directory\tDirectory' +- +- echo 'TARGETDIR\t\tSourceDir' +- echo 'MONODIR\tMONOBASEDIR\tmono-2.0:.' +- echo 'MONOBASEDIR\tWindowsFolder\tmono:.' +- echo 'WindowsFolder\tTARGETDIR\t.' +- echo 'WindowsDotNet\tWindowsFolder\tMicrosoft.NET' +- echo 'WindowsDotNetFramework\tWindowsDotNet\tFramework' +- echo 'WindowsDotNetFramework11\tWindowsDotNetFramework\tv1.1.4322' +- echo 'WindowsDotNetFramework11Config\tWindowsDotNetFramework11\tCONFIG' +- echo 'WindowsDotNetFramework20\tWindowsDotNetFramework\tv2.0.50727' +- echo 'WindowsDotNetFramework20Config\tWindowsDotNetFramework20\tCONFIG' +- echo 'WindowsDotNetFramework30\tWindowsDotNetFramework\tv3.0' +- echo 'WindowsDotNetFramework30wcf\tWindowsDotNetFramework30\twindows communication foundation' +- echo 'WindowsDotNetFramework30wpf\tWindowsDotNetFramework30\twpf' +- echo 'WindowsDotNetFramework40\tWindowsDotNetFramework\tv4.0.30319' +- echo 'WindowsDotNetFramework40Config\tWindowsDotNetFramework40\tCONFIG' ++ echo -e 'Directory\tDirectory_Parent\tDefaultDir' ++ echo -e 's72\tS72\tl255' ++ echo -e 'Directory\tDirectory' ++ ++ echo -e 'TARGETDIR\t\tSourceDir' ++ echo -e 'MONODIR\tMONOBASEDIR\tmono-2.0:.' ++ echo -e 'MONOBASEDIR\tWindowsFolder\tmono:.' ++ echo -e 'WindowsFolder\tTARGETDIR\t.' ++ echo -e 'WindowsDotNet\tWindowsFolder\tMicrosoft.NET' ++ echo -e 'WindowsDotNetFramework\tWindowsDotNet\tFramework' ++ echo -e 'WindowsDotNetFramework11\tWindowsDotNetFramework\tv1.1.4322' ++ echo -e 'WindowsDotNetFramework11Config\tWindowsDotNetFramework11\tCONFIG' ++ echo -e 'WindowsDotNetFramework20\tWindowsDotNetFramework\tv2.0.50727' ++ echo -e 'WindowsDotNetFramework20Config\tWindowsDotNetFramework20\tCONFIG' ++ echo -e 'WindowsDotNetFramework30\tWindowsDotNetFramework\tv3.0' ++ echo -e 'WindowsDotNetFramework30wcf\tWindowsDotNetFramework30\twindows communication foundation' ++ echo -e 'WindowsDotNetFramework30wpf\tWindowsDotNetFramework30\twpf' ++ echo -e 'WindowsDotNetFramework40\tWindowsDotNetFramework\tv4.0.30319' ++ echo -e 'WindowsDotNetFramework40Config\tWindowsDotNetFramework40\tCONFIG' + + cd "$CURDIR/image" + +@@ -189,7 +189,7 @@ + DIRNAME=MONODIR + fi + BASENAME=`basename $f` +- echo $KEY\\t$DIRNAME\\t$BASENAME ++ echo -e $KEY\\t$DIRNAME\\t$BASENAME + done + + cd "$CURDIR" +@@ -197,24 +197,24 @@ + + build_componenttable () + { +- echo 'Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath' +- echo 's72\tS38\ts72\ti2\tS255\tS72' +- echo 'Component\tComponent' +- +- echo 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' +- echo 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' +- echo 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' +- echo 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' +- echo 'dotnet-folder\t{22DCE198-F30F-4E74-AEC6-D089B844A878}\tWindowsDotNet\t0\t\t' # needed to remove the folder +- echo 'framework-folder\t{41B3A67B-63F4-4491-A53C-9E792BE5A889}\tWindowsDotNetFramework\t0\t\t' +- echo 'framework11-folder\t{20F5741D-4655-400D-8373-7607A84D2478}\tWindowsDotNetFramework11\t0\t\t' +- echo 'framework20-folder\t{B845FD54-09B7-467C-800F-205A142F2F20}\tWindowsDotNetFramework20\t0\t\t' +- echo 'framework30-folder\t{C3221C80-F9D2-41B5-91E1-F6ADBB05ABBC}\tWindowsDotNetFramework30\t0\t\t' +- echo 'framework30wcf-folder\t{1ECAD22C-31C2-4BAC-AC74-78883C396FAB}\tWindowsDotNetFramework30wcf\t0\t\t' +- echo 'framework30wpf-folder\t{3C146462-0CAF-4F07-83E6-A75A2A5DE961}\tWindowsDotNetFramework30wpf\t0\t\t' +- echo 'framework40-folder\t{29ECF991-3E9E-4D23-B0B2-874631642B13}\tWindowsDotNetFramework40\t0\t\t' +- echo 'monobase-folder\t{BE46D94A-7443-4B5C-9B91-6A83815365AB}\tMONOBASEDIR\t0\t\t' +- echo 'mono-folder\t{FD7F9172-4E35-4DF5-BD6A-FB7B795D9346}\tMONODIR\t0\t\t' ++ echo -e 'Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath' ++ echo -e 's72\tS38\ts72\ti2\tS255\tS72' ++ echo -e 'Component\tComponent' ++ ++ echo -e 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' ++ echo -e 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' ++ echo -e 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' ++ echo -e 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' ++ echo -e 'dotnet-folder\t{22DCE198-F30F-4E74-AEC6-D089B844A878}\tWindowsDotNet\t0\t\t' # needed to remove the folder ++ echo -e 'framework-folder\t{41B3A67B-63F4-4491-A53C-9E792BE5A889}\tWindowsDotNetFramework\t0\t\t' ++ echo -e 'framework11-folder\t{20F5741D-4655-400D-8373-7607A84D2478}\tWindowsDotNetFramework11\t0\t\t' ++ echo -e 'framework20-folder\t{B845FD54-09B7-467C-800F-205A142F2F20}\tWindowsDotNetFramework20\t0\t\t' ++ echo -e 'framework30-folder\t{C3221C80-F9D2-41B5-91E1-F6ADBB05ABBC}\tWindowsDotNetFramework30\t0\t\t' ++ echo -e 'framework30wcf-folder\t{1ECAD22C-31C2-4BAC-AC74-78883C396FAB}\tWindowsDotNetFramework30wcf\t0\t\t' ++ echo -e 'framework30wpf-folder\t{3C146462-0CAF-4F07-83E6-A75A2A5DE961}\tWindowsDotNetFramework30wpf\t0\t\t' ++ echo -e 'framework40-folder\t{29ECF991-3E9E-4D23-B0B2-874631642B13}\tWindowsDotNetFramework40\t0\t\t' ++ echo -e 'monobase-folder\t{BE46D94A-7443-4B5C-9B91-6A83815365AB}\tMONOBASEDIR\t0\t\t' ++ echo -e 'mono-folder\t{FD7F9172-4E35-4DF5-BD6A-FB7B795D9346}\tMONODIR\t0\t\t' + + cd "$CURDIR/image" + +@@ -228,7 +228,7 @@ + fi + GUID=`cat "$CURDIR/component-guids/${KEY}.guid"` + KEYPATH=`find "$f" -maxdepth 1 -type f|sort|head -n 1|sed -e 's/\//!/g'` +- echo $KEY\\t{$GUID}\\t$KEY\\t0\\t\\t$KEYPATH ++ echo -e $KEY\\t{$GUID}\\t$KEY\\t0\\t\\t$KEYPATH + done + + cd "$CURDIR" +@@ -236,20 +236,20 @@ + + build_createfoldertable () + { +- echo 'Directory_\tComponent_' +- echo 's72\ts72' +- echo 'CreateFolder\tDirectory_\tComponent_' +- +- echo 'WindowsDotNet\tdotnet-folder' +- echo 'WindowsDotNetFramework\tframework-folder' +- echo 'WindowsDotNetFramework11\tframework11-folder' +- echo 'WindowsDotNetFramework20\tframework20-folder' +- echo 'WindowsDotNetFramework30\tframework30-folder' +- echo 'WindowsDotNetFramework30wcf\tframework30wcf-folder' +- echo 'WindowsDotNetFramework30wpf\tframework30wpf-folder' +- echo 'WindowsDotNetFramework40\tframework40-folder' +- echo 'MONOBASEDIR\tmonobase-folder' +- echo 'MONODIR\tmono-folder' ++ echo -e 'Directory_\tComponent_' ++ echo -e 's72\ts72' ++ echo -e 'CreateFolder\tDirectory_\tComponent_' ++ ++ echo -e 'WindowsDotNet\tdotnet-folder' ++ echo -e 'WindowsDotNetFramework\tframework-folder' ++ echo -e 'WindowsDotNetFramework11\tframework11-folder' ++ echo -e 'WindowsDotNetFramework20\tframework20-folder' ++ echo -e 'WindowsDotNetFramework30\tframework30-folder' ++ echo -e 'WindowsDotNetFramework30wcf\tframework30wcf-folder' ++ echo -e 'WindowsDotNetFramework30wpf\tframework30wpf-folder' ++ echo -e 'WindowsDotNetFramework40\tframework40-folder' ++ echo -e 'MONOBASEDIR\tmonobase-folder' ++ echo -e 'MONODIR\tmono-folder' + + cd "$CURDIR/image" + +@@ -260,7 +260,7 @@ + FILE=`find "$f" -maxdepth 1 -type f` + if test ! "$FILE"; then + KEY=`echo $f|sed -e 's/\//|/g'` +- echo $KEY\\t$KEY ++ echo -e $KEY\\t$KEY + fi + done + +@@ -269,24 +269,24 @@ + + build_featurecomponentstable () + { +- echo 'Feature_\tComponent_' +- echo 's38\ts72' +- echo 'FeatureComponents\tFeature_\tComponent_' +- +- echo 'wine_mono\tmono-registry' +- echo 'wine_mono\tconfig-1.1' +- echo 'wine_mono\tconfig-2.0' +- echo 'wine_mono\tconfig-4.0' +- echo 'wine_mono\tdotnet-folder' +- echo 'wine_mono\tframework-folder' +- echo 'wine_mono\tframework11-folder' +- echo 'wine_mono\tframework20-folder' +- echo 'wine_mono\tframework30-folder' +- echo 'wine_mono\tframework30wcf-folder' +- echo 'wine_mono\tframework30wpf-folder' +- echo 'wine_mono\tframework40-folder' +- echo 'wine_mono\tmonobase-folder' +- echo 'wine_mono\tmono-folder' ++ echo -e 'Feature_\tComponent_' ++ echo -e 's38\ts72' ++ echo -e 'FeatureComponents\tFeature_\tComponent_' ++ ++ echo -e 'wine_mono\tmono-registry' ++ echo -e 'wine_mono\tconfig-1.1' ++ echo -e 'wine_mono\tconfig-2.0' ++ echo -e 'wine_mono\tconfig-4.0' ++ echo -e 'wine_mono\tdotnet-folder' ++ echo -e 'wine_mono\tframework-folder' ++ echo -e 'wine_mono\tframework11-folder' ++ echo -e 'wine_mono\tframework20-folder' ++ echo -e 'wine_mono\tframework30-folder' ++ echo -e 'wine_mono\tframework30wcf-folder' ++ echo -e 'wine_mono\tframework30wpf-folder' ++ echo -e 'wine_mono\tframework40-folder' ++ echo -e 'wine_mono\tmonobase-folder' ++ echo -e 'wine_mono\tmono-folder' + + cd "$CURDIR/image" + +@@ -295,7 +295,7 @@ + continue + fi + KEY=`echo $f|sed -e 's/\//|/g'` +- echo wine_mono\\t$KEY ++ echo -e wine_mono\\t$KEY + done + + cd "$CURDIR" +@@ -303,9 +303,9 @@ + + build_filetable () + { +- echo 'File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence' +- echo 's72\ts72\tl255\ti4\tS72\tS20\tI2\ti2' +- echo 'File\tFile' ++ echo -e 'File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence' ++ echo -e 's72\ts72\tl255\ti4\tS72\tS20\tI2\ti2' ++ echo -e 'File\tFile' + + SEQ=0 + +@@ -334,7 +334,7 @@ + ;; + esac + +- echo $KEY\\t$COMPONENT\\t$BASENAME\\t$FILESIZE\\t\\t\\t\\t$SEQ ++ echo -e $KEY\\t$COMPONENT\\t$BASENAME\\t$FILESIZE\\t\\t\\t\\t$SEQ + done + + IMAGECAB_SEQ=$SEQ +@@ -344,11 +344,11 @@ + + build_mediatable () + { +- echo 'DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource' +- echo 'i2\ti4\tL64\tS255\tS32\tS72' +- echo 'Media\tDiskId' ++ echo -e 'DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource' ++ echo -e 'i2\ti4\tL64\tS255\tS32\tS72' ++ echo -e 'Media\tDiskId' + +- echo 1\\t$IMAGECAB_SEQ\\t\\t#image.cab\\t\\t ++ echo -e 1\\t$IMAGECAB_SEQ\\t\\t#image.cab\\t\\t + } + + build_msi () diff --git a/wine-mono-build-msifilename.patch b/wine-mono-build-msifilename.patch new file mode 100644 index 0000000..21552ab --- /dev/null +++ b/wine-mono-build-msifilename.patch @@ -0,0 +1,11 @@ +--- build-winemono.sh.orig 2012-06-17 21:36:07.966021810 +0200 ++++ build-winemono.sh 2012-06-17 21:38:27.681849104 +0200 +@@ -9,7 +9,7 @@ + ORIGINAL_PATH="$PATH" + REBUILD=0 + WINE=${WINE:-wine} +-MSIFILENAME=winemono.msi ++MSIFILENAME=${MSIFILENAME:-winemono.msi} + BUILD_TESTS=0 + + usage () diff --git a/wine-mono.spec b/wine-mono.spec new file mode 100644 index 0000000..a5e1d83 --- /dev/null +++ b/wine-mono.spec @@ -0,0 +1,132 @@ +%{?mingw_package_header} + +Name: wine-mono +Version: 0.0.4 +Release: 7%{?dist} +Summary: Mono library required for Wine + +License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 +Group: Development/Libraries +URL: http://wiki.winehq.org/Mono +Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/0.0.4/wine-mono-0.0.4.tar.gz +Patch0: wine-mono-build-msifilename.patch +Patch1: wine-mono-build-fixidtgeneration.patch + +# see git://github.com/madewokherd/wine-mono +Patch100: 0052-Add-a-script-for-making-a-source-tarball.patch +Patch101: 0053-Rewrite-source-tarball-script.patch +Patch102: 0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch +Patch103: 0055-Ship-MonoPosixHelper.dll.patch + +BuildArch: noarch + +# 64 +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-binutils +BuildRequires: mingw64-headers +BuildRequires: mingw64-cpp +BuildRequires: mingw64-gcc +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw64-crt +# 32 +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw32-binutils +BuildRequires: mingw32-headers +BuildRequires: mingw32-cpp +BuildRequires: mingw32-gcc +BuildRequires: mingw32-gcc-c++ +BuildRequires: mingw32-crt + +BuildRequires: autoconf automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: gettext +BuildRequires: zip +BuildRequires: wine-core wine-wow +BuildRequires: wine-devel +BuildRequires: mono-core + +Requires: wine-filesystem + +%description +Windows Mono library required for Wine. + +%prep +%setup -q +%patch0 -b.msifilename +%patch1 -b.fixidtgen +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 + +%build +# make sure this builds on x86-64 +if [ -x %{_bindir}/wine ] ; then + MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh +else + MAKEOPTS=%{_smp_mflags} WINE=%{_bindir}/wine64 MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh +fi + +%install +mkdir -p %{buildroot}%{_datadir}/wine/mono +install -p -m 0644 wine-mono-%{version}.msi \ + %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}.msi + +# prep licenses +cp mono/LICENSE mono-LICENSE +cp mono/COPYING.LIB mono-COPYING.LIB + +pushd mono/mcs + +sed -i 's/\r//' LICENSE.MSPL + +iconv -f iso8859-1 -t utf-8 LICENSE.MSPL > LICENSE.MSPL.conv && mv -f LICENSE.MSPL.conv LICENSE.MSPL + +for l in `ls LICENSE*`; do +echo $l +cp $l ../../mono-mcs-$l +done + +popd + +cp mono-basic/README mono-basic-README +cp mono-basic/LICENSE mono-basic-LICENSE +cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt + +%files +%doc COPYING README +%doc mono-LICENSE mono-COPYING.LIB mono-mcs* +%doc mono-basic-README mono-basic-LICENSE +%doc MonoGame-LICENSE.txt +%{_datadir}/wine/mono/wine-mono-%{version}.msi + +%changelog +* Wed Jul 04 2012 Andreas Bierfert +- 0.0.4-7 +- add mingw-filesystem BR +- fix header macro + +* Fri Jun 29 2012 Andreas Bierfert +- 0.0.4-6 +- rename to wine-mono + +* Wed Jun 27 2012 Andreas Bierfert +- 0.0.4-5 +- add conditional so package builds on x86-64 builders as well + +* Tue Jun 26 2012 Andreas Bierfert +- 0.0.4-4 +- add -e option to echo in build script to fix idt files generation + +* Sun Jun 24 2012 Andreas Bierfert +- 0.0.4-3 +- pull some upstream patches from git + +* Tue Jun 12 2012 Andreas Bierfert +- 0.0.4-2 +- rename msi according to what wine expects + +* Mon May 28 2012 Andreas Bierfert +- 0.0.4-1 +- Initial release From 51fe5d4aff13c5af61b76450c663dfc3c9cab702 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 22:40:36 -0500 Subject: [PATCH 03/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index a5e1d83..f690a0c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 0.0.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -102,6 +102,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 0.0.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed Jul 04 2012 Andreas Bierfert - 0.0.4-7 - add mingw-filesystem BR From 256b840bf3b6e25df4041d0fd59a0a058a7eed05 Mon Sep 17 00:00:00 2001 From: Andreas Bierfert Date: Mon, 29 Oct 2012 22:57:11 +0100 Subject: [PATCH 04/90] 0.0.8-1 - version upgrade --- .gitignore | 2 +- ...a-script-for-making-a-source-tarball.patch | 48 -------------- 0053-Rewrite-source-tarball-script.patch | 66 ------------------- ...h-unset-CC-when-cross-compiling-othe.patch | 27 -------- 0055-Ship-MonoPosixHelper.dll.patch | 31 --------- sources | 2 +- wine-mono-build-fixidtgeneration.patch | 63 ++++++++++++++---- wine-mono-build-msifilename.patch | 6 +- wine-mono.spec | 22 +++---- 9 files changed, 63 insertions(+), 204 deletions(-) delete mode 100644 0052-Add-a-script-for-making-a-source-tarball.patch delete mode 100644 0053-Rewrite-source-tarball-script.patch delete mode 100644 0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch delete mode 100644 0055-Ship-MonoPosixHelper.dll.patch diff --git a/.gitignore b/.gitignore index 05832fc..5797c78 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-0.0.4.tar.gz +/wine-mono-0.0.8.tar.gz diff --git a/0052-Add-a-script-for-making-a-source-tarball.patch b/0052-Add-a-script-for-making-a-source-tarball.patch deleted file mode 100644 index 6cea0a3..0000000 --- a/0052-Add-a-script-for-making-a-source-tarball.patch +++ /dev/null @@ -1,48 +0,0 @@ -From ceaaeaddbcea3b1d4cc99135c0ebf9a964861715 Mon Sep 17 00:00:00 2001 -From: Vincent Povirk -Date: Wed, 9 May 2012 16:26:03 -0500 -Subject: [PATCH 52/55] Add a script for making a source tarball. - ---- - archive.sh | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - create mode 100755 archive.sh - -diff --git a/archive.sh b/archive.sh -new file mode 100755 -index 0000000..6f7a048 ---- /dev/null -+++ b/archive.sh -@@ -0,0 +1,29 @@ -+#!/bin/sh -+ -+# usage: sh archive.sh tree-ish -+ -+recursivearchivefiles () -+{ -+ # recursivearchivefiles directory prefix tree-ish output-file -+ cd "$1" -+ for f in `git ls-files`; do -+ if test -d "$f/.git"; then -+ recursivearchivefiles "$PWD"/"$f" "$2""$f"/ "`git rev-parse HEAD:$f`" "$4" -+ cd "$1" -+ fi -+ done -+ -+ TEMPFILE=`tempfile` -+ git archive --format=tar --prefix="$2" "$3" > $TEMPFILE -+ tar Af "$4" "$TEMPFILE" -+ rm "$TEMPFILE" -+} -+ -+OUTPUT_FILE="$PWD/$1.tar" -+ -+rm "$OUTPUT_FILE" -+ -+recursivearchivefiles "$PWD" "$1"/ "$1" "$OUTPUT_FILE" -+ -+gzip "$OUTPUT_FILE" -+ --- -1.7.10.2 - diff --git a/0053-Rewrite-source-tarball-script.patch b/0053-Rewrite-source-tarball-script.patch deleted file mode 100644 index db65673..0000000 --- a/0053-Rewrite-source-tarball-script.patch +++ /dev/null @@ -1,66 +0,0 @@ -From f69c420f65c41fb39aa3d2c013a7affa67fafe94 Mon Sep 17 00:00:00 2001 -From: Vincent Povirk -Date: Mon, 14 May 2012 11:39:29 -0500 -Subject: [PATCH 53/55] Rewrite source tarball script. - ---- - archive.sh | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -diff --git a/archive.sh b/archive.sh -index 6f7a048..b440001 100755 ---- a/archive.sh -+++ b/archive.sh -@@ -1,16 +1,33 @@ - #!/bin/sh - - # usage: sh archive.sh tree-ish -+# Archives a Git revision with all of its submodules. - - recursivearchivefiles () - { - # recursivearchivefiles directory prefix tree-ish output-file -+ - cd "$1" -- for f in `git ls-files`; do -- if test -d "$f/.git"; then -- recursivearchivefiles "$PWD"/"$f" "$2""$f"/ "`git rev-parse HEAD:$f`" "$4" -- cd "$1" -+ -+ echo Archiving: "$1" -+ -+ # recurse into submodules -+ git ls-tree -r "$3"|grep '^[^ ]* commit'|while read line; do -+ if test "x$line" = x; then -+ continue -+ fi -+ -+ obj=`echo "$line"|sed -e 's/^[^ ]* [^ ]* \([^ ]*\) .*$/\1/'` -+ filename=`echo "$line"|sed -e 's/^[^ ]* [^ ]* [^ ]* \(.*\)$/\1/'` -+ -+ if ! test -e "$1"/"$filename"/.git; then -+ echo Missing submodule: "$1"/"$filename" -+ continue - fi -+ -+ recursivearchivefiles "$1"/"$filename" "$2""$filename"/ "$obj" "$4" -+ -+ cd "$1" - done - - TEMPFILE=`tempfile` -@@ -21,9 +38,10 @@ recursivearchivefiles () - - OUTPUT_FILE="$PWD/$1.tar" - --rm "$OUTPUT_FILE" -+rm -f "$OUTPUT_FILE" - - recursivearchivefiles "$PWD" "$1"/ "$1" "$OUTPUT_FILE" - -+rm -f "$OUTPUT_FILE.gz" - gzip "$OUTPUT_FILE" - --- -1.7.10.2 - diff --git a/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch b/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch deleted file mode 100644 index df0dfa9..0000000 --- a/0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a311dcaa0520d7ab755aea6671740dced221a853 Mon Sep 17 00:00:00 2001 -From: Austin English -Date: Mon, 11 Jun 2012 20:18:24 -0500 -Subject: [PATCH 54/55] build-winemono.sh: unset CC when cross compiling, - otherwise a native compiler will be used which fails. - ---- - build-winemono.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/build-winemono.sh b/build-winemono.sh -index 034cdeb..5fca71c 100755 ---- a/build-winemono.sh -+++ b/build-winemono.sh -@@ -43,6 +43,9 @@ done - - cross_build_mono () - { -+ # Unset CC, if it is set, otherwise the build scripts will attempt to use the wrong compiler -+ unset CC -+ - local MINGW=$1 - local ARCH=$2 - --- -1.7.10.2 - diff --git a/0055-Ship-MonoPosixHelper.dll.patch b/0055-Ship-MonoPosixHelper.dll.patch deleted file mode 100644 index edc9b1b..0000000 --- a/0055-Ship-MonoPosixHelper.dll.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8c857c1e72a145cd9c0904379615d09d4b9d1d98 Mon Sep 17 00:00:00 2001 -From: Vincent Povirk -Date: Wed, 13 Jun 2012 16:10:15 -0500 -Subject: [PATCH 55/55] Ship MonoPosixHelper.dll. - ---- - build-winemono.sh | 4 ++++ - mono | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/build-winemono.sh b/build-winemono.sh -index 5fca71c..f80c3ca 100755 ---- a/build-winemono.sh -+++ b/build-winemono.sh -@@ -63,12 +63,16 @@ cross_build_mono () - sed -e 's/-lgcc_s//' -i libtool - fi - WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 -+ cd "$CURDIR/build-cross-$ARCH/support" -+ WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 - rm -rf "$CURDIR/build-cross-$ARCH-install" -+ cd "$CURDIR/build-cross-$ARCH" - make install || exit 1 - cd "$CURDIR" - - mkdir -p "$CURDIR/image/bin" - cp "$CURDIR/build-cross-$ARCH-install/bin/libmono-2.0.dll" "$CURDIR/image/bin/libmono-2.0-$ARCH.dll" -+ cp "$CURDIR/build-cross-$ARCH/support/.libs/libMonoPosixHelper.dll" "$CURDIR/image/bin/MonoPosixHelper-$ARCH.dll" - } - - build_cli () diff --git a/sources b/sources index 0ff8081..e67db1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -61c5ee49b8847c4dccfdab1fbc0706ae wine-mono-0.0.4.tar.gz +5300eafb47b9258643581bcdf675f61f wine-mono-0.0.8.tar.gz diff --git a/wine-mono-build-fixidtgeneration.patch b/wine-mono-build-fixidtgeneration.patch index f652479..2da63ba 100644 --- a/wine-mono-build-fixidtgeneration.patch +++ b/wine-mono-build-fixidtgeneration.patch @@ -1,6 +1,6 @@ ---- build-winemono.sh.orig 2012-06-26 21:09:02.185640667 +0200 -+++ build-winemono.sh 2012-06-26 21:14:24.272370920 +0200 -@@ -157,25 +157,25 @@ +--- wine-mono-0.0.8/build-winemono.sh.orig 2012-10-29 22:05:56.967460837 +0100 ++++ wine-mono-0.0.8/build-winemono.sh 2012-10-29 22:11:58.546925841 +0100 +@@ -164,25 +164,25 @@ build_directorytable () { @@ -45,7 +45,7 @@ cd "$CURDIR/image" -@@ -189,7 +189,7 @@ +@@ -196,7 +196,7 @@ DIRNAME=MONODIR fi BASENAME=`basename $f` @@ -54,7 +54,7 @@ done cd "$CURDIR" -@@ -197,24 +197,24 @@ +@@ -204,25 +204,25 @@ build_componenttable () { @@ -63,6 +63,7 @@ - echo 'Component\tComponent' - - echo 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' +- echo 'mono-registry64\t{E088D122-0696-4137-BC4E-C999303B4BE2}\tWindowsDotNetFramework\t260\t\tDotNetFrameworkInstallRoot' - echo 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' - echo 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' - echo 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' @@ -81,6 +82,7 @@ + echo -e 'Component\tComponent' + + echo -e 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' ++ echo -e 'mono-registry64\t{E088D122-0696-4137-BC4E-C999303B4BE2}\tWindowsDotNetFramework\t260\t\tDotNetFrameworkInstallRoot' + echo -e 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' + echo -e 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' + echo -e 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' @@ -97,7 +99,7 @@ cd "$CURDIR/image" -@@ -228,7 +228,7 @@ +@@ -236,7 +236,7 @@ fi GUID=`cat "$CURDIR/component-guids/${KEY}.guid"` KEYPATH=`find "$f" -maxdepth 1 -type f|sort|head -n 1|sed -e 's/\//!/g'` @@ -106,7 +108,7 @@ done cd "$CURDIR" -@@ -236,20 +236,20 @@ +@@ -244,20 +244,20 @@ build_createfoldertable () { @@ -141,7 +143,7 @@ cd "$CURDIR/image" -@@ -260,7 +260,7 @@ +@@ -268,7 +268,7 @@ FILE=`find "$f" -maxdepth 1 -type f` if test ! "$FILE"; then KEY=`echo $f|sed -e 's/\//|/g'` @@ -150,7 +152,7 @@ fi done -@@ -269,24 +269,24 @@ +@@ -277,25 +277,25 @@ build_featurecomponentstable () { @@ -159,6 +161,7 @@ - echo 'FeatureComponents\tFeature_\tComponent_' - - echo 'wine_mono\tmono-registry' +- echo 'wine_mono\tmono-registry64' - echo 'wine_mono\tconfig-1.1' - echo 'wine_mono\tconfig-2.0' - echo 'wine_mono\tconfig-4.0' @@ -177,6 +180,7 @@ + echo -e 'FeatureComponents\tFeature_\tComponent_' + + echo -e 'wine_mono\tmono-registry' ++ echo -e 'wine_mono\tmono-registry64' + echo -e 'wine_mono\tconfig-1.1' + echo -e 'wine_mono\tconfig-2.0' + echo -e 'wine_mono\tconfig-4.0' @@ -193,7 +197,7 @@ cd "$CURDIR/image" -@@ -295,7 +295,7 @@ +@@ -304,7 +304,7 @@ continue fi KEY=`echo $f|sed -e 's/\//|/g'` @@ -202,7 +206,7 @@ done cd "$CURDIR" -@@ -303,9 +303,9 @@ +@@ -312,9 +312,9 @@ build_filetable () { @@ -215,7 +219,7 @@ SEQ=0 -@@ -334,7 +334,7 @@ +@@ -343,7 +343,7 @@ ;; esac @@ -224,7 +228,7 @@ done IMAGECAB_SEQ=$SEQ -@@ -344,11 +344,11 @@ +@@ -353,11 +353,11 @@ build_mediatable () { @@ -239,4 +243,35 @@ + echo -e 1\\t$IMAGECAB_SEQ\\t\\t#image.cab\\t\\t } - build_msi () + hex_to_binary () +@@ -372,14 +372,14 @@ + + format_od_output () + { +- echo $2'\t'$3'\t'$4'\t'$5'\t' ++ echo -e $2'\t'$3'\t'$4'\t'$5'\t' + } + + build_msifilehashtable () + { +- echo 'File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4' +- echo 's72\ti2\ti4\ti4\ti4\ti4' +- echo 'MsiFileHash\tFile_' ++ echo -e 'File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4' ++ echo -e 's72\ti2\ti4\ti4\ti4\ti4' ++ echo -e 'MsiFileHash\tFile_' + + cd "$CURDIR/image" + +@@ -387,9 +387,9 @@ + KEY=`echo $f|sed -e 's/\//!/g'` + FILESIZE=`stat --format=%s $f` + +- echo -n $KEY\\t0\\t ++ echo -e -n $KEY\\t0\\t + if test $FILESIZE -eq 0; then +- echo '0\t0\t0\t0' ++ echo -e '0\t0\t0\t0' + else + format_od_output `md5sum $f|head -c 32|hex_to_binary|od -v -t d4` + fi diff --git a/wine-mono-build-msifilename.patch b/wine-mono-build-msifilename.patch index 21552ab..f89c170 100644 --- a/wine-mono-build-msifilename.patch +++ b/wine-mono-build-msifilename.patch @@ -1,9 +1,9 @@ ---- build-winemono.sh.orig 2012-06-17 21:36:07.966021810 +0200 -+++ build-winemono.sh 2012-06-17 21:38:27.681849104 +0200 +--- wine-mono-0.0.8/build-winemono.sh.orig 2012-10-29 22:15:31.409448612 +0100 ++++ wine-mono-0.0.8/build-winemono.sh 2012-10-29 22:15:52.878292404 +0100 @@ -9,7 +9,7 @@ ORIGINAL_PATH="$PATH" REBUILD=0 - WINE=${WINE:-wine} + WINE=${WINE:-`which wine`} -MSIFILENAME=winemono.msi +MSIFILENAME=${MSIFILENAME:-winemono.msi} BUILD_TESTS=0 diff --git a/wine-mono.spec b/wine-mono.spec index f690a0c..5b7ca51 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,22 +1,18 @@ %{?mingw_package_header} Name: wine-mono -Version: 0.0.4 -Release: 8%{?dist} +Version: 0.0.8 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 Group: Development/Libraries URL: http://wiki.winehq.org/Mono -Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/0.0.4/wine-mono-0.0.4.tar.gz +Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch Patch1: wine-mono-build-fixidtgeneration.patch # see git://github.com/madewokherd/wine-mono -Patch100: 0052-Add-a-script-for-making-a-source-tarball.patch -Patch101: 0053-Rewrite-source-tarball-script.patch -Patch102: 0054-build-winemono.sh-unset-CC-when-cross-compiling-othe.patch -Patch103: 0055-Ship-MonoPosixHelper.dll.patch BuildArch: noarch @@ -53,12 +49,8 @@ Windows Mono library required for Wine. %prep %setup -q -%patch0 -b.msifilename -%patch1 -b.fixidtgen -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 +%patch0 -p1 -b.msifilename +%patch1 -p1 -b.fixidtgen %build # make sure this builds on x86-64 @@ -102,6 +94,10 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Mon Oct 29 2012 Andreas Bierfert +- 0.0.8-1 +- version upgrade + * Sun Jul 22 2012 Fedora Release Engineering - 0.0.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 2c692af46746660d80306b8401a5f8a835e45c96 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 21:09:01 -0600 Subject: [PATCH 05/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 5b7ca51..6351bbd 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 0.0.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -94,6 +94,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 0.0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Mon Oct 29 2012 Andreas Bierfert - 0.0.8-1 - version upgrade From 606bd9dedd8d8c55501cf089c7bd352259c7a3cd Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Thu, 4 Apr 2013 22:03:03 +0200 Subject: [PATCH 06/90] Fix FTBFS against latest automake Patch taken from upstream mono git, commit 052ba601f3ed9e7fc5a216407986a89ee0c3296f --- ...utomake-macros-obsoleted-by-automake-1.13.-F.patch | 11 +++++++++++ wine-mono.spec | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch diff --git a/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch b/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch new file mode 100644 index 0000000..c1342dd --- /dev/null +++ b/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch @@ -0,0 +1,11 @@ +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index c12d4a7..f70d4d2 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper diff --git a/wine-mono.spec b/wine-mono.spec index 6351bbd..c282a22 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -12,6 +12,10 @@ Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version Patch0: wine-mono-build-msifilename.patch Patch1: wine-mono-build-fixidtgeneration.patch +# Fix FTBFS against latest automake +# Patch taken from upstream mono git, commit 052ba601f3ed9e7fc5a216407986a89ee0c3296f +Patch2: 0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch + # see git://github.com/madewokherd/wine-mono BuildArch: noarch @@ -51,6 +55,9 @@ Windows Mono library required for Wine. %setup -q %patch0 -p1 -b.msifilename %patch1 -p1 -b.fixidtgen +cd mono +%patch2 -p1 -b .automake +cd - %build # make sure this builds on x86-64 @@ -94,6 +101,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Apr 4 2013 Erik van Pienbroek - 0.0.8-3 +- Fix FTBFS against latest automake + * Fri Feb 15 2013 Fedora Release Engineering - 0.0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 33a3b12fc7c81071b29ae18899cb79823db6a4b0 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Thu, 4 Apr 2013 23:35:28 +0200 Subject: [PATCH 07/90] Added BR: bc --- wine-mono.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wine-mono.spec b/wine-mono.spec index c282a22..3706f9b 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -45,6 +45,7 @@ BuildRequires: zip BuildRequires: wine-core wine-wow BuildRequires: wine-devel BuildRequires: mono-core +BuildRequires: bc Requires: wine-filesystem @@ -103,6 +104,7 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %changelog * Thu Apr 4 2013 Erik van Pienbroek - 0.0.8-3 - Fix FTBFS against latest automake +- Added BR: bc * Fri Feb 15 2013 Fedora Release Engineering - 0.0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 25bed3f6326819d1dc57ece6478104dd81a5e67c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 01:59:54 -0500 Subject: [PATCH 08/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 3706f9b..9b2c22e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 0.0.8 -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 @@ -102,6 +102,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 0.0.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Thu Apr 4 2013 Erik van Pienbroek - 0.0.8-3 - Fix FTBFS against latest automake - Added BR: bc From bab6fd0eca88caefbdf0ad0c734316017498faae Mon Sep 17 00:00:00 2001 From: Andreas Bierfert Date: Sun, 8 Dec 2013 20:32:53 +0100 Subject: [PATCH 09/90] 4.5.2-1 - version upgrade --- .gitignore | 2 +- ...macros-obsoleted-by-automake-1.13.-F.patch | 11 - sources | 2 +- wine-mono-build-fixidtgeneration.patch | 277 ------------------ wine-mono.spec | 17 +- 5 files changed, 8 insertions(+), 301 deletions(-) delete mode 100644 0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch delete mode 100644 wine-mono-build-fixidtgeneration.patch diff --git a/.gitignore b/.gitignore index 5797c78..5c7906f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-0.0.8.tar.gz +/wine-mono-4.5.2.tar.gz diff --git a/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch b/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch deleted file mode 100644 index c1342dd..0000000 --- a/0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/runtime/Makefile.am b/runtime/Makefile.am -index c12d4a7..f70d4d2 100644 ---- a/runtime/Makefile.am -+++ b/runtime/Makefile.am -@@ -1,6 +1,3 @@ --# hack to prevent 'check' from depending on 'all' --AUTOMAKE_OPTIONS = cygnus -- - tmpinst = _tmpinst - - noinst_SCRIPTS = mono-wrapper monodis-wrapper diff --git a/sources b/sources index e67db1b..d567687 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5300eafb47b9258643581bcdf675f61f wine-mono-0.0.8.tar.gz +10a69a641881490bdfee48b2e4fdf63d wine-mono-4.5.2.tar.gz diff --git a/wine-mono-build-fixidtgeneration.patch b/wine-mono-build-fixidtgeneration.patch deleted file mode 100644 index 2da63ba..0000000 --- a/wine-mono-build-fixidtgeneration.patch +++ /dev/null @@ -1,277 +0,0 @@ ---- wine-mono-0.0.8/build-winemono.sh.orig 2012-10-29 22:05:56.967460837 +0100 -+++ wine-mono-0.0.8/build-winemono.sh 2012-10-29 22:11:58.546925841 +0100 -@@ -164,25 +164,25 @@ - - build_directorytable () - { -- echo 'Directory\tDirectory_Parent\tDefaultDir' -- echo 's72\tS72\tl255' -- echo 'Directory\tDirectory' -- -- echo 'TARGETDIR\t\tSourceDir' -- echo 'MONODIR\tMONOBASEDIR\tmono-2.0:.' -- echo 'MONOBASEDIR\tWindowsFolder\tmono:.' -- echo 'WindowsFolder\tTARGETDIR\t.' -- echo 'WindowsDotNet\tWindowsFolder\tMicrosoft.NET' -- echo 'WindowsDotNetFramework\tWindowsDotNet\tFramework' -- echo 'WindowsDotNetFramework11\tWindowsDotNetFramework\tv1.1.4322' -- echo 'WindowsDotNetFramework11Config\tWindowsDotNetFramework11\tCONFIG' -- echo 'WindowsDotNetFramework20\tWindowsDotNetFramework\tv2.0.50727' -- echo 'WindowsDotNetFramework20Config\tWindowsDotNetFramework20\tCONFIG' -- echo 'WindowsDotNetFramework30\tWindowsDotNetFramework\tv3.0' -- echo 'WindowsDotNetFramework30wcf\tWindowsDotNetFramework30\twindows communication foundation' -- echo 'WindowsDotNetFramework30wpf\tWindowsDotNetFramework30\twpf' -- echo 'WindowsDotNetFramework40\tWindowsDotNetFramework\tv4.0.30319' -- echo 'WindowsDotNetFramework40Config\tWindowsDotNetFramework40\tCONFIG' -+ echo -e 'Directory\tDirectory_Parent\tDefaultDir' -+ echo -e 's72\tS72\tl255' -+ echo -e 'Directory\tDirectory' -+ -+ echo -e 'TARGETDIR\t\tSourceDir' -+ echo -e 'MONODIR\tMONOBASEDIR\tmono-2.0:.' -+ echo -e 'MONOBASEDIR\tWindowsFolder\tmono:.' -+ echo -e 'WindowsFolder\tTARGETDIR\t.' -+ echo -e 'WindowsDotNet\tWindowsFolder\tMicrosoft.NET' -+ echo -e 'WindowsDotNetFramework\tWindowsDotNet\tFramework' -+ echo -e 'WindowsDotNetFramework11\tWindowsDotNetFramework\tv1.1.4322' -+ echo -e 'WindowsDotNetFramework11Config\tWindowsDotNetFramework11\tCONFIG' -+ echo -e 'WindowsDotNetFramework20\tWindowsDotNetFramework\tv2.0.50727' -+ echo -e 'WindowsDotNetFramework20Config\tWindowsDotNetFramework20\tCONFIG' -+ echo -e 'WindowsDotNetFramework30\tWindowsDotNetFramework\tv3.0' -+ echo -e 'WindowsDotNetFramework30wcf\tWindowsDotNetFramework30\twindows communication foundation' -+ echo -e 'WindowsDotNetFramework30wpf\tWindowsDotNetFramework30\twpf' -+ echo -e 'WindowsDotNetFramework40\tWindowsDotNetFramework\tv4.0.30319' -+ echo -e 'WindowsDotNetFramework40Config\tWindowsDotNetFramework40\tCONFIG' - - cd "$CURDIR/image" - -@@ -196,7 +196,7 @@ - DIRNAME=MONODIR - fi - BASENAME=`basename $f` -- echo $KEY\\t$DIRNAME\\t$BASENAME -+ echo -e $KEY\\t$DIRNAME\\t$BASENAME - done - - cd "$CURDIR" -@@ -204,25 +204,25 @@ - - build_componenttable () - { -- echo 'Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath' -- echo 's72\tS38\ts72\ti2\tS255\tS72' -- echo 'Component\tComponent' -- -- echo 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' -- echo 'mono-registry64\t{E088D122-0696-4137-BC4E-C999303B4BE2}\tWindowsDotNetFramework\t260\t\tDotNetFrameworkInstallRoot' -- echo 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' -- echo 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' -- echo 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' -- echo 'dotnet-folder\t{22DCE198-F30F-4E74-AEC6-D089B844A878}\tWindowsDotNet\t0\t\t' # needed to remove the folder -- echo 'framework-folder\t{41B3A67B-63F4-4491-A53C-9E792BE5A889}\tWindowsDotNetFramework\t0\t\t' -- echo 'framework11-folder\t{20F5741D-4655-400D-8373-7607A84D2478}\tWindowsDotNetFramework11\t0\t\t' -- echo 'framework20-folder\t{B845FD54-09B7-467C-800F-205A142F2F20}\tWindowsDotNetFramework20\t0\t\t' -- echo 'framework30-folder\t{C3221C80-F9D2-41B5-91E1-F6ADBB05ABBC}\tWindowsDotNetFramework30\t0\t\t' -- echo 'framework30wcf-folder\t{1ECAD22C-31C2-4BAC-AC74-78883C396FAB}\tWindowsDotNetFramework30wcf\t0\t\t' -- echo 'framework30wpf-folder\t{3C146462-0CAF-4F07-83E6-A75A2A5DE961}\tWindowsDotNetFramework30wpf\t0\t\t' -- echo 'framework40-folder\t{29ECF991-3E9E-4D23-B0B2-874631642B13}\tWindowsDotNetFramework40\t0\t\t' -- echo 'monobase-folder\t{BE46D94A-7443-4B5C-9B91-6A83815365AB}\tMONOBASEDIR\t0\t\t' -- echo 'mono-folder\t{FD7F9172-4E35-4DF5-BD6A-FB7B795D9346}\tMONODIR\t0\t\t' -+ echo -e 'Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath' -+ echo -e 's72\tS38\ts72\ti2\tS255\tS72' -+ echo -e 'Component\tComponent' -+ -+ echo -e 'mono-registry\t{93BE4304-497C-4ACB-A0FD-1C3695C011B4}\tWindowsDotNetFramework\t4\t\tDotNetFrameworkInstallRoot' -+ echo -e 'mono-registry64\t{E088D122-0696-4137-BC4E-C999303B4BE2}\tWindowsDotNetFramework\t260\t\tDotNetFrameworkInstallRoot' -+ echo -e 'config-1.1\t{0DA29B5A-2050-4200-92EE-442D1EE6CF96}\tWindowsDotNetFramework11Config\t0\t\t1.1-machine.config' -+ echo -e 'config-2.0\t{ABB0BF6A-6610-4E45-8194-64D596667621}\tWindowsDotNetFramework20Config\t0\t\t2.0-machine.config' -+ echo -e 'config-4.0\t{511C0294-4504-4FC9-B5A7-E85CCEE95C6B}\tWindowsDotNetFramework40Config\t0\t\t4.0-machine.config' -+ echo -e 'dotnet-folder\t{22DCE198-F30F-4E74-AEC6-D089B844A878}\tWindowsDotNet\t0\t\t' # needed to remove the folder -+ echo -e 'framework-folder\t{41B3A67B-63F4-4491-A53C-9E792BE5A889}\tWindowsDotNetFramework\t0\t\t' -+ echo -e 'framework11-folder\t{20F5741D-4655-400D-8373-7607A84D2478}\tWindowsDotNetFramework11\t0\t\t' -+ echo -e 'framework20-folder\t{B845FD54-09B7-467C-800F-205A142F2F20}\tWindowsDotNetFramework20\t0\t\t' -+ echo -e 'framework30-folder\t{C3221C80-F9D2-41B5-91E1-F6ADBB05ABBC}\tWindowsDotNetFramework30\t0\t\t' -+ echo -e 'framework30wcf-folder\t{1ECAD22C-31C2-4BAC-AC74-78883C396FAB}\tWindowsDotNetFramework30wcf\t0\t\t' -+ echo -e 'framework30wpf-folder\t{3C146462-0CAF-4F07-83E6-A75A2A5DE961}\tWindowsDotNetFramework30wpf\t0\t\t' -+ echo -e 'framework40-folder\t{29ECF991-3E9E-4D23-B0B2-874631642B13}\tWindowsDotNetFramework40\t0\t\t' -+ echo -e 'monobase-folder\t{BE46D94A-7443-4B5C-9B91-6A83815365AB}\tMONOBASEDIR\t0\t\t' -+ echo -e 'mono-folder\t{FD7F9172-4E35-4DF5-BD6A-FB7B795D9346}\tMONODIR\t0\t\t' - - cd "$CURDIR/image" - -@@ -236,7 +236,7 @@ - fi - GUID=`cat "$CURDIR/component-guids/${KEY}.guid"` - KEYPATH=`find "$f" -maxdepth 1 -type f|sort|head -n 1|sed -e 's/\//!/g'` -- echo $KEY\\t{$GUID}\\t$KEY\\t0\\t\\t$KEYPATH -+ echo -e $KEY\\t{$GUID}\\t$KEY\\t0\\t\\t$KEYPATH - done - - cd "$CURDIR" -@@ -244,20 +244,20 @@ - - build_createfoldertable () - { -- echo 'Directory_\tComponent_' -- echo 's72\ts72' -- echo 'CreateFolder\tDirectory_\tComponent_' -- -- echo 'WindowsDotNet\tdotnet-folder' -- echo 'WindowsDotNetFramework\tframework-folder' -- echo 'WindowsDotNetFramework11\tframework11-folder' -- echo 'WindowsDotNetFramework20\tframework20-folder' -- echo 'WindowsDotNetFramework30\tframework30-folder' -- echo 'WindowsDotNetFramework30wcf\tframework30wcf-folder' -- echo 'WindowsDotNetFramework30wpf\tframework30wpf-folder' -- echo 'WindowsDotNetFramework40\tframework40-folder' -- echo 'MONOBASEDIR\tmonobase-folder' -- echo 'MONODIR\tmono-folder' -+ echo -e 'Directory_\tComponent_' -+ echo -e 's72\ts72' -+ echo -e 'CreateFolder\tDirectory_\tComponent_' -+ -+ echo -e 'WindowsDotNet\tdotnet-folder' -+ echo -e 'WindowsDotNetFramework\tframework-folder' -+ echo -e 'WindowsDotNetFramework11\tframework11-folder' -+ echo -e 'WindowsDotNetFramework20\tframework20-folder' -+ echo -e 'WindowsDotNetFramework30\tframework30-folder' -+ echo -e 'WindowsDotNetFramework30wcf\tframework30wcf-folder' -+ echo -e 'WindowsDotNetFramework30wpf\tframework30wpf-folder' -+ echo -e 'WindowsDotNetFramework40\tframework40-folder' -+ echo -e 'MONOBASEDIR\tmonobase-folder' -+ echo -e 'MONODIR\tmono-folder' - - cd "$CURDIR/image" - -@@ -268,7 +268,7 @@ - FILE=`find "$f" -maxdepth 1 -type f` - if test ! "$FILE"; then - KEY=`echo $f|sed -e 's/\//|/g'` -- echo $KEY\\t$KEY -+ echo -e $KEY\\t$KEY - fi - done - -@@ -277,25 +277,25 @@ - - build_featurecomponentstable () - { -- echo 'Feature_\tComponent_' -- echo 's38\ts72' -- echo 'FeatureComponents\tFeature_\tComponent_' -- -- echo 'wine_mono\tmono-registry' -- echo 'wine_mono\tmono-registry64' -- echo 'wine_mono\tconfig-1.1' -- echo 'wine_mono\tconfig-2.0' -- echo 'wine_mono\tconfig-4.0' -- echo 'wine_mono\tdotnet-folder' -- echo 'wine_mono\tframework-folder' -- echo 'wine_mono\tframework11-folder' -- echo 'wine_mono\tframework20-folder' -- echo 'wine_mono\tframework30-folder' -- echo 'wine_mono\tframework30wcf-folder' -- echo 'wine_mono\tframework30wpf-folder' -- echo 'wine_mono\tframework40-folder' -- echo 'wine_mono\tmonobase-folder' -- echo 'wine_mono\tmono-folder' -+ echo -e 'Feature_\tComponent_' -+ echo -e 's38\ts72' -+ echo -e 'FeatureComponents\tFeature_\tComponent_' -+ -+ echo -e 'wine_mono\tmono-registry' -+ echo -e 'wine_mono\tmono-registry64' -+ echo -e 'wine_mono\tconfig-1.1' -+ echo -e 'wine_mono\tconfig-2.0' -+ echo -e 'wine_mono\tconfig-4.0' -+ echo -e 'wine_mono\tdotnet-folder' -+ echo -e 'wine_mono\tframework-folder' -+ echo -e 'wine_mono\tframework11-folder' -+ echo -e 'wine_mono\tframework20-folder' -+ echo -e 'wine_mono\tframework30-folder' -+ echo -e 'wine_mono\tframework30wcf-folder' -+ echo -e 'wine_mono\tframework30wpf-folder' -+ echo -e 'wine_mono\tframework40-folder' -+ echo -e 'wine_mono\tmonobase-folder' -+ echo -e 'wine_mono\tmono-folder' - - cd "$CURDIR/image" - -@@ -304,7 +304,7 @@ - continue - fi - KEY=`echo $f|sed -e 's/\//|/g'` -- echo wine_mono\\t$KEY -+ echo -e wine_mono\\t$KEY - done - - cd "$CURDIR" -@@ -312,9 +312,9 @@ - - build_filetable () - { -- echo 'File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence' -- echo 's72\ts72\tl255\ti4\tS72\tS20\tI2\ti2' -- echo 'File\tFile' -+ echo -e 'File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence' -+ echo -e 's72\ts72\tl255\ti4\tS72\tS20\tI2\ti2' -+ echo -e 'File\tFile' - - SEQ=0 - -@@ -343,7 +343,7 @@ - ;; - esac - -- echo $KEY\\t$COMPONENT\\t$BASENAME\\t$FILESIZE\\t\\t\\t\\t$SEQ -+ echo -e $KEY\\t$COMPONENT\\t$BASENAME\\t$FILESIZE\\t\\t\\t\\t$SEQ - done - - IMAGECAB_SEQ=$SEQ -@@ -353,11 +353,11 @@ - - build_mediatable () - { -- echo 'DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource' -- echo 'i2\ti4\tL64\tS255\tS32\tS72' -- echo 'Media\tDiskId' -+ echo -e 'DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource' -+ echo -e 'i2\ti4\tL64\tS255\tS32\tS72' -+ echo -e 'Media\tDiskId' - -- echo 1\\t$IMAGECAB_SEQ\\t\\t#image.cab\\t\\t -+ echo -e 1\\t$IMAGECAB_SEQ\\t\\t#image.cab\\t\\t - } - - hex_to_binary () -@@ -372,14 +372,14 @@ - - format_od_output () - { -- echo $2'\t'$3'\t'$4'\t'$5'\t' -+ echo -e $2'\t'$3'\t'$4'\t'$5'\t' - } - - build_msifilehashtable () - { -- echo 'File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4' -- echo 's72\ti2\ti4\ti4\ti4\ti4' -- echo 'MsiFileHash\tFile_' -+ echo -e 'File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4' -+ echo -e 's72\ti2\ti4\ti4\ti4\ti4' -+ echo -e 'MsiFileHash\tFile_' - - cd "$CURDIR/image" - -@@ -387,9 +387,9 @@ - KEY=`echo $f|sed -e 's/\//!/g'` - FILESIZE=`stat --format=%s $f` - -- echo -n $KEY\\t0\\t -+ echo -e -n $KEY\\t0\\t - if test $FILESIZE -eq 0; then -- echo '0\t0\t0\t0' -+ echo -e '0\t0\t0\t0' - else - format_od_output `md5sum $f|head -c 32|hex_to_binary|od -v -t d4` - fi diff --git a/wine-mono.spec b/wine-mono.spec index 9b2c22e..f1be950 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 0.0.8 -Release: 3%{?dist} +Version: 4.5.2 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -10,11 +10,6 @@ Group: Development/Libraries URL: http://wiki.winehq.org/Mono Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch -Patch1: wine-mono-build-fixidtgeneration.patch - -# Fix FTBFS against latest automake -# Patch taken from upstream mono git, commit 052ba601f3ed9e7fc5a216407986a89ee0c3296f -Patch2: 0001-Remove-automake-macros-obsoleted-by-automake-1.13.-F.patch # see git://github.com/madewokherd/wine-mono @@ -55,10 +50,6 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.msifilename -%patch1 -p1 -b.fixidtgen -cd mono -%patch2 -p1 -b .automake -cd - %build # make sure this builds on x86-64 @@ -102,6 +93,10 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Dec 08 2013 Andreas Bierfert +- 4.5.2-1 +- version upgrade + * Sun Aug 04 2013 Fedora Release Engineering - 0.0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From f9017ff5662a5b48ebae95fc9feee9c42d8df24a Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 14 Dec 2013 10:44:37 -0600 Subject: [PATCH 10/90] Add ExcludeArch as Mono requires an x86 builder host --- wine-mono.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index f1be950..6e40e46 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 4.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -14,6 +14,7 @@ Patch0: wine-mono-build-msifilename.patch # see git://github.com/madewokherd/wine-mono BuildArch: noarch +ExcludeArch: armv7hl ppc s390x # 64 BuildRequires: mingw64-filesystem >= 95 @@ -93,6 +94,10 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sat Dec 14 2013 Michael Cronenworth +- 4.5.2-2 +- Add ExcludeArch as Mono requires an x86 builder host + * Sun Dec 08 2013 Andreas Bierfert - 4.5.2-1 - version upgrade From 945f38956529d58b7bfa36de6ce3c2db4f1258ba Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 23:36:10 -0500 Subject: [PATCH 11/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 6e40e46..e148ae6 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 4.5.2 -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 @@ -94,6 +94,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 4.5.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat Dec 14 2013 Michael Cronenworth - 4.5.2-2 - Add ExcludeArch as Mono requires an x86 builder host From e437dabfcee08ac726e43fb4c8b9dbf2462b467f Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Wed, 25 Jun 2014 00:00:14 -0500 Subject: [PATCH 12/90] Apply patch to compile with static-libgcc (#1056436) --- wine-mono-static-gcc.patch | 22 ++++++++++++++++++++++ wine-mono.spec | 9 ++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 wine-mono-static-gcc.patch diff --git a/wine-mono-static-gcc.patch b/wine-mono-static-gcc.patch new file mode 100644 index 0000000..c939ef7 --- /dev/null +++ b/wine-mono-static-gcc.patch @@ -0,0 +1,22 @@ +--- wine-mono-4.5.2/mono/configure.in.orig 2014-06-24 21:12:59.841794023 -0500 ++++ wine-mono-4.5.2/mono/configure.in 2014-06-24 23:26:13.675935649 -0500 +@@ -117,6 +117,8 @@ + AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW]) + fi + HOST_CC="gcc" ++ CC="$host-gcc -static-libgcc" ++ CXX="$host-g++ -static-libgcc" + # Windows 2000 is required that includes Internet Explorer 5.01 + CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024 -DGC_NOT_DLL" + LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32" +--- wine-mono-4.5.2/mono/eglib/configure.ac.orig 2014-06-24 21:55:52.707897667 -0500 ++++ wine-mono-4.5.2/mono/eglib/configure.ac 2014-06-24 23:28:01.488241190 -0500 +@@ -57,6 +57,8 @@ + SEARCHSEP=';' + OS="WIN32" + PIDTYPE='void *' ++ CC="$host-gcc -static-libgcc" ++ CXX="$host-g++ -static-libgcc" + ;; + *-*darwin*) + platform_darwin=yes diff --git a/wine-mono.spec b/wine-mono.spec index e148ae6..56ec885 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 4.5.2 -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 @@ -10,6 +10,7 @@ Group: Development/Libraries URL: http://wiki.winehq.org/Mono Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch +Patch1: wine-mono-static-gcc.patch # see git://github.com/madewokherd/wine-mono @@ -18,7 +19,6 @@ ExcludeArch: armv7hl ppc s390x # 64 BuildRequires: mingw64-filesystem >= 95 -BuildRequires: mingw64-binutils BuildRequires: mingw64-headers BuildRequires: mingw64-cpp BuildRequires: mingw64-gcc @@ -26,7 +26,6 @@ BuildRequires: mingw64-gcc-c++ BuildRequires: mingw64-crt # 32 BuildRequires: mingw32-filesystem >= 95 -BuildRequires: mingw32-binutils BuildRequires: mingw32-headers BuildRequires: mingw32-cpp BuildRequires: mingw32-gcc @@ -51,6 +50,7 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.msifilename +%patch1 -p1 -b.static-gcc %build # make sure this builds on x86-64 @@ -94,6 +94,9 @@ cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Tue Jun 24 2014 Michael Cronenworth - 4.5.2-4 +- Rebuilt to use static libgcc (#1056436) + * Sun Jun 08 2014 Fedora Release Engineering - 4.5.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From a17a5bd21f11371d77b528ea3dfef11df77cc1ca Mon Sep 17 00:00:00 2001 From: Andreas Bierfert Date: Sat, 15 Nov 2014 09:18:55 +0100 Subject: [PATCH 13/90] 4.5.4-1 - version upgrade --- .gitignore | 2 +- sources | 2 +- wine-mono-build-msifilename.patch | 6 +++--- wine-mono-static-gcc.patch | 22 ---------------------- wine-mono.spec | 11 ++++++----- 5 files changed, 11 insertions(+), 32 deletions(-) delete mode 100644 wine-mono-static-gcc.patch diff --git a/.gitignore b/.gitignore index 5c7906f..324ebfb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.5.2.tar.gz +/wine-mono-4.5.4.tar.gz diff --git a/sources b/sources index d567687..b0bc3fe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -10a69a641881490bdfee48b2e4fdf63d wine-mono-4.5.2.tar.gz +66941777fe98c6e72351a081ab4d2c09 wine-mono-4.5.4.tar.gz diff --git a/wine-mono-build-msifilename.patch b/wine-mono-build-msifilename.patch index f89c170..cfb4795 100644 --- a/wine-mono-build-msifilename.patch +++ b/wine-mono-build-msifilename.patch @@ -1,5 +1,5 @@ ---- wine-mono-0.0.8/build-winemono.sh.orig 2012-10-29 22:15:31.409448612 +0100 -+++ wine-mono-0.0.8/build-winemono.sh 2012-10-29 22:15:52.878292404 +0100 +--- wine-mono-4.5.4/build-winemono.sh.orig 2014-11-14 18:02:57.810439383 +0100 ++++ wine-mono-4.5.4/build-winemono.sh 2014-11-14 18:03:20.583738750 +0100 @@ -9,7 +9,7 @@ ORIGINAL_PATH="$PATH" REBUILD=0 @@ -7,5 +7,5 @@ -MSIFILENAME=winemono.msi +MSIFILENAME=${MSIFILENAME:-winemono.msi} BUILD_TESTS=0 + USE_MONOLITE=0 - usage () diff --git a/wine-mono-static-gcc.patch b/wine-mono-static-gcc.patch deleted file mode 100644 index c939ef7..0000000 --- a/wine-mono-static-gcc.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- wine-mono-4.5.2/mono/configure.in.orig 2014-06-24 21:12:59.841794023 -0500 -+++ wine-mono-4.5.2/mono/configure.in 2014-06-24 23:26:13.675935649 -0500 -@@ -117,6 +117,8 @@ - AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW]) - fi - HOST_CC="gcc" -+ CC="$host-gcc -static-libgcc" -+ CXX="$host-g++ -static-libgcc" - # Windows 2000 is required that includes Internet Explorer 5.01 - CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024 -DGC_NOT_DLL" - LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32" ---- wine-mono-4.5.2/mono/eglib/configure.ac.orig 2014-06-24 21:55:52.707897667 -0500 -+++ wine-mono-4.5.2/mono/eglib/configure.ac 2014-06-24 23:28:01.488241190 -0500 -@@ -57,6 +57,8 @@ - SEARCHSEP=';' - OS="WIN32" - PIDTYPE='void *' -+ CC="$host-gcc -static-libgcc" -+ CXX="$host-g++ -static-libgcc" - ;; - *-*darwin*) - platform_darwin=yes diff --git a/wine-mono.spec b/wine-mono.spec index 56ec885..fc564c4 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.5.2 -Release: 4%{?dist} +Version: 4.5.4 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -50,7 +50,6 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.msifilename -%patch1 -p1 -b.static-gcc %build # make sure this builds on x86-64 @@ -84,16 +83,18 @@ popd cp mono-basic/README mono-basic-README cp mono-basic/LICENSE mono-basic-LICENSE -cp MonoGame/LICENSE.txt MonoGame-LICENSE.txt %files %doc COPYING README %doc mono-LICENSE mono-COPYING.LIB mono-mcs* %doc mono-basic-README mono-basic-LICENSE -%doc MonoGame-LICENSE.txt %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Nov 14 2014 Andreas Bierfert +- 4.5.4-1 +- version upgrade + * Tue Jun 24 2014 Michael Cronenworth - 4.5.2-4 - Rebuilt to use static libgcc (#1056436) From 569c21cf3be952e3397e4f0b0b3d9b7c8ac68039 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 30 Nov 2014 16:54:21 -0600 Subject: [PATCH 14/90] Remove static gcc patch reference --- wine-mono.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index fc564c4..d3c30d9 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -10,7 +10,6 @@ Group: Development/Libraries URL: http://wiki.winehq.org/Mono Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch -Patch1: wine-mono-static-gcc.patch # see git://github.com/madewokherd/wine-mono From 0a706866ef732d21c35634d7468bc9a4429eadd0 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Thu, 5 Feb 2015 20:42:43 -0600 Subject: [PATCH 15/90] Update bundled valgrind headers (#1141584) --- wine-mono-valgrind.patch | 3505 ++++++++++++++++++++++++++++++++++++++ wine-mono.spec | 8 +- 2 files changed, 3512 insertions(+), 1 deletion(-) create mode 100644 wine-mono-valgrind.patch diff --git a/wine-mono-valgrind.patch b/wine-mono-valgrind.patch new file mode 100644 index 0000000..4c4ac90 --- /dev/null +++ b/wine-mono-valgrind.patch @@ -0,0 +1,3505 @@ +From 1445d4821c8091c395264542344dca9df22a2c82 Mon Sep 17 00:00:00 2001 +From: Zoltan Varga +Date: Thu, 5 Feb 2015 20:53:21 -0500 +Subject: [PATCH] [runtime] Update valgrind headers to the ones from valgrind + 3.10.1. Fixes #26688. + +--- + mono/utils/memcheck.h | 17 +- + mono/utils/valgrind.h | 2864 +++++++++++++++++++++++++++++++++++++++---------- + 2 files changed, 2288 insertions(+), 593 deletions(-) + +diff --git a/mono/utils/memcheck.h b/mono/utils/memcheck.h +index fcc7644..2740578 100644 +--- a/mono/utils/memcheck.h ++++ b/mono/utils/memcheck.h +@@ -13,7 +13,7 @@ + This file is part of MemCheck, a heavyweight Valgrind tool for + detecting memory errors. + +- Copyright (C) 2000-2012 Julian Seward. All rights reserved. ++ Copyright (C) 2000-2013 Julian Seward. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions +@@ -96,6 +96,9 @@ typedef + /* Not next to VG_USERREQ__COUNT_LEAKS because it was added later. */ + VG_USERREQ__COUNT_LEAK_BLOCKS, + ++ VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, ++ VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, ++ + /* This is just for memcheck's internal use - don't use it */ + _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR + = VG_USERREQ_TOOL_BASE('M','C') + 256 +@@ -283,5 +286,17 @@ typedef + (const char*)(zzvbits), \ + (zznbytes), 0, 0 ) + ++/* Disable and re-enable reporting of addressing errors in the ++ specified address range. */ ++#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \ ++ VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ ++ VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, \ ++ (_qzz_addr), (_qzz_len), 0, 0, 0) ++ ++#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \ ++ VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ ++ VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, \ ++ (_qzz_addr), (_qzz_len), 0, 0, 0) ++ + #endif + +diff --git a/mono/utils/valgrind.h b/mono/utils/valgrind.h +index 315da5b..6954d75 100644 +--- a/mono/utils/valgrind.h ++++ b/mono/utils/valgrind.h +@@ -12,7 +12,7 @@ + This file is part of Valgrind, a dynamic binary instrumentation + framework. + +- Copyright (C) 2000-2012 Julian Seward. All rights reserved. ++ Copyright (C) 2000-2013 Julian Seward. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions +@@ -89,7 +89,7 @@ + || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6)) + */ + #define __VALGRIND_MAJOR__ 3 +-#define __VALGRIND_MINOR__ 8 ++#define __VALGRIND_MINOR__ 10 + + + #include +@@ -111,35 +111,51 @@ + #undef PLAT_x86_darwin + #undef PLAT_amd64_darwin + #undef PLAT_x86_win32 ++#undef PLAT_amd64_win64 + #undef PLAT_x86_linux + #undef PLAT_amd64_linux + #undef PLAT_ppc32_linux +-#undef PLAT_ppc64_linux ++#undef PLAT_ppc64be_linux ++#undef PLAT_ppc64le_linux + #undef PLAT_arm_linux ++#undef PLAT_arm64_linux + #undef PLAT_s390x_linux + #undef PLAT_mips32_linux ++#undef PLAT_mips64_linux + + + #if defined(__APPLE__) && defined(__i386__) + # define PLAT_x86_darwin 1 + #elif defined(__APPLE__) && defined(__x86_64__) + # define PLAT_amd64_darwin 1 +-#elif defined(__MINGW32__) || defined(__CYGWIN32__) \ ++#elif (defined(__MINGW32__) && !defined(__MINGW64__)) \ ++ || defined(__CYGWIN32__) \ + || (defined(_WIN32) && defined(_M_IX86)) + # define PLAT_x86_win32 1 ++#elif defined(__MINGW64__) \ ++ || (defined(_WIN64) && defined(_M_X64)) ++# define PLAT_amd64_win64 1 + #elif defined(__linux__) && defined(__i386__) + # define PLAT_x86_linux 1 + #elif defined(__linux__) && defined(__x86_64__) + # define PLAT_amd64_linux 1 + #elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__) + # define PLAT_ppc32_linux 1 +-#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) +-# define PLAT_ppc64_linux 1 +-#elif defined(__linux__) && defined(__arm__) ++#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF != 2 ++/* Big Endian uses ELF version 1 */ ++# define PLAT_ppc64be_linux 1 ++#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF == 2 ++/* Little Endian uses ELF version 2 */ ++# define PLAT_ppc64le_linux 1 ++#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__) + # define PLAT_arm_linux 1 ++#elif defined(__linux__) && defined(__aarch64__) && !defined(__arm__) ++# define PLAT_arm64_linux 1 + #elif defined(__linux__) && defined(__s390__) && defined(__s390x__) + # define PLAT_s390x_linux 1 +-#elif defined(__linux__) && defined(__mips__) ++#elif defined(__linux__) && defined(__mips__) && (__mips==64) ++# define PLAT_mips64_linux 1 ++#elif defined(__linux__) && defined(__mips__) && (__mips!=64) + # define PLAT_mips32_linux 1 + #else + /* If we're not compiling for our target platform, don't generate +@@ -368,7 +384,8 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, + + /* ------------------------ amd64-{linux,darwin} --------------- */ + +-#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) ++#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ ++ || (defined(PLAT_amd64_win64) && defined(__GNUC__)) + + typedef + struct { +@@ -430,6 +447,14 @@ typedef + + #endif /* PLAT_amd64_linux || PLAT_amd64_darwin */ + ++/* ------------------------- amd64-Win64 ------------------------- */ ++ ++#if defined(PLAT_amd64_win64) && !defined(__GNUC__) ++ ++#error Unsupported compiler. ++ ++#endif /* PLAT_amd64_win64 */ ++ + /* ------------------------ ppc32-linux ------------------------ */ + + #if defined(PLAT_ppc32_linux) +@@ -441,8 +466,8 @@ typedef + OrigFn; + + #define __SPECIAL_INSTRUCTION_PREAMBLE \ +- "rlwinm 0,0,3,0,0 ; rlwinm 0,0,13,0,0\n\t" \ +- "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t" ++ "rlwinm 0,0,3,0,31 ; rlwinm 0,0,13,0,31\n\t" \ ++ "rlwinm 0,0,29,0,31 ; rlwinm 0,0,19,0,31\n\t" + + #define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ + _zzq_default, _zzq_request, \ +@@ -501,7 +526,7 @@ typedef + + /* ------------------------ ppc64-linux ------------------------ */ + +-#if defined(PLAT_ppc64_linux) ++#if defined(PLAT_ppc64be_linux) + + typedef + struct { +@@ -576,7 +601,84 @@ typedef + ); \ + } while (0) + +-#endif /* PLAT_ppc64_linux */ ++#endif /* PLAT_ppc64be_linux */ ++ ++#if defined(PLAT_ppc64le_linux) ++ ++typedef ++ struct { ++ unsigned long long int nraddr; /* where's the code? */ ++ unsigned long long int r2; /* what tocptr do we need? */ ++ } ++ OrigFn; ++ ++#define __SPECIAL_INSTRUCTION_PREAMBLE \ ++ "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \ ++ "rotldi 0,0,61 ; rotldi 0,0,51\n\t" ++ ++#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ ++ _zzq_default, _zzq_request, \ ++ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ ++ \ ++ __extension__ \ ++ ({ unsigned long long int _zzq_args[6]; \ ++ unsigned long long int _zzq_result; \ ++ unsigned long long int* _zzq_ptr; \ ++ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ ++ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ ++ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ ++ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ ++ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ ++ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ ++ _zzq_ptr = _zzq_args; \ ++ __asm__ volatile("mr 3,%1\n\t" /*default*/ \ ++ "mr 4,%2\n\t" /*ptr*/ \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* %R3 = client_request ( %R4 ) */ \ ++ "or 1,1,1\n\t" \ ++ "mr %0,3" /*result*/ \ ++ : "=b" (_zzq_result) \ ++ : "b" (_zzq_default), "b" (_zzq_ptr) \ ++ : "cc", "memory", "r3", "r4"); \ ++ _zzq_result; \ ++ }) ++ ++#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ ++ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ ++ unsigned long long int __addr; \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* %R3 = guest_NRADDR */ \ ++ "or 2,2,2\n\t" \ ++ "mr %0,3" \ ++ : "=b" (__addr) \ ++ : \ ++ : "cc", "memory", "r3" \ ++ ); \ ++ _zzq_orig->nraddr = __addr; \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* %R3 = guest_NRADDR_GPR2 */ \ ++ "or 4,4,4\n\t" \ ++ "mr %0,3" \ ++ : "=b" (__addr) \ ++ : \ ++ : "cc", "memory", "r3" \ ++ ); \ ++ _zzq_orig->r2 = __addr; \ ++ } ++ ++#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* branch-and-link-to-noredir *%R12 */ \ ++ "or 3,3,3\n\t" ++ ++#define VALGRIND_VEX_INJECT_IR() \ ++ do { \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ "or 5,5,5\n\t" \ ++ ); \ ++ } while (0) ++ ++#endif /* PLAT_ppc64le_linux */ + + /* ------------------------- arm-linux ------------------------- */ + +@@ -646,6 +748,74 @@ typedef + + #endif /* PLAT_arm_linux */ + ++/* ------------------------ arm64-linux ------------------------- */ ++ ++#if defined(PLAT_arm64_linux) ++ ++typedef ++ struct { ++ unsigned long long int nraddr; /* where's the code? */ ++ } ++ OrigFn; ++ ++#define __SPECIAL_INSTRUCTION_PREAMBLE \ ++ "ror x12, x12, #3 ; ror x12, x12, #13 \n\t" \ ++ "ror x12, x12, #51 ; ror x12, x12, #61 \n\t" ++ ++#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ ++ _zzq_default, _zzq_request, \ ++ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ ++ \ ++ __extension__ \ ++ ({volatile unsigned long long int _zzq_args[6]; \ ++ volatile unsigned long long int _zzq_result; \ ++ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ ++ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ ++ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ ++ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ ++ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ ++ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ ++ __asm__ volatile("mov x3, %1\n\t" /*default*/ \ ++ "mov x4, %2\n\t" /*ptr*/ \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* X3 = client_request ( X4 ) */ \ ++ "orr x10, x10, x10\n\t" \ ++ "mov %0, x3" /*result*/ \ ++ : "=r" (_zzq_result) \ ++ : "r" (_zzq_default), "r" (&_zzq_args[0]) \ ++ : "cc","memory", "x3", "x4"); \ ++ _zzq_result; \ ++ }) ++ ++#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ ++ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ ++ unsigned long long int __addr; \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* X3 = guest_NRADDR */ \ ++ "orr x11, x11, x11\n\t" \ ++ "mov %0, x3" \ ++ : "=r" (__addr) \ ++ : \ ++ : "cc", "memory", "x3" \ ++ ); \ ++ _zzq_orig->nraddr = __addr; \ ++ } ++ ++#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* branch-and-link-to-noredir X8 */ \ ++ "orr x12, x12, x12\n\t" ++ ++#define VALGRIND_VEX_INJECT_IR() \ ++ do { \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ "orr x9, x9, x9\n\t" \ ++ : : : "cc", "memory" \ ++ ); \ ++ } while (0) ++ ++#endif /* PLAT_arm64_linux */ ++ + /* ------------------------ s390x-linux ------------------------ */ + + #if defined(PLAT_s390x_linux) +@@ -763,7 +933,7 @@ typedef + "move %0, $11\n\t" /*result*/ \ + : "=r" (_zzq_result) \ + : "r" (_zzq_default), "r" (&_zzq_args[0]) \ +- : "cc","memory", "t3", "t4"); \ ++ : "$11", "$12"); \ + _zzq_result; \ + }) + +@@ -776,7 +946,7 @@ typedef + "move %0, $11" /*result*/ \ + : "=r" (__addr) \ + : \ +- : "cc", "memory" , "t3" \ ++ : "$11" \ + ); \ + _zzq_orig->nraddr = __addr; \ + } +@@ -796,6 +966,75 @@ typedef + + #endif /* PLAT_mips32_linux */ + ++/* ------------------------- mips64-linux ---------------- */ ++ ++#if defined(PLAT_mips64_linux) ++ ++typedef ++ struct { ++ unsigned long long nraddr; /* where's the code? */ ++ } ++ OrigFn; ++ ++/* dsll $0,$0, 3 ++ * dsll $0,$0, 13 ++ * dsll $0,$0, 29 ++ * dsll $0,$0, 19*/ ++#define __SPECIAL_INSTRUCTION_PREAMBLE \ ++ "dsll $0,$0, 3 ; dsll $0,$0,13\n\t" \ ++ "dsll $0,$0,29 ; dsll $0,$0,19\n\t" ++ ++#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ ++ _zzq_default, _zzq_request, \ ++ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ ++ __extension__ \ ++ ({ volatile unsigned long long int _zzq_args[6]; \ ++ volatile unsigned long long int _zzq_result; \ ++ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ ++ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ ++ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ ++ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ ++ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ ++ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ ++ __asm__ volatile("move $11, %1\n\t" /*default*/ \ ++ "move $12, %2\n\t" /*ptr*/ \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* $11 = client_request ( $12 ) */ \ ++ "or $13, $13, $13\n\t" \ ++ "move %0, $11\n\t" /*result*/ \ ++ : "=r" (_zzq_result) \ ++ : "r" (_zzq_default), "r" (&_zzq_args[0]) \ ++ : "$11", "$12"); \ ++ _zzq_result; \ ++ }) ++ ++#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ ++ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ ++ volatile unsigned long long int __addr; \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* $11 = guest_NRADDR */ \ ++ "or $14, $14, $14\n\t" \ ++ "move %0, $11" /*result*/ \ ++ : "=r" (__addr) \ ++ : \ ++ : "$11"); \ ++ _zzq_orig->nraddr = __addr; \ ++ } ++ ++#define VALGRIND_CALL_NOREDIR_T9 \ ++ __SPECIAL_INSTRUCTION_PREAMBLE \ ++ /* call-noredir $25 */ \ ++ "or $15, $15, $15\n\t" ++ ++#define VALGRIND_VEX_INJECT_IR() \ ++ do { \ ++ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ ++ "or $11, $11, $11\n\t" \ ++ ); \ ++ } while (0) ++ ++#endif /* PLAT_mips64_linux */ ++ + /* Insert assembly code for other platforms here... */ + + #endif /* NVALGRIND */ +@@ -2379,7 +2618,7 @@ typedef + + /* ------------------------ ppc64-linux ------------------------ */ + +-#if defined(PLAT_ppc64_linux) ++#if defined(PLAT_ppc64be_linux) + + /* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ + +@@ -2932,54 +3171,56 @@ typedef + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#endif /* PLAT_ppc64_linux */ ++#endif /* PLAT_ppc64be_linux */ + +-/* ------------------------- arm-linux ------------------------- */ ++/* ------------------------- ppc64le-linux ----------------------- */ ++#if defined(PLAT_ppc64le_linux) + +-#if defined(PLAT_arm_linux) ++/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ + + /* These regs are trashed by the hidden call. */ +-#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4","r14" ++#define __CALLER_SAVED_REGS \ ++ "lr", "ctr", "xer", \ ++ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ ++ "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ ++ "r11", "r12", "r13" + + /* Macros to save and align the stack before making a function + call and restore it afterwards as gcc may not keep the stack + pointer aligned if it doesn't realise calls are being made + to other functions. */ + +-/* This is a bit tricky. We store the original stack pointer in r10 +- as it is callee-saves. gcc doesn't allow the use of r11 for some +- reason. Also, we can't directly "bic" the stack pointer in thumb +- mode since r13 isn't an allowed register number in that context. +- So use r4 as a temporary, since that is about to get trashed +- anyway, just after each use of this macro. Side effect is we need +- to be very careful about any future changes, since +- VALGRIND_ALIGN_STACK simply assumes r4 is usable. */ + #define VALGRIND_ALIGN_STACK \ +- "mov r10, sp\n\t" \ +- "mov r4, sp\n\t" \ +- "bic r4, r4, #7\n\t" \ +- "mov sp, r4\n\t" ++ "mr 28,1\n\t" \ ++ "rldicr 1,1,0,59\n\t" + #define VALGRIND_RESTORE_STACK \ +- "mov sp, r10\n\t" ++ "mr 1,28\n\t" + +-/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned +- long) == 4. */ ++/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned ++ long) == 8. */ + + #define CALL_FN_W_v(lval, orig) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[1]; \ ++ volatile unsigned long _argvec[3+0]; \ + volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -2987,20 +3228,27 @@ typedef + #define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[2]; \ ++ volatile unsigned long _argvec[3+1]; \ + volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)(arg1); \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3008,22 +3256,29 @@ typedef + #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[3]; \ ++ volatile unsigned long _argvec[3+2]; \ + volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)(arg1); \ +- _argvec[2] = (unsigned long)(arg2); \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3031,24 +3286,31 @@ typedef + #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[4]; \ ++ volatile unsigned long _argvec[3+3]; \ + volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)(arg1); \ +- _argvec[2] = (unsigned long)(arg2); \ +- _argvec[3] = (unsigned long)(arg3); \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3056,15 +3318,647 @@ typedef + #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[5]; \ ++ volatile unsigned long _argvec[3+4]; \ + volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)(arg1); \ +- _argvec[2] = (unsigned long)(arg2); \ +- _argvec[3] = (unsigned long)(arg3); \ +- _argvec[4] = (unsigned long)(arg4); \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+5]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+6]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+7]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+8]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ _argvec[2+8] = (unsigned long)arg8; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+9]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ _argvec[2+8] = (unsigned long)arg8; \ ++ _argvec[2+9] = (unsigned long)arg9; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "addi 1,1,-128\n\t" /* expand stack frame */ \ ++ /* arg9 */ \ ++ "ld 3,72(12)\n\t" \ ++ "std 3,96(1)\n\t" \ ++ /* args1-8 */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+10]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ _argvec[2+8] = (unsigned long)arg8; \ ++ _argvec[2+9] = (unsigned long)arg9; \ ++ _argvec[2+10] = (unsigned long)arg10; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "addi 1,1,-128\n\t" /* expand stack frame */ \ ++ /* arg10 */ \ ++ "ld 3,80(12)\n\t" \ ++ "std 3,104(1)\n\t" \ ++ /* arg9 */ \ ++ "ld 3,72(12)\n\t" \ ++ "std 3,96(1)\n\t" \ ++ /* args1-8 */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10,arg11) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+11]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ _argvec[2+8] = (unsigned long)arg8; \ ++ _argvec[2+9] = (unsigned long)arg9; \ ++ _argvec[2+10] = (unsigned long)arg10; \ ++ _argvec[2+11] = (unsigned long)arg11; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "addi 1,1,-144\n\t" /* expand stack frame */ \ ++ /* arg11 */ \ ++ "ld 3,88(12)\n\t" \ ++ "std 3,112(1)\n\t" \ ++ /* arg10 */ \ ++ "ld 3,80(12)\n\t" \ ++ "std 3,104(1)\n\t" \ ++ /* arg9 */ \ ++ "ld 3,72(12)\n\t" \ ++ "std 3,96(1)\n\t" \ ++ /* args1-8 */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10,arg11,arg12) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3+12]; \ ++ volatile unsigned long _res; \ ++ /* _argvec[0] holds current r2 across the call */ \ ++ _argvec[1] = (unsigned long)_orig.r2; \ ++ _argvec[2] = (unsigned long)_orig.nraddr; \ ++ _argvec[2+1] = (unsigned long)arg1; \ ++ _argvec[2+2] = (unsigned long)arg2; \ ++ _argvec[2+3] = (unsigned long)arg3; \ ++ _argvec[2+4] = (unsigned long)arg4; \ ++ _argvec[2+5] = (unsigned long)arg5; \ ++ _argvec[2+6] = (unsigned long)arg6; \ ++ _argvec[2+7] = (unsigned long)arg7; \ ++ _argvec[2+8] = (unsigned long)arg8; \ ++ _argvec[2+9] = (unsigned long)arg9; \ ++ _argvec[2+10] = (unsigned long)arg10; \ ++ _argvec[2+11] = (unsigned long)arg11; \ ++ _argvec[2+12] = (unsigned long)arg12; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "mr 12,%1\n\t" \ ++ "std 2,-16(12)\n\t" /* save tocptr */ \ ++ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ ++ "addi 1,1,-144\n\t" /* expand stack frame */ \ ++ /* arg12 */ \ ++ "ld 3,96(12)\n\t" \ ++ "std 3,120(1)\n\t" \ ++ /* arg11 */ \ ++ "ld 3,88(12)\n\t" \ ++ "std 3,112(1)\n\t" \ ++ /* arg10 */ \ ++ "ld 3,80(12)\n\t" \ ++ "std 3,104(1)\n\t" \ ++ /* arg9 */ \ ++ "ld 3,72(12)\n\t" \ ++ "std 3,96(1)\n\t" \ ++ /* args1-8 */ \ ++ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ ++ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ ++ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ ++ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ ++ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ ++ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ ++ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ ++ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ ++ "ld 12, 0(12)\n\t" /* target->r12 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ ++ "mr 12,%1\n\t" \ ++ "mr %0,3\n\t" \ ++ "ld 2,-16(12)\n\t" /* restore tocptr */ \ ++ VALGRIND_RESTORE_STACK \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[2]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#endif /* PLAT_ppc64le_linux */ ++ ++/* ------------------------- arm-linux ------------------------- */ ++ ++#if defined(PLAT_arm_linux) ++ ++/* These regs are trashed by the hidden call. */ ++#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4","r14" ++ ++/* Macros to save and align the stack before making a function ++ call and restore it afterwards as gcc may not keep the stack ++ pointer aligned if it doesn't realise calls are being made ++ to other functions. */ ++ ++/* This is a bit tricky. We store the original stack pointer in r10 ++ as it is callee-saves. gcc doesn't allow the use of r11 for some ++ reason. Also, we can't directly "bic" the stack pointer in thumb ++ mode since r13 isn't an allowed register number in that context. ++ So use r4 as a temporary, since that is about to get trashed ++ anyway, just after each use of this macro. Side effect is we need ++ to be very careful about any future changes, since ++ VALGRIND_ALIGN_STACK simply assumes r4 is usable. */ ++#define VALGRIND_ALIGN_STACK \ ++ "mov r10, sp\n\t" \ ++ "mov r4, sp\n\t" \ ++ "bic r4, r4, #7\n\t" \ ++ "mov sp, r4\n\t" ++#define VALGRIND_RESTORE_STACK \ ++ "mov sp, r10\n\t" ++ ++/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned ++ long) == 4. */ ++ ++#define CALL_FN_W_v(lval, orig) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[1]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_W(lval, orig, arg1) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[2]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[4]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[5]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[6]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "sub sp, sp, #4 \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "push {r0} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[7]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "push {r0, r1} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[8]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "sub sp, sp, #4 \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "push {r0, r1, r2} \n\t" \ + "ldr r0, [%1, #4] \n\t" \ + "ldr r1, [%1, #8] \n\t" \ + "ldr r2, [%1, #12] \n\t" \ +@@ -3072,10 +3966,364 @@ typedef + "ldr r4, [%1] \n\t" /* target->r4 */ \ + VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[9]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "ldr r3, [%1, #32] \n\t" \ ++ "push {r0, r1, r2, r3} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[10]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "sub sp, sp, #4 \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "ldr r3, [%1, #32] \n\t" \ ++ "ldr r4, [%1, #36] \n\t" \ ++ "push {r0, r1, r2, r3, r4} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[11]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #40] \n\t" \ ++ "push {r0} \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "ldr r3, [%1, #32] \n\t" \ ++ "ldr r4, [%1, #36] \n\t" \ ++ "push {r0, r1, r2, r3, r4} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ ++ arg6,arg7,arg8,arg9,arg10, \ ++ arg11) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[12]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ _argvec[11] = (unsigned long)(arg11); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "sub sp, sp, #4 \n\t" \ ++ "ldr r0, [%1, #40] \n\t" \ ++ "ldr r1, [%1, #44] \n\t" \ ++ "push {r0, r1} \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "ldr r3, [%1, #32] \n\t" \ ++ "ldr r4, [%1, #36] \n\t" \ ++ "push {r0, r1, r2, r3, r4} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ ++ arg6,arg7,arg8,arg9,arg10, \ ++ arg11,arg12) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[13]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ _argvec[11] = (unsigned long)(arg11); \ ++ _argvec[12] = (unsigned long)(arg12); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr r0, [%1, #40] \n\t" \ ++ "ldr r1, [%1, #44] \n\t" \ ++ "ldr r2, [%1, #48] \n\t" \ ++ "push {r0, r1, r2} \n\t" \ ++ "ldr r0, [%1, #20] \n\t" \ ++ "ldr r1, [%1, #24] \n\t" \ ++ "ldr r2, [%1, #28] \n\t" \ ++ "ldr r3, [%1, #32] \n\t" \ ++ "ldr r4, [%1, #36] \n\t" \ ++ "push {r0, r1, r2, r3, r4} \n\t" \ ++ "ldr r0, [%1, #4] \n\t" \ ++ "ldr r1, [%1, #8] \n\t" \ ++ "ldr r2, [%1, #12] \n\t" \ ++ "ldr r3, [%1, #16] \n\t" \ ++ "ldr r4, [%1] \n\t" /* target->r4 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, r0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#endif /* PLAT_arm_linux */ ++ ++/* ------------------------ arm64-linux ------------------------ */ ++ ++#if defined(PLAT_arm64_linux) ++ ++/* These regs are trashed by the hidden call. */ ++#define __CALLER_SAVED_REGS \ ++ "x0", "x1", "x2", "x3","x4", "x5", "x6", "x7", "x8", "x9", \ ++ "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", \ ++ "x18", "x19", "x20", "x30", \ ++ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", \ ++ "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", \ ++ "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", \ ++ "v26", "v27", "v28", "v29", "v30", "v31" ++ ++/* x21 is callee-saved, so we can use it to save and restore SP around ++ the hidden call. */ ++#define VALGRIND_ALIGN_STACK \ ++ "mov x21, sp\n\t" \ ++ "bic sp, x21, #15\n\t" ++#define VALGRIND_RESTORE_STACK \ ++ "mov sp, x21\n\t" ++ ++/* These CALL_FN_ macros assume that on arm64-linux, ++ sizeof(unsigned long) == 8. */ ++ ++#define CALL_FN_W_v(lval, orig) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[1]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, x0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_W(lval, orig, arg1) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[2]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, x0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, x0\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[4]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, x0\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[5]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ __asm__ volatile( \ ++ VALGRIND_ALIGN_STACK \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ ++ VALGRIND_RESTORE_STACK \ ++ "mov %0, x0" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3093,20 +4341,18 @@ typedef + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "sub sp, sp, #4 \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "push {r0} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3125,20 +4371,19 @@ typedef + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "push {r0, r1} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3159,22 +4404,20 @@ typedef + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "sub sp, sp, #4 \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "push {r0, r1, r2} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3196,22 +4439,21 @@ typedef + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "ldr r3, [%1, #32] \n\t" \ +- "push {r0, r1, r2, r3} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x7, [%1, #64] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3234,24 +4476,24 @@ typedef + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "sub sp, sp, #4 \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "ldr r3, [%1, #32] \n\t" \ +- "ldr r4, [%1, #36] \n\t" \ +- "push {r0, r1, r2, r3, r4} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "sub sp, sp, #0x20 \n\t" \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x7, [%1, #64] \n\t" \ ++ "ldr x8, [%1, #72] \n\t" \ ++ "str x8, [sp, #0] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3275,32 +4517,32 @@ typedef + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #40] \n\t" \ +- "push {r0} \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "ldr r3, [%1, #32] \n\t" \ +- "ldr r4, [%1, #36] \n\t" \ +- "push {r0, r1, r2, r3, r4} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "sub sp, sp, #0x20 \n\t" \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x7, [%1, #64] \n\t" \ ++ "ldr x8, [%1, #72] \n\t" \ ++ "str x8, [sp, #0] \n\t" \ ++ "ldr x8, [%1, #80] \n\t" \ ++ "str x8, [sp, #8] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ +- arg6,arg7,arg8,arg9,arg10, \ +- arg11) \ ++#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10,arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[12]; \ +@@ -3319,34 +4561,35 @@ typedef + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "sub sp, sp, #4 \n\t" \ +- "ldr r0, [%1, #40] \n\t" \ +- "ldr r1, [%1, #44] \n\t" \ +- "push {r0, r1} \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "ldr r3, [%1, #32] \n\t" \ +- "ldr r4, [%1, #36] \n\t" \ +- "push {r0, r1, r2, r3, r4} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "sub sp, sp, #0x30 \n\t" \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x7, [%1, #64] \n\t" \ ++ "ldr x8, [%1, #72] \n\t" \ ++ "str x8, [sp, #0] \n\t" \ ++ "ldr x8, [%1, #80] \n\t" \ ++ "str x8, [sp, #8] \n\t" \ ++ "ldr x8, [%1, #88] \n\t" \ ++ "str x8, [sp, #16] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ +- arg6,arg7,arg8,arg9,arg10, \ +- arg11,arg12) \ ++#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10,arg11, \ ++ arg12) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[13]; \ +@@ -3366,32 +4609,35 @@ typedef + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ + VALGRIND_ALIGN_STACK \ +- "ldr r0, [%1, #40] \n\t" \ +- "ldr r1, [%1, #44] \n\t" \ +- "ldr r2, [%1, #48] \n\t" \ +- "push {r0, r1, r2} \n\t" \ +- "ldr r0, [%1, #20] \n\t" \ +- "ldr r1, [%1, #24] \n\t" \ +- "ldr r2, [%1, #28] \n\t" \ +- "ldr r3, [%1, #32] \n\t" \ +- "ldr r4, [%1, #36] \n\t" \ +- "push {r0, r1, r2, r3, r4} \n\t" \ +- "ldr r0, [%1, #4] \n\t" \ +- "ldr r1, [%1, #8] \n\t" \ +- "ldr r2, [%1, #12] \n\t" \ +- "ldr r3, [%1, #16] \n\t" \ +- "ldr r4, [%1] \n\t" /* target->r4 */ \ +- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ ++ "sub sp, sp, #0x30 \n\t" \ ++ "ldr x0, [%1, #8] \n\t" \ ++ "ldr x1, [%1, #16] \n\t" \ ++ "ldr x2, [%1, #24] \n\t" \ ++ "ldr x3, [%1, #32] \n\t" \ ++ "ldr x4, [%1, #40] \n\t" \ ++ "ldr x5, [%1, #48] \n\t" \ ++ "ldr x6, [%1, #56] \n\t" \ ++ "ldr x7, [%1, #64] \n\t" \ ++ "ldr x8, [%1, #72] \n\t" \ ++ "str x8, [sp, #0] \n\t" \ ++ "ldr x8, [%1, #80] \n\t" \ ++ "str x8, [sp, #8] \n\t" \ ++ "ldr x8, [%1, #88] \n\t" \ ++ "str x8, [sp, #16] \n\t" \ ++ "ldr x8, [%1, #96] \n\t" \ ++ "str x8, [sp, #24] \n\t" \ ++ "ldr x8, [%1] \n\t" /* target->x8 */ \ ++ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ + VALGRIND_RESTORE_STACK \ +- "mov %0, r0" \ ++ "mov %0, x0" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#endif /* PLAT_arm_linux */ ++#endif /* PLAT_arm64_linux */ + + /* ------------------------- s390x-linux ------------------------- */ + +@@ -3659,7 +4905,85 @@ typedef + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "lgr %0, 2\n\t" \ +- "aghi 15,176\n\t" \ ++ "aghi 15,176\n\t" \ ++ VALGRIND_CFI_EPILOGUE \ ++ : /*out*/ "=d" (_res) \ ++ : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ ++ arg6, arg7 ,arg8) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[9]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)arg1; \ ++ _argvec[2] = (unsigned long)arg2; \ ++ _argvec[3] = (unsigned long)arg3; \ ++ _argvec[4] = (unsigned long)arg4; \ ++ _argvec[5] = (unsigned long)arg5; \ ++ _argvec[6] = (unsigned long)arg6; \ ++ _argvec[7] = (unsigned long)arg7; \ ++ _argvec[8] = (unsigned long)arg8; \ ++ __asm__ volatile( \ ++ VALGRIND_CFI_PROLOGUE \ ++ "aghi 15,-184\n\t" \ ++ "lg 2, 8(1)\n\t" \ ++ "lg 3,16(1)\n\t" \ ++ "lg 4,24(1)\n\t" \ ++ "lg 5,32(1)\n\t" \ ++ "lg 6,40(1)\n\t" \ ++ "mvc 160(8,15), 48(1)\n\t" \ ++ "mvc 168(8,15), 56(1)\n\t" \ ++ "mvc 176(8,15), 64(1)\n\t" \ ++ "lg 1, 0(1)\n\t" \ ++ VALGRIND_CALL_NOREDIR_R1 \ ++ "lgr %0, 2\n\t" \ ++ "aghi 15,184\n\t" \ ++ VALGRIND_CFI_EPILOGUE \ ++ : /*out*/ "=d" (_res) \ ++ : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ ++ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ ++ arg6, arg7 ,arg8, arg9) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[10]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)arg1; \ ++ _argvec[2] = (unsigned long)arg2; \ ++ _argvec[3] = (unsigned long)arg3; \ ++ _argvec[4] = (unsigned long)arg4; \ ++ _argvec[5] = (unsigned long)arg5; \ ++ _argvec[6] = (unsigned long)arg6; \ ++ _argvec[7] = (unsigned long)arg7; \ ++ _argvec[8] = (unsigned long)arg8; \ ++ _argvec[9] = (unsigned long)arg9; \ ++ __asm__ volatile( \ ++ VALGRIND_CFI_PROLOGUE \ ++ "aghi 15,-192\n\t" \ ++ "lg 2, 8(1)\n\t" \ ++ "lg 3,16(1)\n\t" \ ++ "lg 4,24(1)\n\t" \ ++ "lg 5,32(1)\n\t" \ ++ "lg 6,40(1)\n\t" \ ++ "mvc 160(8,15), 48(1)\n\t" \ ++ "mvc 168(8,15), 56(1)\n\t" \ ++ "mvc 176(8,15), 64(1)\n\t" \ ++ "mvc 184(8,15), 72(1)\n\t" \ ++ "lg 1, 0(1)\n\t" \ ++ VALGRIND_CALL_NOREDIR_R1 \ ++ "lgr %0, 2\n\t" \ ++ "aghi 15,192\n\t" \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +@@ -3668,11 +4992,11 @@ typedef + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ +- arg6, arg7 ,arg8) \ ++#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ ++ arg6, arg7 ,arg8, arg9, arg10) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[9]; \ ++ volatile unsigned long _argvec[11]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ +@@ -3683,9 +5007,11 @@ typedef + _argvec[6] = (unsigned long)arg6; \ + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ ++ _argvec[9] = (unsigned long)arg9; \ ++ _argvec[10] = (unsigned long)arg10; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ +- "aghi 15,-184\n\t" \ ++ "aghi 15,-200\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ +@@ -3694,10 +5020,12 @@ typedef + "mvc 160(8,15), 48(1)\n\t" \ + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ ++ "mvc 184(8,15), 72(1)\n\t" \ ++ "mvc 192(8,15), 80(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "lgr %0, 2\n\t" \ +- "aghi 15,184\n\t" \ ++ "aghi 15,200\n\t" \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +@@ -3706,11 +5034,11 @@ typedef + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ +- arg6, arg7 ,arg8, arg9) \ ++#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ ++ arg6, arg7 ,arg8, arg9, arg10, arg11) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[10]; \ ++ volatile unsigned long _argvec[12]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ +@@ -3722,9 +5050,11 @@ typedef + _argvec[7] = (unsigned long)arg7; \ + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ ++ _argvec[10] = (unsigned long)arg10; \ ++ _argvec[11] = (unsigned long)arg11; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ +- "aghi 15,-192\n\t" \ ++ "aghi 15,-208\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ +@@ -3734,10 +5064,12 @@ typedef + "mvc 168(8,15), 56(1)\n\t" \ + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ ++ "mvc 192(8,15), 80(1)\n\t" \ ++ "mvc 200(8,15), 88(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "lgr %0, 2\n\t" \ +- "aghi 15,192\n\t" \ ++ "aghi 15,208\n\t" \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +@@ -3746,11 +5078,11 @@ typedef + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ +- arg6, arg7 ,arg8, arg9, arg10) \ ++#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ ++ arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[11]; \ ++ volatile unsigned long _argvec[13]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)arg1; \ +@@ -3763,9 +5095,11 @@ typedef + _argvec[8] = (unsigned long)arg8; \ + _argvec[9] = (unsigned long)arg9; \ + _argvec[10] = (unsigned long)arg10; \ ++ _argvec[11] = (unsigned long)arg11; \ ++ _argvec[12] = (unsigned long)arg12; \ + __asm__ volatile( \ + VALGRIND_CFI_PROLOGUE \ +- "aghi 15,-200\n\t" \ ++ "aghi 15,-216\n\t" \ + "lg 2, 8(1)\n\t" \ + "lg 3,16(1)\n\t" \ + "lg 4,24(1)\n\t" \ +@@ -3776,10 +5110,12 @@ typedef + "mvc 176(8,15), 64(1)\n\t" \ + "mvc 184(8,15), 72(1)\n\t" \ + "mvc 192(8,15), 80(1)\n\t" \ ++ "mvc 200(8,15), 88(1)\n\t" \ ++ "mvc 208(8,15), 96(1)\n\t" \ + "lg 1, 0(1)\n\t" \ + VALGRIND_CALL_NOREDIR_R1 \ + "lgr %0, 2\n\t" \ +- "aghi 15,200\n\t" \ ++ "aghi 15,216\n\t" \ + VALGRIND_CFI_EPILOGUE \ + : /*out*/ "=d" (_res) \ + : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +@@ -3788,102 +5124,551 @@ typedef + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ +- arg6, arg7 ,arg8, arg9, arg10, arg11) \ +- do { \ +- volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[12]; \ +- volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)arg1; \ +- _argvec[2] = (unsigned long)arg2; \ +- _argvec[3] = (unsigned long)arg3; \ +- _argvec[4] = (unsigned long)arg4; \ +- _argvec[5] = (unsigned long)arg5; \ +- _argvec[6] = (unsigned long)arg6; \ +- _argvec[7] = (unsigned long)arg7; \ +- _argvec[8] = (unsigned long)arg8; \ +- _argvec[9] = (unsigned long)arg9; \ +- _argvec[10] = (unsigned long)arg10; \ +- _argvec[11] = (unsigned long)arg11; \ +- __asm__ volatile( \ +- VALGRIND_CFI_PROLOGUE \ +- "aghi 15,-208\n\t" \ +- "lg 2, 8(1)\n\t" \ +- "lg 3,16(1)\n\t" \ +- "lg 4,24(1)\n\t" \ +- "lg 5,32(1)\n\t" \ +- "lg 6,40(1)\n\t" \ +- "mvc 160(8,15), 48(1)\n\t" \ +- "mvc 168(8,15), 56(1)\n\t" \ +- "mvc 176(8,15), 64(1)\n\t" \ +- "mvc 184(8,15), 72(1)\n\t" \ +- "mvc 192(8,15), 80(1)\n\t" \ +- "mvc 200(8,15), 88(1)\n\t" \ +- "lg 1, 0(1)\n\t" \ +- VALGRIND_CALL_NOREDIR_R1 \ +- "lgr %0, 2\n\t" \ +- "aghi 15,208\n\t" \ +- VALGRIND_CFI_EPILOGUE \ +- : /*out*/ "=d" (_res) \ +- : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ +- ); \ +- lval = (__typeof__(lval)) _res; \ ++ ++#endif /* PLAT_s390x_linux */ ++ ++/* ------------------------- mips32-linux ----------------------- */ ++ ++#if defined(PLAT_mips32_linux) ++ ++/* These regs are trashed by the hidden call. */ ++#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ ++"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++"$25", "$31" ++ ++/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned ++ long) == 4. */ ++ ++#define CALL_FN_W_v(lval, orig) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[1]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "subu $29, $29, 16 \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 16\n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_W(lval, orig, arg1) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[2]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "subu $29, $29, 16 \n\t" \ ++ "lw $4, 4(%1) \n\t" /* arg1*/ \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 16 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[3]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "subu $29, $29, 16 \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 16 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[4]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "subu $29, $29, 16 \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 16 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[5]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "subu $29, $29, 16 \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 16 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[6]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 24\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 24 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[7]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 32\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "nop\n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 32 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[8]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 32\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 32 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[9]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 40\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 32(%1) \n\t" \ ++ "sw $4, 28($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 40 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[10]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 40\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 32(%1) \n\t" \ ++ "sw $4, 28($29) \n\t" \ ++ "lw $4, 36(%1) \n\t" \ ++ "sw $4, 32($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 40 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) ++ ++#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ ++ arg7,arg8,arg9,arg10) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[11]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 48\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 32(%1) \n\t" \ ++ "sw $4, 28($29) \n\t" \ ++ "lw $4, 36(%1) \n\t" \ ++ "sw $4, 32($29) \n\t" \ ++ "lw $4, 40(%1) \n\t" \ ++ "sw $4, 36($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 48 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ + } while (0) + +-#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ +- arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\ +- do { \ +- volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[13]; \ +- volatile unsigned long _res; \ +- _argvec[0] = (unsigned long)_orig.nraddr; \ +- _argvec[1] = (unsigned long)arg1; \ +- _argvec[2] = (unsigned long)arg2; \ +- _argvec[3] = (unsigned long)arg3; \ +- _argvec[4] = (unsigned long)arg4; \ +- _argvec[5] = (unsigned long)arg5; \ +- _argvec[6] = (unsigned long)arg6; \ +- _argvec[7] = (unsigned long)arg7; \ +- _argvec[8] = (unsigned long)arg8; \ +- _argvec[9] = (unsigned long)arg9; \ +- _argvec[10] = (unsigned long)arg10; \ +- _argvec[11] = (unsigned long)arg11; \ +- _argvec[12] = (unsigned long)arg12; \ +- __asm__ volatile( \ +- VALGRIND_CFI_PROLOGUE \ +- "aghi 15,-216\n\t" \ +- "lg 2, 8(1)\n\t" \ +- "lg 3,16(1)\n\t" \ +- "lg 4,24(1)\n\t" \ +- "lg 5,32(1)\n\t" \ +- "lg 6,40(1)\n\t" \ +- "mvc 160(8,15), 48(1)\n\t" \ +- "mvc 168(8,15), 56(1)\n\t" \ +- "mvc 176(8,15), 64(1)\n\t" \ +- "mvc 184(8,15), 72(1)\n\t" \ +- "mvc 192(8,15), 80(1)\n\t" \ +- "mvc 200(8,15), 88(1)\n\t" \ +- "mvc 208(8,15), 96(1)\n\t" \ +- "lg 1, 0(1)\n\t" \ +- VALGRIND_CALL_NOREDIR_R1 \ +- "lgr %0, 2\n\t" \ +- "aghi 15,216\n\t" \ +- VALGRIND_CFI_EPILOGUE \ +- : /*out*/ "=d" (_res) \ +- : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ +- ); \ +- lval = (__typeof__(lval)) _res; \ ++#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ ++ arg6,arg7,arg8,arg9,arg10, \ ++ arg11) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[12]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ _argvec[11] = (unsigned long)(arg11); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 48\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 32(%1) \n\t" \ ++ "sw $4, 28($29) \n\t" \ ++ "lw $4, 36(%1) \n\t" \ ++ "sw $4, 32($29) \n\t" \ ++ "lw $4, 40(%1) \n\t" \ ++ "sw $4, 36($29) \n\t" \ ++ "lw $4, 44(%1) \n\t" \ ++ "sw $4, 40($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 48 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "0" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ + } while (0) + ++#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ ++ arg6,arg7,arg8,arg9,arg10, \ ++ arg11,arg12) \ ++ do { \ ++ volatile OrigFn _orig = (orig); \ ++ volatile unsigned long _argvec[13]; \ ++ volatile unsigned long _res; \ ++ _argvec[0] = (unsigned long)_orig.nraddr; \ ++ _argvec[1] = (unsigned long)(arg1); \ ++ _argvec[2] = (unsigned long)(arg2); \ ++ _argvec[3] = (unsigned long)(arg3); \ ++ _argvec[4] = (unsigned long)(arg4); \ ++ _argvec[5] = (unsigned long)(arg5); \ ++ _argvec[6] = (unsigned long)(arg6); \ ++ _argvec[7] = (unsigned long)(arg7); \ ++ _argvec[8] = (unsigned long)(arg8); \ ++ _argvec[9] = (unsigned long)(arg9); \ ++ _argvec[10] = (unsigned long)(arg10); \ ++ _argvec[11] = (unsigned long)(arg11); \ ++ _argvec[12] = (unsigned long)(arg12); \ ++ __asm__ volatile( \ ++ "subu $29, $29, 8 \n\t" \ ++ "sw $28, 0($29) \n\t" \ ++ "sw $31, 4($29) \n\t" \ ++ "lw $4, 20(%1) \n\t" \ ++ "subu $29, $29, 56\n\t" \ ++ "sw $4, 16($29) \n\t" \ ++ "lw $4, 24(%1) \n\t" \ ++ "sw $4, 20($29) \n\t" \ ++ "lw $4, 28(%1) \n\t" \ ++ "sw $4, 24($29) \n\t" \ ++ "lw $4, 32(%1) \n\t" \ ++ "sw $4, 28($29) \n\t" \ ++ "lw $4, 36(%1) \n\t" \ ++ "sw $4, 32($29) \n\t" \ ++ "lw $4, 40(%1) \n\t" \ ++ "sw $4, 36($29) \n\t" \ ++ "lw $4, 44(%1) \n\t" \ ++ "sw $4, 40($29) \n\t" \ ++ "lw $4, 48(%1) \n\t" \ ++ "sw $4, 44($29) \n\t" \ ++ "lw $4, 4(%1) \n\t" \ ++ "lw $5, 8(%1) \n\t" \ ++ "lw $6, 12(%1) \n\t" \ ++ "lw $7, 16(%1) \n\t" \ ++ "lw $25, 0(%1) \n\t" /* target->t9 */ \ ++ VALGRIND_CALL_NOREDIR_T9 \ ++ "addu $29, $29, 56 \n\t" \ ++ "lw $28, 0($29) \n\t" \ ++ "lw $31, 4($29) \n\t" \ ++ "addu $29, $29, 8 \n\t" \ ++ "move %0, $2\n" \ ++ : /*out*/ "=r" (_res) \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ ++ ); \ ++ lval = (__typeof__(lval)) _res; \ ++ } while (0) + +-#endif /* PLAT_s390x_linux */ ++#endif /* PLAT_mips32_linux */ + +-/* ------------------------- mips-linux ------------------------- */ +- +-#if defined(PLAT_mips32_linux) ++/* ------------------------- mips64-linux ------------------------- */ ++ ++#if defined(PLAT_mips64_linux) + + /* These regs are trashed by the hidden call. */ + #define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ +@@ -3900,20 +5685,12 @@ typedef + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "subu $29, $29, 16 \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 16\n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $29, $29, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ + : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3921,26 +5698,18 @@ typedef + #define CALL_FN_W_W(lval, orig, arg1) \ + do { \ + volatile OrigFn _orig = (orig); \ +- volatile unsigned long _argvec[2]; \ ++ volatile unsigned long _argvec[2]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "subu $29, $29, 16 \n\t" \ +- "lw $a0, 4(%1) \n\t" /* arg1*/ \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" /* arg1*/ \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 16 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $29, $29, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3954,22 +5723,14 @@ typedef + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "subu $29, $29, 16 \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 16 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $29, $29, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -3984,23 +5745,15 @@ typedef + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "subu $29, $29, 16 \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 16 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $29, $29, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4016,24 +5769,16 @@ typedef + _argvec[3] = (unsigned long)(arg3); \ + _argvec[4] = (unsigned long)(arg4); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "subu $29, $29, 16 \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 16 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $29, $29, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4050,29 +5795,21 @@ typedef + _argvec[4] = (unsigned long)(arg4); \ + _argvec[5] = (unsigned long)(arg5); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 24\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $29, $29, 24 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) ++ + #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ + do { \ + volatile OrigFn _orig = (orig); \ +@@ -4086,29 +5823,18 @@ typedef + _argvec[5] = (unsigned long)(arg5); \ + _argvec[6] = (unsigned long)(arg6); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 32\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "nop\n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 32 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4128,30 +5854,19 @@ typedef + _argvec[6] = (unsigned long)(arg6); \ + _argvec[7] = (unsigned long)(arg7); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 32\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 32 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4172,32 +5887,20 @@ typedef + _argvec[7] = (unsigned long)(arg7); \ + _argvec[8] = (unsigned long)(arg8); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 40\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 32(%1) \n\t" \ +- "sw $a0, 28($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $11, 64(%1)\n\t" \ ++ "ld $25, 0(%1) \n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 40 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4219,34 +5922,24 @@ typedef + _argvec[8] = (unsigned long)(arg8); \ + _argvec[9] = (unsigned long)(arg9); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 40\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 32(%1) \n\t" \ +- "sw $a0, 28($sp) \n\t" \ +- "lw $a0, 36(%1) \n\t" \ +- "sw $a0, 32($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "dsubu $29, $29, 8\n\t" \ ++ "ld $4, 72(%1)\n\t" \ ++ "sd $4, 0($29)\n\t" \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $11, 64(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 40 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "daddu $29, $29, 8\n\t" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4269,36 +5962,26 @@ typedef + _argvec[9] = (unsigned long)(arg9); \ + _argvec[10] = (unsigned long)(arg10); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 48\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 32(%1) \n\t" \ +- "sw $a0, 28($sp) \n\t" \ +- "lw $a0, 36(%1) \n\t" \ +- "sw $a0, 32($sp) \n\t" \ +- "lw $a0, 40(%1) \n\t" \ +- "sw $a0, 36($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "dsubu $29, $29, 16\n\t" \ ++ "ld $4, 72(%1)\n\t" \ ++ "sd $4, 0($29)\n\t" \ ++ "ld $4, 80(%1)\n\t" \ ++ "sd $4, 8($29)\n\t" \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $11, 64(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 48 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "daddu $29, $29, 16\n\t" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4323,38 +6006,28 @@ typedef + _argvec[10] = (unsigned long)(arg10); \ + _argvec[11] = (unsigned long)(arg11); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 48\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 32(%1) \n\t" \ +- "sw $a0, 28($sp) \n\t" \ +- "lw $a0, 36(%1) \n\t" \ +- "sw $a0, 32($sp) \n\t" \ +- "lw $a0, 40(%1) \n\t" \ +- "sw $a0, 36($sp) \n\t" \ +- "lw $a0, 44(%1) \n\t" \ +- "sw $a0, 40($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "dsubu $29, $29, 24\n\t" \ ++ "ld $4, 72(%1)\n\t" \ ++ "sd $4, 0($29)\n\t" \ ++ "ld $4, 80(%1)\n\t" \ ++ "sd $4, 8($29)\n\t" \ ++ "ld $4, 88(%1)\n\t" \ ++ "sd $4, 16($29)\n\t" \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $11, 64(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 48 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "daddu $29, $29, 24\n\t" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) +@@ -4380,45 +6053,35 @@ typedef + _argvec[11] = (unsigned long)(arg11); \ + _argvec[12] = (unsigned long)(arg12); \ + __asm__ volatile( \ +- "subu $29, $29, 8 \n\t" \ +- "sw $gp, 0($sp) \n\t" \ +- "sw $ra, 4($sp) \n\t" \ +- "lw $a0, 20(%1) \n\t" \ +- "subu $sp, $sp, 56\n\t" \ +- "sw $a0, 16($sp) \n\t" \ +- "lw $a0, 24(%1) \n\t" \ +- "sw $a0, 20($sp) \n\t" \ +- "lw $a0, 28(%1) \n\t" \ +- "sw $a0, 24($sp) \n\t" \ +- "lw $a0, 32(%1) \n\t" \ +- "sw $a0, 28($sp) \n\t" \ +- "lw $a0, 36(%1) \n\t" \ +- "sw $a0, 32($sp) \n\t" \ +- "lw $a0, 40(%1) \n\t" \ +- "sw $a0, 36($sp) \n\t" \ +- "lw $a0, 44(%1) \n\t" \ +- "sw $a0, 40($sp) \n\t" \ +- "lw $a0, 48(%1) \n\t" \ +- "sw $a0, 44($sp) \n\t" \ +- "lw $a0, 4(%1) \n\t" \ +- "lw $a1, 8(%1) \n\t" \ +- "lw $a2, 12(%1) \n\t" \ +- "lw $a3, 16(%1) \n\t" \ +- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ ++ "dsubu $29, $29, 32\n\t" \ ++ "ld $4, 72(%1)\n\t" \ ++ "sd $4, 0($29)\n\t" \ ++ "ld $4, 80(%1)\n\t" \ ++ "sd $4, 8($29)\n\t" \ ++ "ld $4, 88(%1)\n\t" \ ++ "sd $4, 16($29)\n\t" \ ++ "ld $4, 96(%1)\n\t" \ ++ "sd $4, 24($29)\n\t" \ ++ "ld $4, 8(%1)\n\t" \ ++ "ld $5, 16(%1)\n\t" \ ++ "ld $6, 24(%1)\n\t" \ ++ "ld $7, 32(%1)\n\t" \ ++ "ld $8, 40(%1)\n\t" \ ++ "ld $9, 48(%1)\n\t" \ ++ "ld $10, 56(%1)\n\t" \ ++ "ld $11, 64(%1)\n\t" \ ++ "ld $25, 0(%1)\n\t" /* target->t9 */ \ + VALGRIND_CALL_NOREDIR_T9 \ +- "addu $sp, $sp, 56 \n\t" \ +- "lw $gp, 0($sp) \n\t" \ +- "lw $ra, 4($sp) \n\t" \ +- "addu $sp, $sp, 8 \n\t" \ +- "move %0, $v0\n" \ ++ "daddu $29, $29, 32\n\t" \ ++ "move %0, $2\n" \ + : /*out*/ "=r" (_res) \ +- : /*in*/ "0" (&_argvec[0]) \ +- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ++ : /*in*/ "r" (&_argvec[0]) \ ++ : /*trash*/ "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + +-#endif /* PLAT_mips32_linux */ ++#endif /* PLAT_mips64_linux */ + + + /* ------------------------------------------------------------------ */ +@@ -4464,8 +6127,8 @@ typedef + errors. */ + VG_USERREQ__COUNT_ERRORS = 0x1201, + +- /* Allows a string (gdb monitor command) to be passed to the tool +- Used for interaction with vgdb/gdb */ ++ /* Allows the client program and/or gdbserver to execute a monitor ++ command. */ + VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202, + + /* These are useful and can be interpreted by any tool that +@@ -4562,14 +6225,14 @@ VALGRIND_PRINTF(const char *format, ...) + #if defined(NVALGRIND) + return 0; + #else /* NVALGRIND */ +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) || defined(__MINGW64__) + uintptr_t _qzz_res; + #else + unsigned long _qzz_res; + #endif + va_list vargs; + va_start(vargs, format); +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) || defined(__MINGW64__) + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_VALIST_BY_REF, + (uintptr_t)format, +@@ -4600,14 +6263,14 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) + #if defined(NVALGRIND) + return 0; + #else /* NVALGRIND */ +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) || defined(__MINGW64__) + uintptr_t _qzz_res; + #else + unsigned long _qzz_res; + #endif + va_list vargs; + va_start(vargs, format); +-#if defined(_MSC_VER) ++#if defined(_MSC_VER) || defined(__MINGW64__) + _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, + VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, + (uintptr_t)format, +@@ -4844,7 +6507,9 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) + VG_USERREQ__MEMPOOL_EXISTS, \ + pool, 0, 0, 0, 0) + +-/* Mark a piece of memory as being a stack. Returns a stack id. */ ++/* Mark a piece of memory as being a stack. Returns a stack id. ++ start is the lowest addressable stack byte, end is the highest ++ addressable stack byte. */ + #define VALGRIND_STACK_REGISTER(start, end) \ + (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ + VG_USERREQ__STACK_REGISTER, \ +@@ -4856,7 +6521,9 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, \ + id, 0, 0, 0, 0) + +-/* Change the start and end address of the stack id. */ ++/* Change the start and end address of the stack id. ++ start is the new lowest addressable stack byte, end is the new highest ++ addressable stack byte. */ + #define VALGRIND_STACK_CHANGE(id, start, end) \ + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, \ + id, start, end, 0, 0) +@@ -4893,15 +6560,28 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) + VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \ + -1, 0, 0, 0, 0) + ++/* Execute a monitor command from the client program. ++ If a connection is opened with GDB, the output will be sent ++ according to the output mode set for vgdb. ++ If no connection is opened, output will go to the log output. ++ Returns 1 if command not recognised, 0 otherwise. */ ++#define VALGRIND_MONITOR_COMMAND(command) \ ++ VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, \ ++ command, 0, 0, 0, 0) ++ ++ + #undef PLAT_x86_darwin + #undef PLAT_amd64_darwin + #undef PLAT_x86_win32 ++#undef PLAT_amd64_win64 + #undef PLAT_x86_linux + #undef PLAT_amd64_linux + #undef PLAT_ppc32_linux +-#undef PLAT_ppc64_linux ++#undef PLAT_ppc64be_linux ++#undef PLAT_ppc64le_linux + #undef PLAT_arm_linux + #undef PLAT_s390x_linux + #undef PLAT_mips32_linux ++#undef PLAT_mips64_linux + + #endif /* __VALGRIND_H */ diff --git a/wine-mono.spec b/wine-mono.spec index d3c30d9..164fc72 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 4.5.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -10,6 +10,8 @@ Group: Development/Libraries URL: http://wiki.winehq.org/Mono Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch +# https://github.com/mono/mono/commit/1445d4821c8091c395264542344dca9df22a2c82 +Patch1: wine-mono-valgrind.patch # see git://github.com/madewokherd/wine-mono @@ -49,6 +51,7 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.msifilename +%patch1 -dmono -p1 -b.valgrind %build # make sure this builds on x86-64 @@ -90,6 +93,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Feb 05 2015 Michael Cronenworth - 4.5.4-2 +- Update bundled valgrind headers (#1141584) + * Fri Nov 14 2014 Andreas Bierfert - 4.5.4-1 - version upgrade From 664616a020daa8ed50ca2a75c67de892b32018f0 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 6 Mar 2015 11:03:00 -0600 Subject: [PATCH 16/90] Update to 4.5.6 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 324ebfb..af1de1c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.5.4.tar.gz +/wine-mono-4.5.6.tar.gz diff --git a/sources b/sources index b0bc3fe..bdcbe7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -66941777fe98c6e72351a081ab4d2c09 wine-mono-4.5.4.tar.gz +f8f1e78bf3e454a9f4c88d7470642736 wine-mono-4.5.6.tar.gz diff --git a/wine-mono.spec b/wine-mono.spec index 164fc72..2e66093 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,8 +1,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.5.4 -Release: 2%{?dist} +Version: 4.5.6 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -93,6 +93,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Mar 06 2015 Michael Cronenworth - 4.5.6-1 +- version upgrade + * Thu Feb 05 2015 Michael Cronenworth - 4.5.4-2 - Update bundled valgrind headers (#1141584) From a6fdebd3024e78183bac2c8d9b88efd5082a5c38 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 6 Mar 2015 11:47:58 -0600 Subject: [PATCH 17/90] Remove BR for wine-wow --- wine-mono.spec | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wine-mono.spec b/wine-mono.spec index 2e66093..7f9dc3a 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -38,7 +38,7 @@ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gettext BuildRequires: zip -BuildRequires: wine-core wine-wow +BuildRequires: wine-core BuildRequires: wine-devel BuildRequires: mono-core BuildRequires: bc @@ -54,12 +54,7 @@ Windows Mono library required for Wine. %patch1 -dmono -p1 -b.valgrind %build -# make sure this builds on x86-64 -if [ -x %{_bindir}/wine ] ; then - MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh -else - MAKEOPTS=%{_smp_mflags} WINE=%{_bindir}/wine64 MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh -fi +MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh %install mkdir -p %{buildroot}%{_datadir}/wine/mono From 09a96f371c392f78aead77127ed4f9aa07727a6c Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 8 Mar 2015 00:12:11 -0600 Subject: [PATCH 18/90] Add patch for CLI compile issue with gcc5 --- wine-mono-build-cflags.patch | 10 ++++++++++ wine-mono.spec | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 wine-mono-build-cflags.patch diff --git a/wine-mono-build-cflags.patch b/wine-mono-build-cflags.patch new file mode 100644 index 0000000..da519ce --- /dev/null +++ b/wine-mono-build-cflags.patch @@ -0,0 +1,10 @@ +--- 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 +@@ -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 -fstack-protector-strong --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 diff --git a/wine-mono.spec b/wine-mono.spec index 7f9dc3a..e2fd124 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ Name: wine-mono Version: 4.5.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -12,6 +12,7 @@ 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 # see git://github.com/madewokherd/wine-mono @@ -52,6 +53,7 @@ Windows Mono library required for Wine. %setup -q %patch0 -p1 -b.msifilename %patch1 -dmono -p1 -b.valgrind +%patch2 -p1 -b.cflags %build MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh @@ -88,6 +90,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Mar 08 2015 Michael Cronenworth - 4.5.6-2 +- disable optimizations in CLI, workaround for gcc5 + * Fri Mar 06 2015 Michael Cronenworth - 4.5.6-1 - version upgrade From a0341fc7b297adfea92ee674f74b195b0fed437c Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 8 Mar 2015 01:23:26 -0600 Subject: [PATCH 19/90] Add more GCC5 CFLAG and source fixes. --- wine-mono-build-cflags.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wine-mono-build-cflags.patch b/wine-mono-build-cflags.patch index da519ce..70f4a60 100644 --- a/wine-mono-build-cflags.patch +++ b/wine-mono-build-cflags.patch @@ -1,5 +1,15 @@ --- 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 -fstack-protector-strong --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" @@ -8,3 +18,15 @@ ../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; From a413670546bb2fcc27ef4a3a48bfcb7a7309e053 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 8 Mar 2015 03:17:04 -0500 Subject: [PATCH 20/90] Disable stack-protector for now GCC 4.9 doesn't pull in libssp by default --- wine-mono-build-cflags.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wine-mono-build-cflags.patch b/wine-mono-build-cflags.patch index 70f4a60..b07940c 100644 --- a/wine-mono-build-cflags.patch +++ b/wine-mono-build-cflags.patch @@ -5,7 +5,7 @@ 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 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic" \ ++ 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 @@ -14,7 +14,7 @@ cd "$CURDIR/build-cross-cli" if test 1 != $REBUILD || test ! -e Makefile; then -+ CFLAGS="-O0 -g -pipe -Wall -Werror=format-security -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic" \ ++ 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 From 4244dc9ec472ec2653761b7836577139df24efd6 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Wed, 22 Apr 2015 12:23:53 -0500 Subject: [PATCH 21/90] 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 From eb3fb493f91f8d3b308134647fe8f2a19c9aa5ed Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Thu, 23 Apr 2015 15:38:47 -0500 Subject: [PATCH 22/90] enable optimizations, tls patch --- wine-mono-build-cflags.patch | 32 -------------------------------- wine-mono-build-inline.patch | 12 ++++++++++++ wine-mono-build-static.patch | 10 +++++----- wine-mono-tls.patch | 22 ++++++++++++++++++++++ wine-mono.spec | 18 +++++++++++++----- 5 files changed, 52 insertions(+), 42 deletions(-) delete mode 100644 wine-mono-build-cflags.patch create mode 100644 wine-mono-build-inline.patch create mode 100644 wine-mono-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 - 4.5.6-4 +- enable optimizations, tls patch + * Mon Apr 20 2015 Michael Cronenworth - 4.5.6-3 - statically link DLLs (#1213427) From ab3be7919ea33b6cf8776faef38ac20f32250a5b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 02:27:11 +0000 Subject: [PATCH 23/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index cd02a80..c47f1f6 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.5.6 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -100,6 +100,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 4.5.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Apr 23 2015 Michael Cronenworth - 4.5.6-4 - enable optimizations, tls patch From 3f7c942e2324261e5edf8a11c2cab713fd631fd4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:03:24 +0000 Subject: [PATCH 24/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index c47f1f6..a583a62 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.5.6 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -100,6 +100,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 4.5.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Fedora Release Engineering - 4.5.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 80ef1fca019bcd0508b3b88a086ee4d76ef4776e Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Tue, 8 Mar 2016 19:02:11 -0600 Subject: [PATCH 25/90] Update to 4.6.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-tls.patch | 22 - wine-mono-valgrind.patch | 3505 -------------------------------------- wine-mono.spec | 25 +- 5 files changed, 13 insertions(+), 3543 deletions(-) delete mode 100644 wine-mono-tls.patch delete mode 100644 wine-mono-valgrind.patch diff --git a/.gitignore b/.gitignore index af1de1c..1865a99 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.5.6.tar.gz +/wine-mono-4.6.0.tar.gz diff --git a/sources b/sources index bdcbe7f..c4158e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f8f1e78bf3e454a9f4c88d7470642736 wine-mono-4.5.6.tar.gz +dc63164de4e7c06fbb5a619a105477fc wine-mono-4.6.0.tar.gz diff --git a/wine-mono-tls.patch b/wine-mono-tls.patch deleted file mode 100644 index 893afec..0000000 --- a/wine-mono-tls.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- 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-valgrind.patch b/wine-mono-valgrind.patch deleted file mode 100644 index 4c4ac90..0000000 --- a/wine-mono-valgrind.patch +++ /dev/null @@ -1,3505 +0,0 @@ -From 1445d4821c8091c395264542344dca9df22a2c82 Mon Sep 17 00:00:00 2001 -From: Zoltan Varga -Date: Thu, 5 Feb 2015 20:53:21 -0500 -Subject: [PATCH] [runtime] Update valgrind headers to the ones from valgrind - 3.10.1. Fixes #26688. - ---- - mono/utils/memcheck.h | 17 +- - mono/utils/valgrind.h | 2864 +++++++++++++++++++++++++++++++++++++++---------- - 2 files changed, 2288 insertions(+), 593 deletions(-) - -diff --git a/mono/utils/memcheck.h b/mono/utils/memcheck.h -index fcc7644..2740578 100644 ---- a/mono/utils/memcheck.h -+++ b/mono/utils/memcheck.h -@@ -13,7 +13,7 @@ - This file is part of MemCheck, a heavyweight Valgrind tool for - detecting memory errors. - -- Copyright (C) 2000-2012 Julian Seward. All rights reserved. -+ Copyright (C) 2000-2013 Julian Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions -@@ -96,6 +96,9 @@ typedef - /* Not next to VG_USERREQ__COUNT_LEAKS because it was added later. */ - VG_USERREQ__COUNT_LEAK_BLOCKS, - -+ VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, -+ VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, -+ - /* This is just for memcheck's internal use - don't use it */ - _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR - = VG_USERREQ_TOOL_BASE('M','C') + 256 -@@ -283,5 +286,17 @@ typedef - (const char*)(zzvbits), \ - (zznbytes), 0, 0 ) - -+/* Disable and re-enable reporting of addressing errors in the -+ specified address range. */ -+#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \ -+ VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ -+ VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, \ -+ (_qzz_addr), (_qzz_len), 0, 0, 0) -+ -+#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \ -+ VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */, \ -+ VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, \ -+ (_qzz_addr), (_qzz_len), 0, 0, 0) -+ - #endif - -diff --git a/mono/utils/valgrind.h b/mono/utils/valgrind.h -index 315da5b..6954d75 100644 ---- a/mono/utils/valgrind.h -+++ b/mono/utils/valgrind.h -@@ -12,7 +12,7 @@ - This file is part of Valgrind, a dynamic binary instrumentation - framework. - -- Copyright (C) 2000-2012 Julian Seward. All rights reserved. -+ Copyright (C) 2000-2013 Julian Seward. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions -@@ -89,7 +89,7 @@ - || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6)) - */ - #define __VALGRIND_MAJOR__ 3 --#define __VALGRIND_MINOR__ 8 -+#define __VALGRIND_MINOR__ 10 - - - #include -@@ -111,35 +111,51 @@ - #undef PLAT_x86_darwin - #undef PLAT_amd64_darwin - #undef PLAT_x86_win32 -+#undef PLAT_amd64_win64 - #undef PLAT_x86_linux - #undef PLAT_amd64_linux - #undef PLAT_ppc32_linux --#undef PLAT_ppc64_linux -+#undef PLAT_ppc64be_linux -+#undef PLAT_ppc64le_linux - #undef PLAT_arm_linux -+#undef PLAT_arm64_linux - #undef PLAT_s390x_linux - #undef PLAT_mips32_linux -+#undef PLAT_mips64_linux - - - #if defined(__APPLE__) && defined(__i386__) - # define PLAT_x86_darwin 1 - #elif defined(__APPLE__) && defined(__x86_64__) - # define PLAT_amd64_darwin 1 --#elif defined(__MINGW32__) || defined(__CYGWIN32__) \ -+#elif (defined(__MINGW32__) && !defined(__MINGW64__)) \ -+ || defined(__CYGWIN32__) \ - || (defined(_WIN32) && defined(_M_IX86)) - # define PLAT_x86_win32 1 -+#elif defined(__MINGW64__) \ -+ || (defined(_WIN64) && defined(_M_X64)) -+# define PLAT_amd64_win64 1 - #elif defined(__linux__) && defined(__i386__) - # define PLAT_x86_linux 1 - #elif defined(__linux__) && defined(__x86_64__) - # define PLAT_amd64_linux 1 - #elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__) - # define PLAT_ppc32_linux 1 --#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) --# define PLAT_ppc64_linux 1 --#elif defined(__linux__) && defined(__arm__) -+#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF != 2 -+/* Big Endian uses ELF version 1 */ -+# define PLAT_ppc64be_linux 1 -+#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF == 2 -+/* Little Endian uses ELF version 2 */ -+# define PLAT_ppc64le_linux 1 -+#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__) - # define PLAT_arm_linux 1 -+#elif defined(__linux__) && defined(__aarch64__) && !defined(__arm__) -+# define PLAT_arm64_linux 1 - #elif defined(__linux__) && defined(__s390__) && defined(__s390x__) - # define PLAT_s390x_linux 1 --#elif defined(__linux__) && defined(__mips__) -+#elif defined(__linux__) && defined(__mips__) && (__mips==64) -+# define PLAT_mips64_linux 1 -+#elif defined(__linux__) && defined(__mips__) && (__mips!=64) - # define PLAT_mips32_linux 1 - #else - /* If we're not compiling for our target platform, don't generate -@@ -368,7 +384,8 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, - - /* ------------------------ amd64-{linux,darwin} --------------- */ - --#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) -+#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ -+ || (defined(PLAT_amd64_win64) && defined(__GNUC__)) - - typedef - struct { -@@ -430,6 +447,14 @@ typedef - - #endif /* PLAT_amd64_linux || PLAT_amd64_darwin */ - -+/* ------------------------- amd64-Win64 ------------------------- */ -+ -+#if defined(PLAT_amd64_win64) && !defined(__GNUC__) -+ -+#error Unsupported compiler. -+ -+#endif /* PLAT_amd64_win64 */ -+ - /* ------------------------ ppc32-linux ------------------------ */ - - #if defined(PLAT_ppc32_linux) -@@ -441,8 +466,8 @@ typedef - OrigFn; - - #define __SPECIAL_INSTRUCTION_PREAMBLE \ -- "rlwinm 0,0,3,0,0 ; rlwinm 0,0,13,0,0\n\t" \ -- "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t" -+ "rlwinm 0,0,3,0,31 ; rlwinm 0,0,13,0,31\n\t" \ -+ "rlwinm 0,0,29,0,31 ; rlwinm 0,0,19,0,31\n\t" - - #define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ - _zzq_default, _zzq_request, \ -@@ -501,7 +526,7 @@ typedef - - /* ------------------------ ppc64-linux ------------------------ */ - --#if defined(PLAT_ppc64_linux) -+#if defined(PLAT_ppc64be_linux) - - typedef - struct { -@@ -576,7 +601,84 @@ typedef - ); \ - } while (0) - --#endif /* PLAT_ppc64_linux */ -+#endif /* PLAT_ppc64be_linux */ -+ -+#if defined(PLAT_ppc64le_linux) -+ -+typedef -+ struct { -+ unsigned long long int nraddr; /* where's the code? */ -+ unsigned long long int r2; /* what tocptr do we need? */ -+ } -+ OrigFn; -+ -+#define __SPECIAL_INSTRUCTION_PREAMBLE \ -+ "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \ -+ "rotldi 0,0,61 ; rotldi 0,0,51\n\t" -+ -+#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ -+ _zzq_default, _zzq_request, \ -+ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ -+ \ -+ __extension__ \ -+ ({ unsigned long long int _zzq_args[6]; \ -+ unsigned long long int _zzq_result; \ -+ unsigned long long int* _zzq_ptr; \ -+ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ -+ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ -+ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ -+ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ -+ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ -+ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ -+ _zzq_ptr = _zzq_args; \ -+ __asm__ volatile("mr 3,%1\n\t" /*default*/ \ -+ "mr 4,%2\n\t" /*ptr*/ \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* %R3 = client_request ( %R4 ) */ \ -+ "or 1,1,1\n\t" \ -+ "mr %0,3" /*result*/ \ -+ : "=b" (_zzq_result) \ -+ : "b" (_zzq_default), "b" (_zzq_ptr) \ -+ : "cc", "memory", "r3", "r4"); \ -+ _zzq_result; \ -+ }) -+ -+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ -+ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ -+ unsigned long long int __addr; \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* %R3 = guest_NRADDR */ \ -+ "or 2,2,2\n\t" \ -+ "mr %0,3" \ -+ : "=b" (__addr) \ -+ : \ -+ : "cc", "memory", "r3" \ -+ ); \ -+ _zzq_orig->nraddr = __addr; \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* %R3 = guest_NRADDR_GPR2 */ \ -+ "or 4,4,4\n\t" \ -+ "mr %0,3" \ -+ : "=b" (__addr) \ -+ : \ -+ : "cc", "memory", "r3" \ -+ ); \ -+ _zzq_orig->r2 = __addr; \ -+ } -+ -+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* branch-and-link-to-noredir *%R12 */ \ -+ "or 3,3,3\n\t" -+ -+#define VALGRIND_VEX_INJECT_IR() \ -+ do { \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ "or 5,5,5\n\t" \ -+ ); \ -+ } while (0) -+ -+#endif /* PLAT_ppc64le_linux */ - - /* ------------------------- arm-linux ------------------------- */ - -@@ -646,6 +748,74 @@ typedef - - #endif /* PLAT_arm_linux */ - -+/* ------------------------ arm64-linux ------------------------- */ -+ -+#if defined(PLAT_arm64_linux) -+ -+typedef -+ struct { -+ unsigned long long int nraddr; /* where's the code? */ -+ } -+ OrigFn; -+ -+#define __SPECIAL_INSTRUCTION_PREAMBLE \ -+ "ror x12, x12, #3 ; ror x12, x12, #13 \n\t" \ -+ "ror x12, x12, #51 ; ror x12, x12, #61 \n\t" -+ -+#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ -+ _zzq_default, _zzq_request, \ -+ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ -+ \ -+ __extension__ \ -+ ({volatile unsigned long long int _zzq_args[6]; \ -+ volatile unsigned long long int _zzq_result; \ -+ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ -+ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ -+ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ -+ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ -+ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ -+ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ -+ __asm__ volatile("mov x3, %1\n\t" /*default*/ \ -+ "mov x4, %2\n\t" /*ptr*/ \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* X3 = client_request ( X4 ) */ \ -+ "orr x10, x10, x10\n\t" \ -+ "mov %0, x3" /*result*/ \ -+ : "=r" (_zzq_result) \ -+ : "r" (_zzq_default), "r" (&_zzq_args[0]) \ -+ : "cc","memory", "x3", "x4"); \ -+ _zzq_result; \ -+ }) -+ -+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ -+ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ -+ unsigned long long int __addr; \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* X3 = guest_NRADDR */ \ -+ "orr x11, x11, x11\n\t" \ -+ "mov %0, x3" \ -+ : "=r" (__addr) \ -+ : \ -+ : "cc", "memory", "x3" \ -+ ); \ -+ _zzq_orig->nraddr = __addr; \ -+ } -+ -+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* branch-and-link-to-noredir X8 */ \ -+ "orr x12, x12, x12\n\t" -+ -+#define VALGRIND_VEX_INJECT_IR() \ -+ do { \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ "orr x9, x9, x9\n\t" \ -+ : : : "cc", "memory" \ -+ ); \ -+ } while (0) -+ -+#endif /* PLAT_arm64_linux */ -+ - /* ------------------------ s390x-linux ------------------------ */ - - #if defined(PLAT_s390x_linux) -@@ -763,7 +933,7 @@ typedef - "move %0, $11\n\t" /*result*/ \ - : "=r" (_zzq_result) \ - : "r" (_zzq_default), "r" (&_zzq_args[0]) \ -- : "cc","memory", "t3", "t4"); \ -+ : "$11", "$12"); \ - _zzq_result; \ - }) - -@@ -776,7 +946,7 @@ typedef - "move %0, $11" /*result*/ \ - : "=r" (__addr) \ - : \ -- : "cc", "memory" , "t3" \ -+ : "$11" \ - ); \ - _zzq_orig->nraddr = __addr; \ - } -@@ -796,6 +966,75 @@ typedef - - #endif /* PLAT_mips32_linux */ - -+/* ------------------------- mips64-linux ---------------- */ -+ -+#if defined(PLAT_mips64_linux) -+ -+typedef -+ struct { -+ unsigned long long nraddr; /* where's the code? */ -+ } -+ OrigFn; -+ -+/* dsll $0,$0, 3 -+ * dsll $0,$0, 13 -+ * dsll $0,$0, 29 -+ * dsll $0,$0, 19*/ -+#define __SPECIAL_INSTRUCTION_PREAMBLE \ -+ "dsll $0,$0, 3 ; dsll $0,$0,13\n\t" \ -+ "dsll $0,$0,29 ; dsll $0,$0,19\n\t" -+ -+#define VALGRIND_DO_CLIENT_REQUEST_EXPR( \ -+ _zzq_default, _zzq_request, \ -+ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ -+ __extension__ \ -+ ({ volatile unsigned long long int _zzq_args[6]; \ -+ volatile unsigned long long int _zzq_result; \ -+ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ -+ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ -+ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ -+ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ -+ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ -+ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ -+ __asm__ volatile("move $11, %1\n\t" /*default*/ \ -+ "move $12, %2\n\t" /*ptr*/ \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* $11 = client_request ( $12 ) */ \ -+ "or $13, $13, $13\n\t" \ -+ "move %0, $11\n\t" /*result*/ \ -+ : "=r" (_zzq_result) \ -+ : "r" (_zzq_default), "r" (&_zzq_args[0]) \ -+ : "$11", "$12"); \ -+ _zzq_result; \ -+ }) -+ -+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ -+ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ -+ volatile unsigned long long int __addr; \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* $11 = guest_NRADDR */ \ -+ "or $14, $14, $14\n\t" \ -+ "move %0, $11" /*result*/ \ -+ : "=r" (__addr) \ -+ : \ -+ : "$11"); \ -+ _zzq_orig->nraddr = __addr; \ -+ } -+ -+#define VALGRIND_CALL_NOREDIR_T9 \ -+ __SPECIAL_INSTRUCTION_PREAMBLE \ -+ /* call-noredir $25 */ \ -+ "or $15, $15, $15\n\t" -+ -+#define VALGRIND_VEX_INJECT_IR() \ -+ do { \ -+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ -+ "or $11, $11, $11\n\t" \ -+ ); \ -+ } while (0) -+ -+#endif /* PLAT_mips64_linux */ -+ - /* Insert assembly code for other platforms here... */ - - #endif /* NVALGRIND */ -@@ -2379,7 +2618,7 @@ typedef - - /* ------------------------ ppc64-linux ------------------------ */ - --#if defined(PLAT_ppc64_linux) -+#if defined(PLAT_ppc64be_linux) - - /* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ - -@@ -2932,54 +3171,56 @@ typedef - lval = (__typeof__(lval)) _res; \ - } while (0) - --#endif /* PLAT_ppc64_linux */ -+#endif /* PLAT_ppc64be_linux */ - --/* ------------------------- arm-linux ------------------------- */ -+/* ------------------------- ppc64le-linux ----------------------- */ -+#if defined(PLAT_ppc64le_linux) - --#if defined(PLAT_arm_linux) -+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ - - /* These regs are trashed by the hidden call. */ --#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4","r14" -+#define __CALLER_SAVED_REGS \ -+ "lr", "ctr", "xer", \ -+ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ -+ "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ -+ "r11", "r12", "r13" - - /* Macros to save and align the stack before making a function - call and restore it afterwards as gcc may not keep the stack - pointer aligned if it doesn't realise calls are being made - to other functions. */ - --/* This is a bit tricky. We store the original stack pointer in r10 -- as it is callee-saves. gcc doesn't allow the use of r11 for some -- reason. Also, we can't directly "bic" the stack pointer in thumb -- mode since r13 isn't an allowed register number in that context. -- So use r4 as a temporary, since that is about to get trashed -- anyway, just after each use of this macro. Side effect is we need -- to be very careful about any future changes, since -- VALGRIND_ALIGN_STACK simply assumes r4 is usable. */ - #define VALGRIND_ALIGN_STACK \ -- "mov r10, sp\n\t" \ -- "mov r4, sp\n\t" \ -- "bic r4, r4, #7\n\t" \ -- "mov sp, r4\n\t" -+ "mr 28,1\n\t" \ -+ "rldicr 1,1,0,59\n\t" - #define VALGRIND_RESTORE_STACK \ -- "mov sp, r10\n\t" -+ "mr 1,28\n\t" - --/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned -- long) == 4. */ -+/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned -+ long) == 8. */ - - #define CALL_FN_W_v(lval, orig) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[1]; \ -+ volatile unsigned long _argvec[3+0]; \ - volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -2987,20 +3228,27 @@ typedef - #define CALL_FN_W_W(lval, orig, arg1) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[2]; \ -+ volatile unsigned long _argvec[3+1]; \ - volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)(arg1); \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3008,22 +3256,29 @@ typedef - #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[3]; \ -+ volatile unsigned long _argvec[3+2]; \ - volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)(arg1); \ -- _argvec[2] = (unsigned long)(arg2); \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3031,24 +3286,31 @@ typedef - #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[4]; \ -+ volatile unsigned long _argvec[3+3]; \ - volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)(arg1); \ -- _argvec[2] = (unsigned long)(arg2); \ -- _argvec[3] = (unsigned long)(arg3); \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3056,15 +3318,647 @@ typedef - #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[5]; \ -+ volatile unsigned long _argvec[3+4]; \ - volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)(arg1); \ -- _argvec[2] = (unsigned long)(arg2); \ -- _argvec[3] = (unsigned long)(arg3); \ -- _argvec[4] = (unsigned long)(arg4); \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+5]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+6]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+7]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+8]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ _argvec[2+8] = (unsigned long)arg8; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+9]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ _argvec[2+8] = (unsigned long)arg8; \ -+ _argvec[2+9] = (unsigned long)arg9; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "addi 1,1,-128\n\t" /* expand stack frame */ \ -+ /* arg9 */ \ -+ "ld 3,72(12)\n\t" \ -+ "std 3,96(1)\n\t" \ -+ /* args1-8 */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+10]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ _argvec[2+8] = (unsigned long)arg8; \ -+ _argvec[2+9] = (unsigned long)arg9; \ -+ _argvec[2+10] = (unsigned long)arg10; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "addi 1,1,-128\n\t" /* expand stack frame */ \ -+ /* arg10 */ \ -+ "ld 3,80(12)\n\t" \ -+ "std 3,104(1)\n\t" \ -+ /* arg9 */ \ -+ "ld 3,72(12)\n\t" \ -+ "std 3,96(1)\n\t" \ -+ /* args1-8 */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10,arg11) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+11]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ _argvec[2+8] = (unsigned long)arg8; \ -+ _argvec[2+9] = (unsigned long)arg9; \ -+ _argvec[2+10] = (unsigned long)arg10; \ -+ _argvec[2+11] = (unsigned long)arg11; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "addi 1,1,-144\n\t" /* expand stack frame */ \ -+ /* arg11 */ \ -+ "ld 3,88(12)\n\t" \ -+ "std 3,112(1)\n\t" \ -+ /* arg10 */ \ -+ "ld 3,80(12)\n\t" \ -+ "std 3,104(1)\n\t" \ -+ /* arg9 */ \ -+ "ld 3,72(12)\n\t" \ -+ "std 3,96(1)\n\t" \ -+ /* args1-8 */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10,arg11,arg12) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3+12]; \ -+ volatile unsigned long _res; \ -+ /* _argvec[0] holds current r2 across the call */ \ -+ _argvec[1] = (unsigned long)_orig.r2; \ -+ _argvec[2] = (unsigned long)_orig.nraddr; \ -+ _argvec[2+1] = (unsigned long)arg1; \ -+ _argvec[2+2] = (unsigned long)arg2; \ -+ _argvec[2+3] = (unsigned long)arg3; \ -+ _argvec[2+4] = (unsigned long)arg4; \ -+ _argvec[2+5] = (unsigned long)arg5; \ -+ _argvec[2+6] = (unsigned long)arg6; \ -+ _argvec[2+7] = (unsigned long)arg7; \ -+ _argvec[2+8] = (unsigned long)arg8; \ -+ _argvec[2+9] = (unsigned long)arg9; \ -+ _argvec[2+10] = (unsigned long)arg10; \ -+ _argvec[2+11] = (unsigned long)arg11; \ -+ _argvec[2+12] = (unsigned long)arg12; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "mr 12,%1\n\t" \ -+ "std 2,-16(12)\n\t" /* save tocptr */ \ -+ "ld 2,-8(12)\n\t" /* use nraddr's tocptr */ \ -+ "addi 1,1,-144\n\t" /* expand stack frame */ \ -+ /* arg12 */ \ -+ "ld 3,96(12)\n\t" \ -+ "std 3,120(1)\n\t" \ -+ /* arg11 */ \ -+ "ld 3,88(12)\n\t" \ -+ "std 3,112(1)\n\t" \ -+ /* arg10 */ \ -+ "ld 3,80(12)\n\t" \ -+ "std 3,104(1)\n\t" \ -+ /* arg9 */ \ -+ "ld 3,72(12)\n\t" \ -+ "std 3,96(1)\n\t" \ -+ /* args1-8 */ \ -+ "ld 3, 8(12)\n\t" /* arg1->r3 */ \ -+ "ld 4, 16(12)\n\t" /* arg2->r4 */ \ -+ "ld 5, 24(12)\n\t" /* arg3->r5 */ \ -+ "ld 6, 32(12)\n\t" /* arg4->r6 */ \ -+ "ld 7, 40(12)\n\t" /* arg5->r7 */ \ -+ "ld 8, 48(12)\n\t" /* arg6->r8 */ \ -+ "ld 9, 56(12)\n\t" /* arg7->r9 */ \ -+ "ld 10, 64(12)\n\t" /* arg8->r10 */ \ -+ "ld 12, 0(12)\n\t" /* target->r12 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12 \ -+ "mr 12,%1\n\t" \ -+ "mr %0,3\n\t" \ -+ "ld 2,-16(12)\n\t" /* restore tocptr */ \ -+ VALGRIND_RESTORE_STACK \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[2]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#endif /* PLAT_ppc64le_linux */ -+ -+/* ------------------------- arm-linux ------------------------- */ -+ -+#if defined(PLAT_arm_linux) -+ -+/* These regs are trashed by the hidden call. */ -+#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4","r14" -+ -+/* Macros to save and align the stack before making a function -+ call and restore it afterwards as gcc may not keep the stack -+ pointer aligned if it doesn't realise calls are being made -+ to other functions. */ -+ -+/* This is a bit tricky. We store the original stack pointer in r10 -+ as it is callee-saves. gcc doesn't allow the use of r11 for some -+ reason. Also, we can't directly "bic" the stack pointer in thumb -+ mode since r13 isn't an allowed register number in that context. -+ So use r4 as a temporary, since that is about to get trashed -+ anyway, just after each use of this macro. Side effect is we need -+ to be very careful about any future changes, since -+ VALGRIND_ALIGN_STACK simply assumes r4 is usable. */ -+#define VALGRIND_ALIGN_STACK \ -+ "mov r10, sp\n\t" \ -+ "mov r4, sp\n\t" \ -+ "bic r4, r4, #7\n\t" \ -+ "mov sp, r4\n\t" -+#define VALGRIND_RESTORE_STACK \ -+ "mov sp, r10\n\t" -+ -+/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned -+ long) == 4. */ -+ -+#define CALL_FN_W_v(lval, orig) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[1]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_W(lval, orig, arg1) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[2]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[4]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[5]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[6]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "sub sp, sp, #4 \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "push {r0} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[7]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "push {r0, r1} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[8]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "sub sp, sp, #4 \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "push {r0, r1, r2} \n\t" \ - "ldr r0, [%1, #4] \n\t" \ - "ldr r1, [%1, #8] \n\t" \ - "ldr r2, [%1, #12] \n\t" \ -@@ -3072,10 +3966,364 @@ typedef - "ldr r4, [%1] \n\t" /* target->r4 */ \ - VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[9]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "ldr r3, [%1, #32] \n\t" \ -+ "push {r0, r1, r2, r3} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[10]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "sub sp, sp, #4 \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "ldr r3, [%1, #32] \n\t" \ -+ "ldr r4, [%1, #36] \n\t" \ -+ "push {r0, r1, r2, r3, r4} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[11]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #40] \n\t" \ -+ "push {r0} \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "ldr r3, [%1, #32] \n\t" \ -+ "ldr r4, [%1, #36] \n\t" \ -+ "push {r0, r1, r2, r3, r4} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -+ arg6,arg7,arg8,arg9,arg10, \ -+ arg11) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[12]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ _argvec[11] = (unsigned long)(arg11); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "sub sp, sp, #4 \n\t" \ -+ "ldr r0, [%1, #40] \n\t" \ -+ "ldr r1, [%1, #44] \n\t" \ -+ "push {r0, r1} \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "ldr r3, [%1, #32] \n\t" \ -+ "ldr r4, [%1, #36] \n\t" \ -+ "push {r0, r1, r2, r3, r4} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -+ arg6,arg7,arg8,arg9,arg10, \ -+ arg11,arg12) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[13]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ _argvec[11] = (unsigned long)(arg11); \ -+ _argvec[12] = (unsigned long)(arg12); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr r0, [%1, #40] \n\t" \ -+ "ldr r1, [%1, #44] \n\t" \ -+ "ldr r2, [%1, #48] \n\t" \ -+ "push {r0, r1, r2} \n\t" \ -+ "ldr r0, [%1, #20] \n\t" \ -+ "ldr r1, [%1, #24] \n\t" \ -+ "ldr r2, [%1, #28] \n\t" \ -+ "ldr r3, [%1, #32] \n\t" \ -+ "ldr r4, [%1, #36] \n\t" \ -+ "push {r0, r1, r2, r3, r4} \n\t" \ -+ "ldr r0, [%1, #4] \n\t" \ -+ "ldr r1, [%1, #8] \n\t" \ -+ "ldr r2, [%1, #12] \n\t" \ -+ "ldr r3, [%1, #16] \n\t" \ -+ "ldr r4, [%1] \n\t" /* target->r4 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, r0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#endif /* PLAT_arm_linux */ -+ -+/* ------------------------ arm64-linux ------------------------ */ -+ -+#if defined(PLAT_arm64_linux) -+ -+/* These regs are trashed by the hidden call. */ -+#define __CALLER_SAVED_REGS \ -+ "x0", "x1", "x2", "x3","x4", "x5", "x6", "x7", "x8", "x9", \ -+ "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", \ -+ "x18", "x19", "x20", "x30", \ -+ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", \ -+ "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", \ -+ "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", \ -+ "v26", "v27", "v28", "v29", "v30", "v31" -+ -+/* x21 is callee-saved, so we can use it to save and restore SP around -+ the hidden call. */ -+#define VALGRIND_ALIGN_STACK \ -+ "mov x21, sp\n\t" \ -+ "bic sp, x21, #15\n\t" -+#define VALGRIND_RESTORE_STACK \ -+ "mov sp, x21\n\t" -+ -+/* These CALL_FN_ macros assume that on arm64-linux, -+ sizeof(unsigned long) == 8. */ -+ -+#define CALL_FN_W_v(lval, orig) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[1]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, x0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_W(lval, orig, arg1) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[2]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, x0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, x0\n" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[4]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, x0\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[5]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ __asm__ volatile( \ -+ VALGRIND_ALIGN_STACK \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ -+ VALGRIND_RESTORE_STACK \ -+ "mov %0, x0" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3093,20 +4341,18 @@ typedef - _argvec[5] = (unsigned long)(arg5); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "sub sp, sp, #4 \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "push {r0} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3125,20 +4371,19 @@ typedef - _argvec[6] = (unsigned long)(arg6); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "push {r0, r1} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3159,22 +4404,20 @@ typedef - _argvec[7] = (unsigned long)(arg7); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "sub sp, sp, #4 \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "push {r0, r1, r2} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3196,22 +4439,21 @@ typedef - _argvec[8] = (unsigned long)(arg8); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "ldr r3, [%1, #32] \n\t" \ -- "push {r0, r1, r2, r3} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x7, [%1, #64] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3234,24 +4476,24 @@ typedef - _argvec[9] = (unsigned long)(arg9); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "sub sp, sp, #4 \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "ldr r3, [%1, #32] \n\t" \ -- "ldr r4, [%1, #36] \n\t" \ -- "push {r0, r1, r2, r3, r4} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "sub sp, sp, #0x20 \n\t" \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x7, [%1, #64] \n\t" \ -+ "ldr x8, [%1, #72] \n\t" \ -+ "str x8, [sp, #0] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3275,32 +4517,32 @@ typedef - _argvec[10] = (unsigned long)(arg10); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #40] \n\t" \ -- "push {r0} \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "ldr r3, [%1, #32] \n\t" \ -- "ldr r4, [%1, #36] \n\t" \ -- "push {r0, r1, r2, r3, r4} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "sub sp, sp, #0x20 \n\t" \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x7, [%1, #64] \n\t" \ -+ "ldr x8, [%1, #72] \n\t" \ -+ "str x8, [sp, #0] \n\t" \ -+ "ldr x8, [%1, #80] \n\t" \ -+ "str x8, [sp, #8] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -- arg6,arg7,arg8,arg9,arg10, \ -- arg11) \ -+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10,arg11) \ - do { \ - volatile OrigFn _orig = (orig); \ - volatile unsigned long _argvec[12]; \ -@@ -3319,34 +4561,35 @@ typedef - _argvec[11] = (unsigned long)(arg11); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "sub sp, sp, #4 \n\t" \ -- "ldr r0, [%1, #40] \n\t" \ -- "ldr r1, [%1, #44] \n\t" \ -- "push {r0, r1} \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "ldr r3, [%1, #32] \n\t" \ -- "ldr r4, [%1, #36] \n\t" \ -- "push {r0, r1, r2, r3, r4} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "sub sp, sp, #0x30 \n\t" \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x7, [%1, #64] \n\t" \ -+ "ldr x8, [%1, #72] \n\t" \ -+ "str x8, [sp, #0] \n\t" \ -+ "ldr x8, [%1, #80] \n\t" \ -+ "str x8, [sp, #8] \n\t" \ -+ "ldr x8, [%1, #88] \n\t" \ -+ "str x8, [sp, #16] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -- arg6,arg7,arg8,arg9,arg10, \ -- arg11,arg12) \ -+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10,arg11, \ -+ arg12) \ - do { \ - volatile OrigFn _orig = (orig); \ - volatile unsigned long _argvec[13]; \ -@@ -3366,32 +4609,35 @@ typedef - _argvec[12] = (unsigned long)(arg12); \ - __asm__ volatile( \ - VALGRIND_ALIGN_STACK \ -- "ldr r0, [%1, #40] \n\t" \ -- "ldr r1, [%1, #44] \n\t" \ -- "ldr r2, [%1, #48] \n\t" \ -- "push {r0, r1, r2} \n\t" \ -- "ldr r0, [%1, #20] \n\t" \ -- "ldr r1, [%1, #24] \n\t" \ -- "ldr r2, [%1, #28] \n\t" \ -- "ldr r3, [%1, #32] \n\t" \ -- "ldr r4, [%1, #36] \n\t" \ -- "push {r0, r1, r2, r3, r4} \n\t" \ -- "ldr r0, [%1, #4] \n\t" \ -- "ldr r1, [%1, #8] \n\t" \ -- "ldr r2, [%1, #12] \n\t" \ -- "ldr r3, [%1, #16] \n\t" \ -- "ldr r4, [%1] \n\t" /* target->r4 */ \ -- VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4 \ -+ "sub sp, sp, #0x30 \n\t" \ -+ "ldr x0, [%1, #8] \n\t" \ -+ "ldr x1, [%1, #16] \n\t" \ -+ "ldr x2, [%1, #24] \n\t" \ -+ "ldr x3, [%1, #32] \n\t" \ -+ "ldr x4, [%1, #40] \n\t" \ -+ "ldr x5, [%1, #48] \n\t" \ -+ "ldr x6, [%1, #56] \n\t" \ -+ "ldr x7, [%1, #64] \n\t" \ -+ "ldr x8, [%1, #72] \n\t" \ -+ "str x8, [sp, #0] \n\t" \ -+ "ldr x8, [%1, #80] \n\t" \ -+ "str x8, [sp, #8] \n\t" \ -+ "ldr x8, [%1, #88] \n\t" \ -+ "str x8, [sp, #16] \n\t" \ -+ "ldr x8, [%1, #96] \n\t" \ -+ "str x8, [sp, #24] \n\t" \ -+ "ldr x8, [%1] \n\t" /* target->x8 */ \ -+ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8 \ - VALGRIND_RESTORE_STACK \ -- "mov %0, r0" \ -+ "mov %0, x0" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10" \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21" \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) - --#endif /* PLAT_arm_linux */ -+#endif /* PLAT_arm64_linux */ - - /* ------------------------- s390x-linux ------------------------- */ - -@@ -3659,7 +4905,85 @@ typedef - "lg 1, 0(1)\n\t" \ - VALGRIND_CALL_NOREDIR_R1 \ - "lgr %0, 2\n\t" \ -- "aghi 15,176\n\t" \ -+ "aghi 15,176\n\t" \ -+ VALGRIND_CFI_EPILOGUE \ -+ : /*out*/ "=d" (_res) \ -+ : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -+ arg6, arg7 ,arg8) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[9]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)arg1; \ -+ _argvec[2] = (unsigned long)arg2; \ -+ _argvec[3] = (unsigned long)arg3; \ -+ _argvec[4] = (unsigned long)arg4; \ -+ _argvec[5] = (unsigned long)arg5; \ -+ _argvec[6] = (unsigned long)arg6; \ -+ _argvec[7] = (unsigned long)arg7; \ -+ _argvec[8] = (unsigned long)arg8; \ -+ __asm__ volatile( \ -+ VALGRIND_CFI_PROLOGUE \ -+ "aghi 15,-184\n\t" \ -+ "lg 2, 8(1)\n\t" \ -+ "lg 3,16(1)\n\t" \ -+ "lg 4,24(1)\n\t" \ -+ "lg 5,32(1)\n\t" \ -+ "lg 6,40(1)\n\t" \ -+ "mvc 160(8,15), 48(1)\n\t" \ -+ "mvc 168(8,15), 56(1)\n\t" \ -+ "mvc 176(8,15), 64(1)\n\t" \ -+ "lg 1, 0(1)\n\t" \ -+ VALGRIND_CALL_NOREDIR_R1 \ -+ "lgr %0, 2\n\t" \ -+ "aghi 15,184\n\t" \ -+ VALGRIND_CFI_EPILOGUE \ -+ : /*out*/ "=d" (_res) \ -+ : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -+ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -+ arg6, arg7 ,arg8, arg9) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[10]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)arg1; \ -+ _argvec[2] = (unsigned long)arg2; \ -+ _argvec[3] = (unsigned long)arg3; \ -+ _argvec[4] = (unsigned long)arg4; \ -+ _argvec[5] = (unsigned long)arg5; \ -+ _argvec[6] = (unsigned long)arg6; \ -+ _argvec[7] = (unsigned long)arg7; \ -+ _argvec[8] = (unsigned long)arg8; \ -+ _argvec[9] = (unsigned long)arg9; \ -+ __asm__ volatile( \ -+ VALGRIND_CFI_PROLOGUE \ -+ "aghi 15,-192\n\t" \ -+ "lg 2, 8(1)\n\t" \ -+ "lg 3,16(1)\n\t" \ -+ "lg 4,24(1)\n\t" \ -+ "lg 5,32(1)\n\t" \ -+ "lg 6,40(1)\n\t" \ -+ "mvc 160(8,15), 48(1)\n\t" \ -+ "mvc 168(8,15), 56(1)\n\t" \ -+ "mvc 176(8,15), 64(1)\n\t" \ -+ "mvc 184(8,15), 72(1)\n\t" \ -+ "lg 1, 0(1)\n\t" \ -+ VALGRIND_CALL_NOREDIR_R1 \ -+ "lgr %0, 2\n\t" \ -+ "aghi 15,192\n\t" \ - VALGRIND_CFI_EPILOGUE \ - : /*out*/ "=d" (_res) \ - : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -@@ -3668,11 +4992,11 @@ typedef - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -- arg6, arg7 ,arg8) \ -+#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -+ arg6, arg7 ,arg8, arg9, arg10) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[9]; \ -+ volatile unsigned long _argvec[11]; \ - volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_orig.nraddr; \ - _argvec[1] = (unsigned long)arg1; \ -@@ -3683,9 +5007,11 @@ typedef - _argvec[6] = (unsigned long)arg6; \ - _argvec[7] = (unsigned long)arg7; \ - _argvec[8] = (unsigned long)arg8; \ -+ _argvec[9] = (unsigned long)arg9; \ -+ _argvec[10] = (unsigned long)arg10; \ - __asm__ volatile( \ - VALGRIND_CFI_PROLOGUE \ -- "aghi 15,-184\n\t" \ -+ "aghi 15,-200\n\t" \ - "lg 2, 8(1)\n\t" \ - "lg 3,16(1)\n\t" \ - "lg 4,24(1)\n\t" \ -@@ -3694,10 +5020,12 @@ typedef - "mvc 160(8,15), 48(1)\n\t" \ - "mvc 168(8,15), 56(1)\n\t" \ - "mvc 176(8,15), 64(1)\n\t" \ -+ "mvc 184(8,15), 72(1)\n\t" \ -+ "mvc 192(8,15), 80(1)\n\t" \ - "lg 1, 0(1)\n\t" \ - VALGRIND_CALL_NOREDIR_R1 \ - "lgr %0, 2\n\t" \ -- "aghi 15,184\n\t" \ -+ "aghi 15,200\n\t" \ - VALGRIND_CFI_EPILOGUE \ - : /*out*/ "=d" (_res) \ - : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -@@ -3706,11 +5034,11 @@ typedef - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -- arg6, arg7 ,arg8, arg9) \ -+#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -+ arg6, arg7 ,arg8, arg9, arg10, arg11) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[10]; \ -+ volatile unsigned long _argvec[12]; \ - volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_orig.nraddr; \ - _argvec[1] = (unsigned long)arg1; \ -@@ -3722,9 +5050,11 @@ typedef - _argvec[7] = (unsigned long)arg7; \ - _argvec[8] = (unsigned long)arg8; \ - _argvec[9] = (unsigned long)arg9; \ -+ _argvec[10] = (unsigned long)arg10; \ -+ _argvec[11] = (unsigned long)arg11; \ - __asm__ volatile( \ - VALGRIND_CFI_PROLOGUE \ -- "aghi 15,-192\n\t" \ -+ "aghi 15,-208\n\t" \ - "lg 2, 8(1)\n\t" \ - "lg 3,16(1)\n\t" \ - "lg 4,24(1)\n\t" \ -@@ -3734,10 +5064,12 @@ typedef - "mvc 168(8,15), 56(1)\n\t" \ - "mvc 176(8,15), 64(1)\n\t" \ - "mvc 184(8,15), 72(1)\n\t" \ -+ "mvc 192(8,15), 80(1)\n\t" \ -+ "mvc 200(8,15), 88(1)\n\t" \ - "lg 1, 0(1)\n\t" \ - VALGRIND_CALL_NOREDIR_R1 \ - "lgr %0, 2\n\t" \ -- "aghi 15,192\n\t" \ -+ "aghi 15,208\n\t" \ - VALGRIND_CFI_EPILOGUE \ - : /*out*/ "=d" (_res) \ - : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -@@ -3746,11 +5078,11 @@ typedef - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -- arg6, arg7 ,arg8, arg9, arg10) \ -+#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -+ arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[11]; \ -+ volatile unsigned long _argvec[13]; \ - volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_orig.nraddr; \ - _argvec[1] = (unsigned long)arg1; \ -@@ -3763,9 +5095,11 @@ typedef - _argvec[8] = (unsigned long)arg8; \ - _argvec[9] = (unsigned long)arg9; \ - _argvec[10] = (unsigned long)arg10; \ -+ _argvec[11] = (unsigned long)arg11; \ -+ _argvec[12] = (unsigned long)arg12; \ - __asm__ volatile( \ - VALGRIND_CFI_PROLOGUE \ -- "aghi 15,-200\n\t" \ -+ "aghi 15,-216\n\t" \ - "lg 2, 8(1)\n\t" \ - "lg 3,16(1)\n\t" \ - "lg 4,24(1)\n\t" \ -@@ -3776,10 +5110,12 @@ typedef - "mvc 176(8,15), 64(1)\n\t" \ - "mvc 184(8,15), 72(1)\n\t" \ - "mvc 192(8,15), 80(1)\n\t" \ -+ "mvc 200(8,15), 88(1)\n\t" \ -+ "mvc 208(8,15), 96(1)\n\t" \ - "lg 1, 0(1)\n\t" \ - VALGRIND_CALL_NOREDIR_R1 \ - "lgr %0, 2\n\t" \ -- "aghi 15,200\n\t" \ -+ "aghi 15,216\n\t" \ - VALGRIND_CFI_EPILOGUE \ - : /*out*/ "=d" (_res) \ - : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -@@ -3788,102 +5124,551 @@ typedef - lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -- arg6, arg7 ,arg8, arg9, arg10, arg11) \ -- do { \ -- volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[12]; \ -- volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)arg1; \ -- _argvec[2] = (unsigned long)arg2; \ -- _argvec[3] = (unsigned long)arg3; \ -- _argvec[4] = (unsigned long)arg4; \ -- _argvec[5] = (unsigned long)arg5; \ -- _argvec[6] = (unsigned long)arg6; \ -- _argvec[7] = (unsigned long)arg7; \ -- _argvec[8] = (unsigned long)arg8; \ -- _argvec[9] = (unsigned long)arg9; \ -- _argvec[10] = (unsigned long)arg10; \ -- _argvec[11] = (unsigned long)arg11; \ -- __asm__ volatile( \ -- VALGRIND_CFI_PROLOGUE \ -- "aghi 15,-208\n\t" \ -- "lg 2, 8(1)\n\t" \ -- "lg 3,16(1)\n\t" \ -- "lg 4,24(1)\n\t" \ -- "lg 5,32(1)\n\t" \ -- "lg 6,40(1)\n\t" \ -- "mvc 160(8,15), 48(1)\n\t" \ -- "mvc 168(8,15), 56(1)\n\t" \ -- "mvc 176(8,15), 64(1)\n\t" \ -- "mvc 184(8,15), 72(1)\n\t" \ -- "mvc 192(8,15), 80(1)\n\t" \ -- "mvc 200(8,15), 88(1)\n\t" \ -- "lg 1, 0(1)\n\t" \ -- VALGRIND_CALL_NOREDIR_R1 \ -- "lgr %0, 2\n\t" \ -- "aghi 15,208\n\t" \ -- VALGRIND_CFI_EPILOGUE \ -- : /*out*/ "=d" (_res) \ -- : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ -- ); \ -- lval = (__typeof__(lval)) _res; \ -+ -+#endif /* PLAT_s390x_linux */ -+ -+/* ------------------------- mips32-linux ----------------------- */ -+ -+#if defined(PLAT_mips32_linux) -+ -+/* These regs are trashed by the hidden call. */ -+#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ -+"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ -+"$25", "$31" -+ -+/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned -+ long) == 4. */ -+ -+#define CALL_FN_W_v(lval, orig) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[1]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "subu $29, $29, 16 \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 16\n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_W(lval, orig, arg1) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[2]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "subu $29, $29, 16 \n\t" \ -+ "lw $4, 4(%1) \n\t" /* arg1*/ \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 16 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[3]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "subu $29, $29, 16 \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 16 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[4]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "subu $29, $29, 16 \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 16 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[5]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "subu $29, $29, 16 \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 16 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[6]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 24\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 24 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[7]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 32\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "nop\n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 32 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[8]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 32\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 32 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[9]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 40\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 32(%1) \n\t" \ -+ "sw $4, 28($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 40 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[10]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 40\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 32(%1) \n\t" \ -+ "sw $4, 28($29) \n\t" \ -+ "lw $4, 36(%1) \n\t" \ -+ "sw $4, 32($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 40 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) -+ -+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ -+ arg7,arg8,arg9,arg10) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[11]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 48\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 32(%1) \n\t" \ -+ "sw $4, 28($29) \n\t" \ -+ "lw $4, 36(%1) \n\t" \ -+ "sw $4, 32($29) \n\t" \ -+ "lw $4, 40(%1) \n\t" \ -+ "sw $4, 36($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 48 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ - } while (0) - --#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5, \ -- arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\ -- do { \ -- volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[13]; \ -- volatile unsigned long _res; \ -- _argvec[0] = (unsigned long)_orig.nraddr; \ -- _argvec[1] = (unsigned long)arg1; \ -- _argvec[2] = (unsigned long)arg2; \ -- _argvec[3] = (unsigned long)arg3; \ -- _argvec[4] = (unsigned long)arg4; \ -- _argvec[5] = (unsigned long)arg5; \ -- _argvec[6] = (unsigned long)arg6; \ -- _argvec[7] = (unsigned long)arg7; \ -- _argvec[8] = (unsigned long)arg8; \ -- _argvec[9] = (unsigned long)arg9; \ -- _argvec[10] = (unsigned long)arg10; \ -- _argvec[11] = (unsigned long)arg11; \ -- _argvec[12] = (unsigned long)arg12; \ -- __asm__ volatile( \ -- VALGRIND_CFI_PROLOGUE \ -- "aghi 15,-216\n\t" \ -- "lg 2, 8(1)\n\t" \ -- "lg 3,16(1)\n\t" \ -- "lg 4,24(1)\n\t" \ -- "lg 5,32(1)\n\t" \ -- "lg 6,40(1)\n\t" \ -- "mvc 160(8,15), 48(1)\n\t" \ -- "mvc 168(8,15), 56(1)\n\t" \ -- "mvc 176(8,15), 64(1)\n\t" \ -- "mvc 184(8,15), 72(1)\n\t" \ -- "mvc 192(8,15), 80(1)\n\t" \ -- "mvc 200(8,15), 88(1)\n\t" \ -- "mvc 208(8,15), 96(1)\n\t" \ -- "lg 1, 0(1)\n\t" \ -- VALGRIND_CALL_NOREDIR_R1 \ -- "lgr %0, 2\n\t" \ -- "aghi 15,216\n\t" \ -- VALGRIND_CFI_EPILOGUE \ -- : /*out*/ "=d" (_res) \ -- : /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \ -- ); \ -- lval = (__typeof__(lval)) _res; \ -+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -+ arg6,arg7,arg8,arg9,arg10, \ -+ arg11) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[12]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ _argvec[11] = (unsigned long)(arg11); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 48\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 32(%1) \n\t" \ -+ "sw $4, 28($29) \n\t" \ -+ "lw $4, 36(%1) \n\t" \ -+ "sw $4, 32($29) \n\t" \ -+ "lw $4, 40(%1) \n\t" \ -+ "sw $4, 36($29) \n\t" \ -+ "lw $4, 44(%1) \n\t" \ -+ "sw $4, 40($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 48 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "0" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ - } while (0) - -+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ -+ arg6,arg7,arg8,arg9,arg10, \ -+ arg11,arg12) \ -+ do { \ -+ volatile OrigFn _orig = (orig); \ -+ volatile unsigned long _argvec[13]; \ -+ volatile unsigned long _res; \ -+ _argvec[0] = (unsigned long)_orig.nraddr; \ -+ _argvec[1] = (unsigned long)(arg1); \ -+ _argvec[2] = (unsigned long)(arg2); \ -+ _argvec[3] = (unsigned long)(arg3); \ -+ _argvec[4] = (unsigned long)(arg4); \ -+ _argvec[5] = (unsigned long)(arg5); \ -+ _argvec[6] = (unsigned long)(arg6); \ -+ _argvec[7] = (unsigned long)(arg7); \ -+ _argvec[8] = (unsigned long)(arg8); \ -+ _argvec[9] = (unsigned long)(arg9); \ -+ _argvec[10] = (unsigned long)(arg10); \ -+ _argvec[11] = (unsigned long)(arg11); \ -+ _argvec[12] = (unsigned long)(arg12); \ -+ __asm__ volatile( \ -+ "subu $29, $29, 8 \n\t" \ -+ "sw $28, 0($29) \n\t" \ -+ "sw $31, 4($29) \n\t" \ -+ "lw $4, 20(%1) \n\t" \ -+ "subu $29, $29, 56\n\t" \ -+ "sw $4, 16($29) \n\t" \ -+ "lw $4, 24(%1) \n\t" \ -+ "sw $4, 20($29) \n\t" \ -+ "lw $4, 28(%1) \n\t" \ -+ "sw $4, 24($29) \n\t" \ -+ "lw $4, 32(%1) \n\t" \ -+ "sw $4, 28($29) \n\t" \ -+ "lw $4, 36(%1) \n\t" \ -+ "sw $4, 32($29) \n\t" \ -+ "lw $4, 40(%1) \n\t" \ -+ "sw $4, 36($29) \n\t" \ -+ "lw $4, 44(%1) \n\t" \ -+ "sw $4, 40($29) \n\t" \ -+ "lw $4, 48(%1) \n\t" \ -+ "sw $4, 44($29) \n\t" \ -+ "lw $4, 4(%1) \n\t" \ -+ "lw $5, 8(%1) \n\t" \ -+ "lw $6, 12(%1) \n\t" \ -+ "lw $7, 16(%1) \n\t" \ -+ "lw $25, 0(%1) \n\t" /* target->t9 */ \ -+ VALGRIND_CALL_NOREDIR_T9 \ -+ "addu $29, $29, 56 \n\t" \ -+ "lw $28, 0($29) \n\t" \ -+ "lw $31, 4($29) \n\t" \ -+ "addu $29, $29, 8 \n\t" \ -+ "move %0, $2\n" \ -+ : /*out*/ "=r" (_res) \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ -+ ); \ -+ lval = (__typeof__(lval)) _res; \ -+ } while (0) - --#endif /* PLAT_s390x_linux */ -+#endif /* PLAT_mips32_linux */ - --/* ------------------------- mips-linux ------------------------- */ -- --#if defined(PLAT_mips32_linux) -+/* ------------------------- mips64-linux ------------------------- */ -+ -+#if defined(PLAT_mips64_linux) - - /* These regs are trashed by the hidden call. */ - #define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6", \ -@@ -3900,20 +5685,12 @@ typedef - volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_orig.nraddr; \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "subu $29, $29, 16 \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 16\n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $29, $29, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ - : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3921,26 +5698,18 @@ typedef - #define CALL_FN_W_W(lval, orig, arg1) \ - do { \ - volatile OrigFn _orig = (orig); \ -- volatile unsigned long _argvec[2]; \ -+ volatile unsigned long _argvec[2]; \ - volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_orig.nraddr; \ - _argvec[1] = (unsigned long)(arg1); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "subu $29, $29, 16 \n\t" \ -- "lw $a0, 4(%1) \n\t" /* arg1*/ \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" /* arg1*/ \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 16 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $29, $29, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3954,22 +5723,14 @@ typedef - _argvec[1] = (unsigned long)(arg1); \ - _argvec[2] = (unsigned long)(arg2); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "subu $29, $29, 16 \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 16 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $29, $29, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -3984,23 +5745,15 @@ typedef - _argvec[2] = (unsigned long)(arg2); \ - _argvec[3] = (unsigned long)(arg3); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "subu $29, $29, 16 \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 16 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $29, $29, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4016,24 +5769,16 @@ typedef - _argvec[3] = (unsigned long)(arg3); \ - _argvec[4] = (unsigned long)(arg4); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "subu $29, $29, 16 \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 16 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $29, $29, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4050,29 +5795,21 @@ typedef - _argvec[4] = (unsigned long)(arg4); \ - _argvec[5] = (unsigned long)(arg5); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 24\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $29, $29, 24 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -+ - #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ - do { \ - volatile OrigFn _orig = (orig); \ -@@ -4086,29 +5823,18 @@ typedef - _argvec[5] = (unsigned long)(arg5); \ - _argvec[6] = (unsigned long)(arg6); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 32\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "nop\n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 32 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4128,30 +5854,19 @@ typedef - _argvec[6] = (unsigned long)(arg6); \ - _argvec[7] = (unsigned long)(arg7); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 32\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $25, 0(%1) \n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 32 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4172,32 +5887,20 @@ typedef - _argvec[7] = (unsigned long)(arg7); \ - _argvec[8] = (unsigned long)(arg8); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 40\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 32(%1) \n\t" \ -- "sw $a0, 28($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $11, 64(%1)\n\t" \ -+ "ld $25, 0(%1) \n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 40 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4219,34 +5922,24 @@ typedef - _argvec[8] = (unsigned long)(arg8); \ - _argvec[9] = (unsigned long)(arg9); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 40\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 32(%1) \n\t" \ -- "sw $a0, 28($sp) \n\t" \ -- "lw $a0, 36(%1) \n\t" \ -- "sw $a0, 32($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "dsubu $29, $29, 8\n\t" \ -+ "ld $4, 72(%1)\n\t" \ -+ "sd $4, 0($29)\n\t" \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $11, 64(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 40 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "daddu $29, $29, 8\n\t" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4269,36 +5962,26 @@ typedef - _argvec[9] = (unsigned long)(arg9); \ - _argvec[10] = (unsigned long)(arg10); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 48\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 32(%1) \n\t" \ -- "sw $a0, 28($sp) \n\t" \ -- "lw $a0, 36(%1) \n\t" \ -- "sw $a0, 32($sp) \n\t" \ -- "lw $a0, 40(%1) \n\t" \ -- "sw $a0, 36($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "dsubu $29, $29, 16\n\t" \ -+ "ld $4, 72(%1)\n\t" \ -+ "sd $4, 0($29)\n\t" \ -+ "ld $4, 80(%1)\n\t" \ -+ "sd $4, 8($29)\n\t" \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $11, 64(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 48 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "daddu $29, $29, 16\n\t" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4323,38 +6006,28 @@ typedef - _argvec[10] = (unsigned long)(arg10); \ - _argvec[11] = (unsigned long)(arg11); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 48\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 32(%1) \n\t" \ -- "sw $a0, 28($sp) \n\t" \ -- "lw $a0, 36(%1) \n\t" \ -- "sw $a0, 32($sp) \n\t" \ -- "lw $a0, 40(%1) \n\t" \ -- "sw $a0, 36($sp) \n\t" \ -- "lw $a0, 44(%1) \n\t" \ -- "sw $a0, 40($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "dsubu $29, $29, 24\n\t" \ -+ "ld $4, 72(%1)\n\t" \ -+ "sd $4, 0($29)\n\t" \ -+ "ld $4, 80(%1)\n\t" \ -+ "sd $4, 8($29)\n\t" \ -+ "ld $4, 88(%1)\n\t" \ -+ "sd $4, 16($29)\n\t" \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $11, 64(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 48 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "daddu $29, $29, 24\n\t" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) -@@ -4380,45 +6053,35 @@ typedef - _argvec[11] = (unsigned long)(arg11); \ - _argvec[12] = (unsigned long)(arg12); \ - __asm__ volatile( \ -- "subu $29, $29, 8 \n\t" \ -- "sw $gp, 0($sp) \n\t" \ -- "sw $ra, 4($sp) \n\t" \ -- "lw $a0, 20(%1) \n\t" \ -- "subu $sp, $sp, 56\n\t" \ -- "sw $a0, 16($sp) \n\t" \ -- "lw $a0, 24(%1) \n\t" \ -- "sw $a0, 20($sp) \n\t" \ -- "lw $a0, 28(%1) \n\t" \ -- "sw $a0, 24($sp) \n\t" \ -- "lw $a0, 32(%1) \n\t" \ -- "sw $a0, 28($sp) \n\t" \ -- "lw $a0, 36(%1) \n\t" \ -- "sw $a0, 32($sp) \n\t" \ -- "lw $a0, 40(%1) \n\t" \ -- "sw $a0, 36($sp) \n\t" \ -- "lw $a0, 44(%1) \n\t" \ -- "sw $a0, 40($sp) \n\t" \ -- "lw $a0, 48(%1) \n\t" \ -- "sw $a0, 44($sp) \n\t" \ -- "lw $a0, 4(%1) \n\t" \ -- "lw $a1, 8(%1) \n\t" \ -- "lw $a2, 12(%1) \n\t" \ -- "lw $a3, 16(%1) \n\t" \ -- "lw $t9, 0(%1) \n\t" /* target->t9 */ \ -+ "dsubu $29, $29, 32\n\t" \ -+ "ld $4, 72(%1)\n\t" \ -+ "sd $4, 0($29)\n\t" \ -+ "ld $4, 80(%1)\n\t" \ -+ "sd $4, 8($29)\n\t" \ -+ "ld $4, 88(%1)\n\t" \ -+ "sd $4, 16($29)\n\t" \ -+ "ld $4, 96(%1)\n\t" \ -+ "sd $4, 24($29)\n\t" \ -+ "ld $4, 8(%1)\n\t" \ -+ "ld $5, 16(%1)\n\t" \ -+ "ld $6, 24(%1)\n\t" \ -+ "ld $7, 32(%1)\n\t" \ -+ "ld $8, 40(%1)\n\t" \ -+ "ld $9, 48(%1)\n\t" \ -+ "ld $10, 56(%1)\n\t" \ -+ "ld $11, 64(%1)\n\t" \ -+ "ld $25, 0(%1)\n\t" /* target->t9 */ \ - VALGRIND_CALL_NOREDIR_T9 \ -- "addu $sp, $sp, 56 \n\t" \ -- "lw $gp, 0($sp) \n\t" \ -- "lw $ra, 4($sp) \n\t" \ -- "addu $sp, $sp, 8 \n\t" \ -- "move %0, $v0\n" \ -+ "daddu $29, $29, 32\n\t" \ -+ "move %0, $2\n" \ - : /*out*/ "=r" (_res) \ -- : /*in*/ "0" (&_argvec[0]) \ -- : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ -+ : /*in*/ "r" (&_argvec[0]) \ -+ : /*trash*/ "memory", __CALLER_SAVED_REGS \ - ); \ - lval = (__typeof__(lval)) _res; \ - } while (0) - --#endif /* PLAT_mips32_linux */ -+#endif /* PLAT_mips64_linux */ - - - /* ------------------------------------------------------------------ */ -@@ -4464,8 +6127,8 @@ typedef - errors. */ - VG_USERREQ__COUNT_ERRORS = 0x1201, - -- /* Allows a string (gdb monitor command) to be passed to the tool -- Used for interaction with vgdb/gdb */ -+ /* Allows the client program and/or gdbserver to execute a monitor -+ command. */ - VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202, - - /* These are useful and can be interpreted by any tool that -@@ -4562,14 +6225,14 @@ VALGRIND_PRINTF(const char *format, ...) - #if defined(NVALGRIND) - return 0; - #else /* NVALGRIND */ --#if defined(_MSC_VER) -+#if defined(_MSC_VER) || defined(__MINGW64__) - uintptr_t _qzz_res; - #else - unsigned long _qzz_res; - #endif - va_list vargs; - va_start(vargs, format); --#if defined(_MSC_VER) -+#if defined(_MSC_VER) || defined(__MINGW64__) - _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, - VG_USERREQ__PRINTF_VALIST_BY_REF, - (uintptr_t)format, -@@ -4600,14 +6263,14 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) - #if defined(NVALGRIND) - return 0; - #else /* NVALGRIND */ --#if defined(_MSC_VER) -+#if defined(_MSC_VER) || defined(__MINGW64__) - uintptr_t _qzz_res; - #else - unsigned long _qzz_res; - #endif - va_list vargs; - va_start(vargs, format); --#if defined(_MSC_VER) -+#if defined(_MSC_VER) || defined(__MINGW64__) - _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0, - VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF, - (uintptr_t)format, -@@ -4844,7 +6507,9 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) - VG_USERREQ__MEMPOOL_EXISTS, \ - pool, 0, 0, 0, 0) - --/* Mark a piece of memory as being a stack. Returns a stack id. */ -+/* Mark a piece of memory as being a stack. Returns a stack id. -+ start is the lowest addressable stack byte, end is the highest -+ addressable stack byte. */ - #define VALGRIND_STACK_REGISTER(start, end) \ - (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, \ - VG_USERREQ__STACK_REGISTER, \ -@@ -4856,7 +6521,9 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) - VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, \ - id, 0, 0, 0, 0) - --/* Change the start and end address of the stack id. */ -+/* Change the start and end address of the stack id. -+ start is the new lowest addressable stack byte, end is the new highest -+ addressable stack byte. */ - #define VALGRIND_STACK_CHANGE(id, start, end) \ - VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, \ - id, start, end, 0, 0) -@@ -4893,15 +6560,28 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) - VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \ - -1, 0, 0, 0, 0) - -+/* Execute a monitor command from the client program. -+ If a connection is opened with GDB, the output will be sent -+ according to the output mode set for vgdb. -+ If no connection is opened, output will go to the log output. -+ Returns 1 if command not recognised, 0 otherwise. */ -+#define VALGRIND_MONITOR_COMMAND(command) \ -+ VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, \ -+ command, 0, 0, 0, 0) -+ -+ - #undef PLAT_x86_darwin - #undef PLAT_amd64_darwin - #undef PLAT_x86_win32 -+#undef PLAT_amd64_win64 - #undef PLAT_x86_linux - #undef PLAT_amd64_linux - #undef PLAT_ppc32_linux --#undef PLAT_ppc64_linux -+#undef PLAT_ppc64be_linux -+#undef PLAT_ppc64le_linux - #undef PLAT_arm_linux - #undef PLAT_s390x_linux - #undef PLAT_mips32_linux -+#undef PLAT_mips64_linux - - #endif /* __VALGRIND_H */ diff --git a/wine-mono.spec b/wine-mono.spec index a583a62..b060960 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,23 +2,19 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.5.6 -Release: 6%{?dist} +Version: 4.6.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 Group: Development/Libraries URL: http://wiki.winehq.org/Mono -Source0: http://sourceforge.net/projects/wine/files/Wine%20Mono/%{version}/%{name}-%{version}.tar.gz +Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch -# https://github.com/mono/mono/commit/1445d4821c8091c395264542344dca9df22a2c82 -Patch1: wine-mono-valgrind.patch # to statically link in winpthreads -Patch2: wine-mono-build-static.patch -# https://github.com/mono/mono/commit/16ee0252305fbd4f40ea39c3c4421dc7f103f8a0 -Patch3: wine-mono-tls.patch +Patch1: wine-mono-build-static.patch # this function gets optimized out when inlined -Patch4: wine-mono-build-inline.patch +Patch2: wine-mono-build-inline.patch # see git://github.com/madewokherd/wine-mono @@ -60,13 +56,11 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.msifilename -%patch1 -dmono -p1 -b.valgrind -%patch2 -p1 -b.static -%patch3 -dmono -p1 -b.tls -%patch4 -p1 -b.inline +%patch1 -p1 -b.static +%patch2 -p1 -b.inline %build -MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh +MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static %install mkdir -p %{buildroot}%{_datadir}/wine/mono @@ -100,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Tue Mar 08 2016 Michael Cronenworth - 4.6.0-1 +- version upgrade + * Fri Feb 05 2016 Fedora Release Engineering - 4.5.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 6367cc019034893e532c42534938a083a0a59201 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 13 Mar 2016 20:22:29 +0000 Subject: [PATCH 26/90] Fix up the Wine / mono supported arch cross section --- wine-mono.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wine-mono.spec b/wine-mono.spec index b060960..8ccc863 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.6.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -19,7 +19,7 @@ Patch2: wine-mono-build-inline.patch # see git://github.com/madewokherd/wine-mono BuildArch: noarch -ExcludeArch: armv7hl ppc s390x +ExcludeArch: aarch64 %{power64} s390x s390 # 64 BuildRequires: mingw64-filesystem >= 95 @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Mar 13 2016 Peter Robinson 4.6.0-2 +- Fix up the Wine / mono supported arch cross section + * Tue Mar 08 2016 Michael Cronenworth - 4.6.0-1 - version upgrade From 958de7f731e1ce82f3dccd31473c2f4c77f921ca Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 17 Apr 2016 15:10:14 -0500 Subject: [PATCH 27/90] Update to 4.6.2 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1865a99..97a1b37 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.6.0.tar.gz +/wine-mono-4.6.2.tar.gz diff --git a/sources b/sources index c4158e7..bd7d5ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dc63164de4e7c06fbb5a619a105477fc wine-mono-4.6.0.tar.gz +f14b62e04cc6d105405c1fdd5fba92ff wine-mono-4.6.2.tar.gz diff --git a/wine-mono.spec b/wine-mono.spec index b060960..5278268 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.6.0 +Version: 4.6.2 Release: 1%{?dist} Summary: Mono library required for Wine @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Apr 17 2016 Michael Cronenworth - 4.6.2-1 +- version upgrade + * Tue Mar 08 2016 Michael Cronenworth - 4.6.0-1 - version upgrade From 16c55debec05b05473fc65e44966768ae4ae6932 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Wed, 15 Jun 2016 08:35:09 -0500 Subject: [PATCH 28/90] Update to 4.6.3 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-inline.patch | 12 ------------ wine-mono.spec | 13 ++++++------- 4 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 wine-mono-build-inline.patch diff --git a/.gitignore b/.gitignore index 97a1b37..52b7784 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.6.2.tar.gz +/wine-mono-4.6.3.tar.gz diff --git a/sources b/sources index bd7d5ad..4a86a7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f14b62e04cc6d105405c1fdd5fba92ff wine-mono-4.6.2.tar.gz +76a9046e05c22900c5f8d5c71450e844 wine-mono-4.6.3.tar.gz diff --git a/wine-mono-build-inline.patch b/wine-mono-build-inline.patch deleted file mode 100644 index 06cdc68..0000000 --- a/wine-mono-build-inline.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- 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.spec b/wine-mono.spec index 2954916..566f1b5 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.6.2 +Version: 4.6.3 Release: 1%{?dist} Summary: Mono library required for Wine @@ -13,8 +13,6 @@ Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{versi Patch0: wine-mono-build-msifilename.patch # to statically link in winpthreads Patch1: wine-mono-build-static.patch -# this function gets optimized out when inlined -Patch2: wine-mono-build-inline.patch # see git://github.com/madewokherd/wine-mono @@ -57,7 +55,6 @@ Windows Mono library required for Wine. %setup -q %patch0 -p1 -b.msifilename %patch1 -p1 -b.static -%patch2 -p1 -b.inline %build MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static @@ -88,12 +85,14 @@ cp mono-basic/README mono-basic-README cp mono-basic/LICENSE mono-basic-LICENSE %files -%doc COPYING README -%doc mono-LICENSE mono-COPYING.LIB mono-mcs* -%doc mono-basic-README mono-basic-LICENSE +%license COPYING mono-LICENSE mono-COPYING.LIB mono-basic-LICENSE mono-mcs* +%doc README mono-basic-README %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Wed Jun 15 2016 Michael Cronenworth - 4.6.3-1 +- version upgrade + * Sun Apr 17 2016 Michael Cronenworth - 4.6.2-1 - version upgrade From 2b91595371041075bf24cc6b4fd751edd6c09ae0 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 13 Oct 2016 15:58:20 +0100 Subject: [PATCH 29/90] - mono rebuild for aarch64 support --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 566f1b5..15654f1 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.6.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -90,6 +90,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Oct 13 2016 Fedora Release Engineering - 4.6.3-2 +- mono rebuild for aarch64 support + * Wed Jun 15 2016 Michael Cronenworth - 4.6.3-1 - version upgrade From d8d758a1322ea6c3ab9f6d354b33de4571c9913b Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Thu, 15 Dec 2016 14:46:13 -0600 Subject: [PATCH 30/90] Update to 4.6.4 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 52b7784..dc471c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.6.3.tar.gz +/wine-mono-4.6.4.tar.gz diff --git a/sources b/sources index 4a86a7f..220abc5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -76a9046e05c22900c5f8d5c71450e844 wine-mono-4.6.3.tar.gz +SHA512 (wine-mono-4.6.4.tar.gz) = 7c77865f8b72e27650fd4edbfe9324139e940ba67428630562f8baa654bb9f855a7cb6cfd644142cf5cfb3c7470ad28fd4f0d267be89a9ce602ac054d8e3dda3 diff --git a/wine-mono.spec b/wine-mono.spec index 15654f1..227f345 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.6.3 -Release: 2%{?dist} +Version: 4.6.4 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -90,6 +90,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Dec 15 2016 Michael Cronenworth - 4.6.4-1 +- version upgrade + * Thu Oct 13 2016 Fedora Release Engineering - 4.6.3-2 - mono rebuild for aarch64 support From e13e290490b991bf24f98b74b88a3d30e70488ad Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:24:39 +0000 Subject: [PATCH 31/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 227f345..e0d1f5f 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.6.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -90,6 +90,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 4.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Dec 15 2016 Michael Cronenworth - 4.6.4-1 - version upgrade From 11b523f25dcd87f86b4693316b7b03f8fd5a3429 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Thu, 23 Mar 2017 15:50:13 -0500 Subject: [PATCH 32/90] Update to 4.7.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-msifilename.patch | 16 ++++++++-------- wine-mono-build-static.patch | 20 ++++++++++++++------ wine-mono.spec | 17 +++++++++-------- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index dc471c3..9c08cba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.6.4.tar.gz +/wine-mono-4.7.0.tar.gz diff --git a/sources b/sources index 220abc5..c102f6c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.6.4.tar.gz) = 7c77865f8b72e27650fd4edbfe9324139e940ba67428630562f8baa654bb9f855a7cb6cfd644142cf5cfb3c7470ad28fd4f0d267be89a9ce602ac054d8e3dda3 +SHA512 (wine-mono-4.7.0.tar.gz) = 1540ead9eb04e0c692211151418afc32e51cc735714ae5d10d4ec7004fe28c0ec6efc0bbab4310d49fdef2df274383fcab9b5d6558b79bab464ba028bc49849a diff --git a/wine-mono-build-msifilename.patch b/wine-mono-build-msifilename.patch index cfb4795..0004f69 100644 --- a/wine-mono-build-msifilename.patch +++ b/wine-mono-build-msifilename.patch @@ -1,11 +1,11 @@ --- wine-mono-4.5.4/build-winemono.sh.orig 2014-11-14 18:02:57.810439383 +0100 +++ wine-mono-4.5.4/build-winemono.sh 2014-11-14 18:03:20.583738750 +0100 -@@ -9,7 +9,7 @@ - ORIGINAL_PATH="$PATH" - REBUILD=0 - WINE=${WINE:-`which wine`} --MSIFILENAME=winemono.msi -+MSIFILENAME=${MSIFILENAME:-winemono.msi} - BUILD_TESTS=0 - USE_MONOLITE=0 +@@ -434,7 +434,7 @@ + + build_msi () + { +- MSIFILENAME=$OUTDIR/winemono.msi ++ MSIFILENAME=${MSIFILENAME:-winemono.msi} + rm -rf cab-contents + rm -f "$BUILDDIR/image.cab" "${MSIFILENAME}" diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index 92a526b..2ea6124 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,18 +1,26 @@ --- 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 -@@ -63,6 +63,7 @@ - cd "$CURDIR/build-cross-$ARCH" +@@ -72,6 +72,7 @@ + cd "$BUILDDIR/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 + CPPFLAGS="-gdwarf-2 -gstrict-dwarf" "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 -@@ -109,6 +110,7 @@ - cd "$CURDIR/build-cross-cli" +@@ -118,6 +119,7 @@ + cd "$BUILDDIR/build-cross-cli" if test 1 != $REBUILD || test ! -e Makefile; then - ../mono/configure --prefix="$CURDIR/build-cross-cli-install" --with-mcs-docs=no --disable-system-aot || exit 1 + "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 +@@ -172,6 +174,7 @@ + # build mono-basic + cd "$SRCDIR/mono-basic" + ./configure --prefix="$BUILDDIR/build-cross-cli-install" || exit 1 ++ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i libtool + make $MAKEOPTS || exit 1 + make install || exit 1 + diff --git a/wine-mono.spec b/wine-mono.spec index e0d1f5f..56fae08 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.6.4 -Release: 2%{?dist} +Version: 4.7.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -37,6 +37,8 @@ BuildRequires: mingw32-crt BuildRequires: mingw32-winpthreads-static BuildRequires: autoconf automake +BuildRequires: bc +BuildRequires: cmake BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gettext @@ -44,7 +46,6 @@ BuildRequires: zip BuildRequires: wine-core BuildRequires: wine-devel BuildRequires: mono-core -BuildRequires: bc Requires: wine-filesystem @@ -61,19 +62,16 @@ MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh %install mkdir -p %{buildroot}%{_datadir}/wine/mono -install -p -m 0644 wine-mono-%{version}.msi \ +install -p -m 0644 cab-contents/wine-mono-%{version}.msi \ %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}.msi # prep licenses cp mono/LICENSE mono-LICENSE cp mono/COPYING.LIB mono-COPYING.LIB +cp mono/mcs/COPYING mono-mcs-COPYING pushd mono/mcs -sed -i 's/\r//' LICENSE.MSPL - -iconv -f iso8859-1 -t utf-8 LICENSE.MSPL > LICENSE.MSPL.conv && mv -f LICENSE.MSPL.conv LICENSE.MSPL - for l in `ls LICENSE*`; do echo $l cp $l ../../mono-mcs-$l @@ -90,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Mar 23 2017 Michael Cronenworth - 4.7.0-1 +- version upgrade + * Sat Feb 11 2017 Fedora Release Engineering - 4.6.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From e4018af87f65691ca3bfbf904082ef46b5e5ff97 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:38:20 +0000 Subject: [PATCH 33/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 56fae08..88f42ed 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.7.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 4.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Mar 23 2017 Michael Cronenworth - 4.7.0-1 - version upgrade From f6e008900201711d26c90a5e563426dd2a917a47 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Tue, 8 Aug 2017 22:50:20 -0500 Subject: [PATCH 34/90] Update to 4.7.1 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9c08cba..a1c4335 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.7.0.tar.gz +/wine-mono-4.7.1.tar.gz diff --git a/sources b/sources index c102f6c..cf9316a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.7.0.tar.gz) = 1540ead9eb04e0c692211151418afc32e51cc735714ae5d10d4ec7004fe28c0ec6efc0bbab4310d49fdef2df274383fcab9b5d6558b79bab464ba028bc49849a +SHA512 (wine-mono-4.7.1.tar.gz) = 9fd99ff9cf1a12095eb84f40eba1a20f7ed98debc0ed689ffd5ddb62001e9e6b127310f1f86d3c52e93ca633f2b031978b4c1576375c6523aa729519e78bce31 diff --git a/wine-mono.spec b/wine-mono.spec index 88f42ed..a92f91c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.7.0 -Release: 2%{?dist} +Version: 4.7.1 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Tue Aug 08 2017 Michael Cronenworth - 4.7.1-1 +- version upgrade + * Thu Jul 27 2017 Fedora Release Engineering - 4.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c2d6f48d56e1497eaa65324ae90163c90913a929 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:58:43 +0000 Subject: [PATCH 35/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index a92f91c..a21abd0 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.7.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 4.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Aug 08 2017 Michael Cronenworth - 4.7.1-1 - version upgrade From 558e0558bfadd8ff3cffde7ac59a54c864387c46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:52:16 +0000 Subject: [PATCH 36/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index a21abd0..4c64a59 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.7.1 -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 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 4.7.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 4.7.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 53df717ba1aff83437f1cff560235686fe6afcec Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 21 Jul 2018 13:01:32 -0500 Subject: [PATCH 37/90] Update to 4.7.3 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a1c4335..5b2b9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.7.1.tar.gz +/wine-mono-4.7.3.tar.gz diff --git a/sources b/sources index cf9316a..de01d43 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.7.1.tar.gz) = 9fd99ff9cf1a12095eb84f40eba1a20f7ed98debc0ed689ffd5ddb62001e9e6b127310f1f86d3c52e93ca633f2b031978b4c1576375c6523aa729519e78bce31 +SHA512 (wine-mono-4.7.3.tar.gz) = ea44b55525785e36720fa811af97292f47f826987400cc01d1ba01279084e1c55fe9f922bbe20c748cc4229a9553ac6d4765e5e4104e4b3c8ea22e99aafb075a diff --git a/wine-mono.spec b/wine-mono.spec index 4c64a59..d5c0760 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.7.1 -Release: 3%{?dist} +Version: 4.7.3 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sat Jul 21 2018 Michael Cronenworth - 4.7.3-1 +- version upgrade + * Sat Jul 14 2018 Fedora Release Engineering - 4.7.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 9b7da4fe17c7e2425eb6688bd0d9877a19eae59b Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 21 Jul 2018 13:21:43 -0500 Subject: [PATCH 38/90] Configure wants to see build host gcc --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index d5c0760..7d37fb4 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -39,6 +39,7 @@ BuildRequires: mingw32-winpthreads-static BuildRequires: autoconf automake BuildRequires: bc BuildRequires: cmake +BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gettext From 02f036fe49f3375b46a4f91df4265685f38326b0 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 23 Aug 2018 12:30:06 +0100 Subject: [PATCH 39/90] Don't exclude aarch64 --- wine-mono.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wine-mono.spec b/wine-mono.spec index 7d37fb4..cedbcaa 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.7.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -17,7 +17,7 @@ Patch1: wine-mono-build-static.patch # see git://github.com/madewokherd/wine-mono BuildArch: noarch -ExcludeArch: aarch64 %{power64} s390x s390 +ExcludeArch: %{power64} s390x s390 # 64 BuildRequires: mingw64-filesystem >= 95 @@ -89,6 +89,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Thu Aug 23 2018 Peter Robinson 4.7.3-2 +- Don't exclude aarch64 + * Sat Jul 21 2018 Michael Cronenworth - 4.7.3-1 - version upgrade From 98a9821ddd947f75d34af5bd380653a855248b3b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:30 +0100 Subject: [PATCH 40/90] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- wine-mono.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index cedbcaa..bf0431b 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -7,7 +7,6 @@ Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 -Group: Development/Libraries URL: http://wiki.winehq.org/Mono Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}.tar.gz Patch0: wine-mono-build-msifilename.patch From 0ecdfb277b6d950cf6ecdda47a3eddcf4c3011ea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:45:30 +0000 Subject: [PATCH 41/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index bf0431b..9c4c0e3 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.7.3 -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 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 4.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Aug 23 2018 Peter Robinson 4.7.3-2 - Don't exclude aarch64 From aae8b0c3fe0e86f2f52218b19a8a338931f0c73c Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 18 Feb 2019 09:37:45 -0600 Subject: [PATCH 42/90] Update to 4.7.5 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5b2b9d2..6c7080c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.7.3.tar.gz +/wine-mono-4.7.5.tar.gz diff --git a/sources b/sources index de01d43..5e66429 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.7.3.tar.gz) = ea44b55525785e36720fa811af97292f47f826987400cc01d1ba01279084e1c55fe9f922bbe20c748cc4229a9553ac6d4765e5e4104e4b3c8ea22e99aafb075a +SHA512 (wine-mono-4.7.5.tar.gz) = ba54b694fac150c061efdcb12a88f5112a129341c5284809b7703f5a1ac345e2644eaa97f2f3a59e5ded426df9ecb53b9ca805fce9881376371a4a9875ba9d9d diff --git a/wine-mono.spec b/wine-mono.spec index 9c4c0e3..767c09a 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.7.3 -Release: 3%{?dist} +Version: 4.7.5 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Mon Feb 18 2019 Michael Cronenworth - 4.7.5-1 +- version upgrade + * Sun Feb 03 2019 Fedora Release Engineering - 4.7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 27b7d7fa9a7e8293686d254bbc9ce71e9c02cd47 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 1 Mar 2019 22:37:28 -0600 Subject: [PATCH 43/90] Update to 4.8.0 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c7080c..69a55d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.7.5.tar.gz +/wine-mono-4.8.0.tar.gz diff --git a/sources b/sources index 5e66429..ba250a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.7.5.tar.gz) = ba54b694fac150c061efdcb12a88f5112a129341c5284809b7703f5a1ac345e2644eaa97f2f3a59e5ded426df9ecb53b9ca805fce9881376371a4a9875ba9d9d +SHA512 (wine-mono-4.8.0.tar.gz) = 6f2cdd26f2bb4fdaf98acb7cad629a781c975869bff4fdf78e6dc251fc771da3e7ae9c7112cae5fe12c9adff943ceaa830be135b877c5ab427da2f0e64285346 diff --git a/wine-mono.spec b/wine-mono.spec index 767c09a..2b9dcec 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.7.5 +Version: 4.8.0 Release: 1%{?dist} Summary: Mono library required for Wine @@ -88,6 +88,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}.msi %changelog +* Fri Mar 01 2019 Michael Cronenworth - 4.8.0-1 +- version upgrade + * Mon Feb 18 2019 Michael Cronenworth - 4.7.5-1 - version upgrade From 61be2eb2c1bf4eececaa2dc5622f9b09f514e334 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 1 Mar 2019 22:49:14 -0600 Subject: [PATCH 44/90] Update static build patch --- wine-mono-build-static.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index 2ea6124..19df0ba 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -16,10 +16,10 @@ fi if test 1 = $USE_MONOLITE; then make get-monolite-latest || exit 1 -@@ -172,6 +174,7 @@ +@@ -180,6 +182,7 @@ # build mono-basic cd "$SRCDIR/mono-basic" - ./configure --prefix="$BUILDDIR/build-cross-cli-install" || exit 1 + ./configure --prefix="$BUILDDIR/build-cross-cli-win32-install" || exit 1 + sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i libtool make $MAKEOPTS || exit 1 make install || exit 1 From d0cac76ee09b57bb78740a98cd20e641f6e052a2 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 1 Mar 2019 23:29:49 -0600 Subject: [PATCH 45/90] Fix python shebangs --- wine-mono.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wine-mono.spec b/wine-mono.spec index 2b9dcec..fb5fbed 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -46,6 +46,7 @@ BuildRequires: zip BuildRequires: wine-core BuildRequires: wine-devel BuildRequires: mono-core +BuildRequires: /usr/bin/pathfix.py Requires: wine-filesystem @@ -57,6 +58,9 @@ Windows Mono library required for Wine. %patch0 -p1 -b.msifilename %patch1 -p1 -b.static +# Fix all Python shebangs +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . + %build MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static From 69aaf8ddcbee58123bed6ec0e4683b918f007aed Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Fri, 1 Mar 2019 23:42:27 -0600 Subject: [PATCH 46/90] Update build script for python command --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index fb5fbed..678fd77 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -60,6 +60,7 @@ Windows Mono library required for Wine. # Fix all Python shebangs pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . +sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in %build MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static From 4484cf7db69f7810111669961d91caddcf9f4396 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 4 Mar 2019 15:00:02 -0600 Subject: [PATCH 47/90] Add upstream patch to fix builds without network access --- wine-mono-monolite.patch | 19 +++++++++++++++++++ wine-mono.spec | 7 ++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 wine-mono-monolite.patch diff --git a/wine-mono-monolite.patch b/wine-mono-monolite.patch new file mode 100644 index 0000000..199dca3 --- /dev/null +++ b/wine-mono-monolite.patch @@ -0,0 +1,19 @@ +diff --git a/build-winemono.sh b/build-winemono.sh +index bee0dbf..7f0b062 100755 +--- a/build-winemono.sh ++++ b/build-winemono.sh +@@ -120,6 +120,14 @@ + "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 ++ ++ # put a System.Native library somewhere monolite can find it during the build ++ cd "$BUILDDIR/build-cross-cli/mono/native" ++ make $MAKEOPTS || exit 1 ++ mkdir "$BUILDDIR/build-cross-cli/mono/lib/" ++ cp .libs/libmono-native.so "$BUILDDIR/build-cross-cli/mono/lib/libSystem.Native.so" || exit 1 ++ ++ cd "$BUILDDIR/build-cross-cli" + if test 1 = $USE_MONOLITE; then + make get-monolite-latest || exit 1 + elif test -e $SRCDIR/monolite/mcs.exe; then diff --git a/wine-mono.spec b/wine-mono.spec index 678fd77..d04f695 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -12,6 +12,9 @@ Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{versi Patch0: wine-mono-build-msifilename.patch # to statically link in winpthreads Patch1: wine-mono-build-static.patch +# Fix from upstream for built-in monolite +# https://www.winehq.org/pipermail/wine-devel/2019-March/140838.html +Patch2: wine-mono-monolite.patch # see git://github.com/madewokherd/wine-mono @@ -46,6 +49,7 @@ BuildRequires: zip BuildRequires: wine-core BuildRequires: wine-devel BuildRequires: mono-core +BuildRequires: /usr/bin/python BuildRequires: /usr/bin/pathfix.py Requires: wine-filesystem @@ -57,13 +61,14 @@ Windows Mono library required for Wine. %setup -q %patch0 -p1 -b.msifilename %patch1 -p1 -b.static +%patch2 -p1 -b.monolite # Fix all Python shebangs pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in %build -MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static +MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh %install mkdir -p %{buildroot}%{_datadir}/wine/mono From 72afe592250e4ea575c32f57b5cb72842e30c031 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 14 Apr 2019 13:22:00 -0500 Subject: [PATCH 48/90] Update to 4.8.1 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-msifilename.patch | 11 ----------- wine-mono-build-static.patch | 14 +++++++------- wine-mono-monolite.patch | 19 ------------------- wine-mono.spec | 26 +++++++++++++------------- 6 files changed, 22 insertions(+), 52 deletions(-) delete mode 100644 wine-mono-build-msifilename.patch delete mode 100644 wine-mono-monolite.patch diff --git a/.gitignore b/.gitignore index 69a55d8..2ae29b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.8.0.tar.gz +/wine-mono-4.8.1.tar.gz diff --git a/sources b/sources index ba250a4..0176d4d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.8.0.tar.gz) = 6f2cdd26f2bb4fdaf98acb7cad629a781c975869bff4fdf78e6dc251fc771da3e7ae9c7112cae5fe12c9adff943ceaa830be135b877c5ab427da2f0e64285346 +SHA512 (wine-mono-4.8.1.tar.gz) = f75f68ea1f084e7badbf0e09cb809e66ee5f1732789704156e81095fdd87f7066093d604c1a8c61b363509b54f79db8e04dc749562513f34e2578b8c82e21c31 diff --git a/wine-mono-build-msifilename.patch b/wine-mono-build-msifilename.patch deleted file mode 100644 index 0004f69..0000000 --- a/wine-mono-build-msifilename.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- wine-mono-4.5.4/build-winemono.sh.orig 2014-11-14 18:02:57.810439383 +0100 -+++ wine-mono-4.5.4/build-winemono.sh 2014-11-14 18:03:20.583738750 +0100 -@@ -434,7 +434,7 @@ - - build_msi () - { -- MSIFILENAME=$OUTDIR/winemono.msi -+ MSIFILENAME=${MSIFILENAME:-winemono.msi} - rm -rf cab-contents - rm -f "$BUILDDIR/image.cab" "${MSIFILENAME}" - diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index 19df0ba..d458507 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,6 +1,6 @@ ---- 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 -@@ -72,6 +72,7 @@ +--- wine-mono-4.8.1/build-winemono.sh.orig 2015-04-20 10:34:32.150114394 -0500 ++++ wine-mono-4.8.1/build-winemono.sh 2015-04-20 10:33:13.699274928 -0500 +@@ -73,6 +73,7 @@ cd "$BUILDDIR/build-cross-$ARCH" if test 1 != $REBUILD || test ! -e Makefile; then CPPFLAGS="-gdwarf-2 -gstrict-dwarf" "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 @@ -8,15 +8,15 @@ sed -e 's/-lgcc_s//' -i libtool fi WINEPREFIX=/dev/null make $MAKEOPTS || exit 1 -@@ -118,6 +119,7 @@ +@@ -162,6 +163,7 @@ cd "$BUILDDIR/build-cross-cli" if test 1 != $REBUILD || test ! -e Makefile; then "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 -@@ -180,6 +182,7 @@ + + # put a System.Native library somewhere monolite can find it during the build +@@ -232,6 +234,7 @@ # build mono-basic cd "$SRCDIR/mono-basic" ./configure --prefix="$BUILDDIR/build-cross-cli-win32-install" || exit 1 diff --git a/wine-mono-monolite.patch b/wine-mono-monolite.patch deleted file mode 100644 index 199dca3..0000000 --- a/wine-mono-monolite.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/build-winemono.sh b/build-winemono.sh -index bee0dbf..7f0b062 100755 ---- a/build-winemono.sh -+++ b/build-winemono.sh -@@ -120,6 +120,14 @@ - "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 -+ -+ # put a System.Native library somewhere monolite can find it during the build -+ cd "$BUILDDIR/build-cross-cli/mono/native" -+ make $MAKEOPTS || exit 1 -+ mkdir "$BUILDDIR/build-cross-cli/mono/lib/" -+ cp .libs/libmono-native.so "$BUILDDIR/build-cross-cli/mono/lib/libSystem.Native.so" || exit 1 -+ -+ cd "$BUILDDIR/build-cross-cli" - if test 1 = $USE_MONOLITE; then - make get-monolite-latest || exit 1 - elif test -e $SRCDIR/monolite/mcs.exe; then diff --git a/wine-mono.spec b/wine-mono.spec index d04f695..7047a2c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,19 +2,15 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.8.0 +Version: 4.8.1 Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 URL: http://wiki.winehq.org/Mono Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}.tar.gz -Patch0: wine-mono-build-msifilename.patch # to statically link in winpthreads -Patch1: wine-mono-build-static.patch -# Fix from upstream for built-in monolite -# https://www.winehq.org/pipermail/wine-devel/2019-March/140838.html -Patch2: wine-mono-monolite.patch +Patch0: wine-mono-build-static.patch # see git://github.com/madewokherd/wine-mono @@ -57,11 +53,11 @@ Requires: wine-filesystem %description Windows Mono library required for Wine. +%{?mingw_debug_package} + %prep %setup -q -%patch0 -p1 -b.msifilename -%patch1 -p1 -b.static -%patch2 -p1 -b.monolite +%patch0 -p1 -b.static # Fix all Python shebangs pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . @@ -71,9 +67,9 @@ sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am. MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh %install -mkdir -p %{buildroot}%{_datadir}/wine/mono -install -p -m 0644 cab-contents/wine-mono-%{version}.msi \ - %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}.msi +mkdir -p %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}/ +cp -rp image/* \ + %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}/ # prep licenses cp mono/LICENSE mono-LICENSE @@ -95,9 +91,13 @@ cp mono-basic/LICENSE mono-basic-LICENSE %files %license COPYING mono-LICENSE mono-COPYING.LIB mono-basic-LICENSE mono-mcs* %doc README mono-basic-README -%{_datadir}/wine/mono/wine-mono-%{version}.msi +%{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Apr 14 2019 Michael Cronenworth - 4.8.1-1 +- version upgrade +- switch from MSI to new shared filesystem format + * Fri Mar 01 2019 Michael Cronenworth - 4.8.0-1 - version upgrade From 7e0e5d2120d30e7313da641c5fac2d79e51c82b7 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 14 Apr 2019 13:52:02 -0500 Subject: [PATCH 49/90] Fix debuginfo macro The default macro builds both 32-bit and 64-bit debuginfo packages, but we only need one debuginfo package here. I may split this package into the two arches, but for now it is x86 specific. --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 7047a2c..a2b12e7 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -53,6 +53,7 @@ Requires: wine-filesystem %description Windows Mono library required for Wine. +%global mingw_build_win32 0 %{?mingw_debug_package} %prep From 4a152898d573f1e9e8d2a103fc25015be8b04b07 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 28 Apr 2019 12:51:07 -0500 Subject: [PATCH 50/90] Update to 4.8.3 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 2ae29b5..0d62973 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.8.1.tar.gz +/wine-mono-4.8.3.tar.gz diff --git a/sources b/sources index 0176d4d..ab5bd8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.8.1.tar.gz) = f75f68ea1f084e7badbf0e09cb809e66ee5f1732789704156e81095fdd87f7066093d604c1a8c61b363509b54f79db8e04dc749562513f34e2578b8c82e21c31 +SHA512 (wine-mono-4.8.3.tar.gz) = 85d579a22308b6d47b597940b6af968f5c113008349f316068514a456a0761fd69cda72e76ed33835bf0d078e7f48df32af2c04cf2a5c519c7abbb4812ab8879 diff --git a/wine-mono.spec b/wine-mono.spec index a2b12e7..b469511 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.8.1 +Version: 4.8.3 Release: 1%{?dist} Summary: Mono library required for Wine @@ -41,10 +41,7 @@ BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gettext -BuildRequires: zip BuildRequires: wine-core -BuildRequires: wine-devel -BuildRequires: mono-core BuildRequires: /usr/bin/python BuildRequires: /usr/bin/pathfix.py @@ -65,7 +62,7 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in %build -MAKEOPTS=%{_smp_mflags} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh +MAKEOPTS=%{_smp_mflags} ./build-winemono.sh -i %install mkdir -p %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}/ @@ -95,6 +92,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Apr 28 2019 Michael Cronenworth - 4.8.3-1 +- version upgrade + * Sun Apr 14 2019 Michael Cronenworth - 4.8.1-1 - version upgrade - switch from MSI to new shared filesystem format From 3dd1f4d15de2238b292a59ac4763711b9a74f2b0 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 23 Jun 2019 14:03:21 -0500 Subject: [PATCH 51/90] Update to 4.9.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-static.patch | 41 +++++++++++++++--------------------- wine-mono.spec | 9 ++++++-- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 0d62973..9bdca3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.8.3.tar.gz +/wine-mono-4.9.0.tar.gz diff --git a/sources b/sources index ab5bd8f..f646a51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.8.3.tar.gz) = 85d579a22308b6d47b597940b6af968f5c113008349f316068514a456a0761fd69cda72e76ed33835bf0d078e7f48df32af2c04cf2a5c519c7abbb4812ab8879 +SHA512 (wine-mono-4.9.0.tar.gz) = eb8ed323365dba8ecebbc82ed5c0a98af2a403e736a221997d924d361f78bc696e955cb37cad207911f333c6fce42b8e9d6f95f401f62c0400561144d8bb2cb3 diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index d458507..2af01d0 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,26 +1,19 @@ ---- wine-mono-4.8.1/build-winemono.sh.orig 2015-04-20 10:34:32.150114394 -0500 -+++ wine-mono-4.8.1/build-winemono.sh 2015-04-20 10:33:13.699274928 -0500 -@@ -73,6 +73,7 @@ - cd "$BUILDDIR/build-cross-$ARCH" - if test 1 != $REBUILD || test ! -e Makefile; then - CPPFLAGS="-gdwarf-2 -gstrict-dwarf" "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 -@@ -162,6 +163,7 @@ - cd "$BUILDDIR/build-cross-cli" - if test 1 != $REBUILD || test ! -e Makefile; then - "$SRCDIR"/mono/configure --prefix="$BUILDDIR/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 +--- wine-mono-4.9.0/Makefile.orig 2015-04-20 10:34:32.150114394 -0500 ++++ wine-mono-4.9.0/Makefile 2015-04-20 10:33:13.699274928 -0500 +@@ -106,6 +106,7 @@ + $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(BUILDDIR)/.dir + mkdir -p $$(@D) + cd $$(BUILDDIR)/mono-$(1); CPPFLAGS="-gdwarf-2 -gstrict-dwarf" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no ++ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $$(BUILDDIR)/mono-$(1)/libtool + sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool - # put a System.Native library somewhere monolite can find it during the build -@@ -232,6 +234,7 @@ - # build mono-basic - cd "$SRCDIR/mono-basic" - ./configure --prefix="$BUILDDIR/build-cross-cli-win32-install" || exit 1 -+ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i libtool - make $MAKEOPTS || exit 1 - make install || exit 1 + $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) +@@ -260,6 +261,7 @@ + $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(BUILDDIR)/.dir + mkdir -p $(@D) + cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot ++ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $(@D)/libtool + $(BUILDDIR)/mono-unix/mono/lib/libSystem.Native.so: $(BUILDDIR)/mono-unix/Makefile $(MONO_LIBNATIVE_SRCS) + mkdir -p $(@D) + diff --git a/wine-mono.spec b/wine-mono.spec index b469511..99b1551 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.8.3 +Version: 4.9.0 Release: 1%{?dist} Summary: Mono library required for Wine @@ -47,6 +47,8 @@ BuildRequires: /usr/bin/pathfix.py Requires: wine-filesystem +# Bundles FAudio, libtheorafile, libmojoshader, SDL2, SDL2_image + %description Windows Mono library required for Wine. @@ -62,7 +64,7 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in %build -MAKEOPTS=%{_smp_mflags} ./build-winemono.sh -i +make %{_smp_mflags} image %install mkdir -p %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}/ @@ -92,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Jun 23 2019 Michael Cronenworth - 4.9.0-1 +- version upgrade + * Sun Apr 28 2019 Michael Cronenworth - 4.8.3-1 - version upgrade From 84590a0df71380bbdc1c1b8bff6c48229cbc0e0c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 03:30:52 +0000 Subject: [PATCH 52/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 99b1551..6c20799 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 4.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Jun 23 2019 Michael Cronenworth - 4.9.0-1 - version upgrade From e04bae77de75d6151d6fa43271d8ea1ec8c828dd Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 19 Aug 2019 14:38:17 -0500 Subject: [PATCH 53/90] Update to 4.9.2 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9bdca3e..5ef8248 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.9.0.tar.gz +/wine-mono-4.9.2.tar.gz diff --git a/sources b/sources index f646a51..7c39bca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.9.0.tar.gz) = eb8ed323365dba8ecebbc82ed5c0a98af2a403e736a221997d924d361f78bc696e955cb37cad207911f333c6fce42b8e9d6f95f401f62c0400561144d8bb2cb3 +SHA512 (wine-mono-4.9.2.tar.gz) = 147dece0bd89f43601eb299bbd9ce10976e653089596c9e5473c75f34a07e3ab605a84f749a256903ad4dfbd0e04cacbdaf0a9a0d00be8ab15828d70bcfa85e7 diff --git a/wine-mono.spec b/wine-mono.spec index 6c20799..d218173 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.9.0 -Release: 2%{?dist} +Version: 4.9.2 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Aug 19 2019 Michael Cronenworth - 4.9.2-1 +- version upgrade + * Sat Jul 27 2019 Fedora Release Engineering - 4.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From ca0d935860dbe1d9fb7505eb657cb243c3096410 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 29 Sep 2019 10:21:39 -0500 Subject: [PATCH 54/90] Update to 4.9.3 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef8248..aecdaf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.9.2.tar.gz +/wine-mono-4.9.3.tar.gz diff --git a/sources b/sources index 7c39bca..f9a18ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.9.2.tar.gz) = 147dece0bd89f43601eb299bbd9ce10976e653089596c9e5473c75f34a07e3ab605a84f749a256903ad4dfbd0e04cacbdaf0a9a0d00be8ab15828d70bcfa85e7 +SHA512 (wine-mono-4.9.3.tar.gz) = b80a3479b385fc0a580f3b2932110989ba44b6b91228e2d70a3d0e2ab363573a43c8572b1dee0c684132ec7ac490db6722ea9a77127ac760a2dd9b930cfe28e2 diff --git a/wine-mono.spec b/wine-mono.spec index d218173..584d833 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.9.2 +Version: 4.9.3 Release: 1%{?dist} Summary: Mono library required for Wine @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Sep 29 2019 Michael Cronenworth - 4.9.3-1 +- version upgrade + * Mon Aug 19 2019 Michael Cronenworth - 4.9.2-1 - version upgrade From 311714ac2e5a29f01eb889ff9d92f960e6dd1055 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 16 Nov 2019 11:53:50 -0600 Subject: [PATCH 55/90] Update to 4.9.4 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index aecdaf0..d3adb81 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.9.3.tar.gz +/wine-mono-4.9.4.tar.gz diff --git a/sources b/sources index f9a18ea..f0e93d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.9.3.tar.gz) = b80a3479b385fc0a580f3b2932110989ba44b6b91228e2d70a3d0e2ab363573a43c8572b1dee0c684132ec7ac490db6722ea9a77127ac760a2dd9b930cfe28e2 +SHA512 (wine-mono-4.9.4.tar.gz) = 338ffb09e03755ea8a103a8913365a2dafe334a7d110779b31ccb2b0f1e49d4304279337905ffc5dcb96184f95ac330dfad3f7f5f56894044f8554aee219d317 diff --git a/wine-mono.spec b/wine-mono.spec index 584d833..55c4f3f 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.9.3 +Version: 4.9.4 Release: 1%{?dist} Summary: Mono library required for Wine @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Nov 16 2019 Michael Cronenworth - 4.9.4-1 +- version upgrade + * Sun Sep 29 2019 Michael Cronenworth - 4.9.3-1 - version upgrade From b3f2a9a3787c1dbcb888ed9dbd0170ba205dea56 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:44:24 +0000 Subject: [PATCH 56/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 55c4f3f..b6ae82b 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 4.9.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -94,6 +94,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 4.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Nov 16 2019 Michael Cronenworth - 4.9.4-1 - version upgrade From 1631940681f1d37e583674e295b611e8a1d66dcd Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 27 Apr 2020 11:01:51 -0500 Subject: [PATCH 57/90] Update to 5.0.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-static.patch | 26 +++++++++++++++++++------- wine-mono-crlf.patch | 11 +++++++++++ wine-mono.spec | 22 +++++++++++++++++++--- 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 wine-mono-crlf.patch diff --git a/.gitignore b/.gitignore index d3adb81..9ab96b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-4.9.4.tar.gz +/wine-mono-5.0.0-src.tar.xz diff --git a/sources b/sources index f0e93d8..01365e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-4.9.4.tar.gz) = 338ffb09e03755ea8a103a8913365a2dafe334a7d110779b31ccb2b0f1e49d4304279337905ffc5dcb96184f95ac330dfad3f7f5f56894044f8554aee219d317 +SHA512 (wine-mono-5.0.0-src.tar.xz) = 8668e1f9ed6a04c04d4a8adff3a84c30eb52121369fea871e893cbaffb5221c51d717cf3ff86a53d901a871a58cda4d6eb6b823e70bbfd0952083d3b7127354d diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index 2af01d0..e3b8192 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,19 +1,31 @@ ---- wine-mono-4.9.0/Makefile.orig 2015-04-20 10:34:32.150114394 -0500 -+++ wine-mono-4.9.0/Makefile 2015-04-20 10:33:13.699274928 -0500 -@@ -106,6 +106,7 @@ +--- wine-mono-5.0.0/GNUmakefile.orig 2015-04-20 10:34:32.150114394 -0500 ++++ wine-mono-5.0.0/GNUmakefile 2015-04-20 10:33:13.699274928 -0500 +@@ -128,7 +128,8 @@ + # libmono dll's $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(BUILDDIR)/.dir mkdir -p $$(@D) - cd $$(BUILDDIR)/mono-$(1); CPPFLAGS="-gdwarf-2 -gstrict-dwarf" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no +- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS="-gdwarf-2 -gstrict-dwarf" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm ++ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CPPFLAGS="-gdwarf-2 -gstrict-dwarf -fPIC" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm + sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $$(BUILDDIR)/mono-$(1)/libtool sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) -@@ -260,6 +261,7 @@ +@@ -163,7 +164,7 @@ + $$(BUILDDIR)/btls-$(1)/Makefile: $$(SRCDIR)/mono/mono/btls/CMakeLists.txt + mkdir -p $$(@D) + # wincrypt.h interferes with boringssl definitions, so we prevent its inclusion +- cd $$(@D); $$(MINGW_ENV) cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls ++ cd $$(@D); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-fPIC -D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls + + $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) + +WINEPREFIX=/dev/null $$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/btls-$(1) +@@ -415,7 +416,8 @@ + # mono native/classlib build $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(BUILDDIR)/.dir mkdir -p $(@D) - cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot +- cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server ++ cd $(@D) && CPPFLAGS_FOR_BTLS="-fPIC" BTLS_CFLAGS="-fPIC" $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server + sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $(@D)/libtool $(BUILDDIR)/mono-unix/mono/lib/libSystem.Native.so: $(BUILDDIR)/mono-unix/Makefile $(MONO_LIBNATIVE_SRCS) mkdir -p $(@D) - diff --git a/wine-mono-crlf.patch b/wine-mono-crlf.patch new file mode 100644 index 0000000..14caf95 --- /dev/null +++ b/wine-mono-crlf.patch @@ -0,0 +1,11 @@ +--- a/tools/build-msi-tables.sh 2020-04-10 11:06:24.000000000 -0500 ++++ b/tools/build-msi-tables.sh 2020-04-27 10:03:20.835241179 -0500 +@@ -7,7 +7,7 @@ + mkdir -p ${TABLEDIR} + cp ${TABLESRCDIR}/*.idt ${TABLEDIR} + +-IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}"` ++IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}" | dos2unix` + + cd "${IMAGEDIR}" + diff --git a/wine-mono.spec b/wine-mono.spec index b6ae82b..5443122 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,16 +2,20 @@ %{?mingw_package_header} Name: wine-mono -Version: 4.9.4 -Release: 2%{?dist} +Version: 5.0.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 URL: http://wiki.winehq.org/Mono -Source0: http://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}.tar.gz +Source0: https://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}-src.tar.xz # to statically link in winpthreads Patch0: wine-mono-build-static.patch +# https://bugs.winehq.org/show_bug.cgi?id=48937 +# fixed in wine 5.7 +Patch1: wine-mono-crlf.patch + # see git://github.com/madewokherd/wine-mono BuildArch: noarch @@ -37,14 +41,20 @@ BuildRequires: mingw32-winpthreads-static BuildRequires: autoconf automake BuildRequires: bc BuildRequires: cmake +BuildRequires: dos2unix BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: gettext +BuildRequires: libgdiplus BuildRequires: wine-core BuildRequires: /usr/bin/python BuildRequires: /usr/bin/pathfix.py +# https://bugs.winehq.org/show_bug.cgi?id=48937 +# fixed in wine 5.7 +BuildRequires: dos2unix + Requires: wine-filesystem # Bundles FAudio, libtheorafile, libmojoshader, SDL2, SDL2_image @@ -58,12 +68,15 @@ Windows Mono library required for Wine. %prep %setup -q %patch0 -p1 -b.static +%patch1 -p1 -b.crlf # Fix all Python shebangs pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in %build +export BTLS_CFLAGS="-fPIC" +export CPPFLAGS_FOR_BTLS="-fPIC" make %{_smp_mflags} image %install @@ -94,6 +107,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Apr 26 2020 Michael Cronenworth - 5.0.0-1 +- version upgrade + * Fri Jan 31 2020 Fedora Release Engineering - 4.9.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 2dc5b793b33cece62c66422bf1cdd6c5c8067279 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Tue, 14 Jul 2020 13:43:28 -0500 Subject: [PATCH 58/90] Update to 5.1.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-static.patch | 20 ++++++++++---------- wine-mono.spec | 14 +++++++++++++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 9ab96b3..353b90a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-5.0.0-src.tar.xz +/wine-mono-5.1.0-src.tar.xz diff --git a/sources b/sources index 01365e6..b9e7b5d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-5.0.0-src.tar.xz) = 8668e1f9ed6a04c04d4a8adff3a84c30eb52121369fea871e893cbaffb5221c51d717cf3ff86a53d901a871a58cda4d6eb6b823e70bbfd0952083d3b7127354d +SHA512 (wine-mono-5.1.0-src.tar.xz) = 92bff1fc934f2a74065cc6899a4d3c1f101586f9a3c86c39d787249d3ac3c5485509a7cef65532716413c179c03d3d424d709d63f3d1773859199e5a4683123f diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index e3b8192..0c5ba5e 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,27 +1,27 @@ ---- wine-mono-5.0.0/GNUmakefile.orig 2015-04-20 10:34:32.150114394 -0500 -+++ wine-mono-5.0.0/GNUmakefile 2015-04-20 10:33:13.699274928 -0500 -@@ -128,7 +128,8 @@ +--- wine-mono-5.0.0/mono.make.orig 2020-06-01 11:47:42.000000000 -0500 ++++ wine-mono-5.0.0/mono.make 2020-06-24 14:47:01.905533172 -0500 +@@ -15,7 +15,8 @@ # libmono dll's - $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(BUILDDIR)/.dir + $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(SRCDIR)/mono.make $$(BUILDDIR)/.dir $$(MINGW_DEPS) mkdir -p $$(@D) - cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS="-gdwarf-2 -gstrict-dwarf" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm + cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CPPFLAGS="-gdwarf-2 -gstrict-dwarf -fPIC" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm + sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $$(BUILDDIR)/mono-$(1)/libtool sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool - $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) -@@ -163,7 +164,7 @@ - $$(BUILDDIR)/btls-$(1)/Makefile: $$(SRCDIR)/mono/mono/btls/CMakeLists.txt + $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) $$(MINGW_DEPS) +@@ -51,7 +52,7 @@ + $(RM_F) $$(@D)/CMakeCache.txt mkdir -p $$(@D) # wincrypt.h interferes with boringssl definitions, so we prevent its inclusion - cd $$(@D); $$(MINGW_ENV) cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls + cd $$(@D); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-fPIC -D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls - $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) + $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) $$(MINGW_DEPS) +WINEPREFIX=/dev/null $$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/btls-$(1) -@@ -415,7 +416,8 @@ +@@ -105,7 +106,8 @@ # mono native/classlib build - $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(BUILDDIR)/.dir + $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(SRCDIR)/mono.make $(BUILDDIR)/.dir mkdir -p $(@D) - cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server + cd $(@D) && CPPFLAGS_FOR_BTLS="-fPIC" BTLS_CFLAGS="-fPIC" $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server diff --git a/wine-mono.spec b/wine-mono.spec index 5443122..4fcafe7 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,12 +2,13 @@ %{?mingw_package_header} Name: wine-mono -Version: 5.0.0 +Version: 5.1.0 Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 URL: http://wiki.winehq.org/Mono +# https://github.com/madewokherd/wine-mono Source0: https://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}-src.tar.xz # to statically link in winpthreads Patch0: wine-mono-build-static.patch @@ -74,9 +75,17 @@ Windows Mono library required for Wine. pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in +# remove shipped compiler +rm -rf llvm-mingw-20200325-ubuntu-18.04/* +sed -i 's/$CPPFLAGS_FOR_BTLS $btls_cflags/$CPPFLAGS_FOR_BTLS -fPIC $btls_cflags/' mono/configure.ac + %build export BTLS_CFLAGS="-fPIC" export CPPFLAGS_FOR_BTLS="-fPIC" +# Disable LLVM compiler as we do not ship a full, updated MinGW environment. Use GCC instead. +echo "AUTO_LLVM_MINGW=0" > user-config.make +# Disable WpfGfx as it requires LLVM to compile +echo "ENABLE_DOTNET_CORE_WPFGFX=0" >> user-config.make make %{_smp_mflags} image %install @@ -107,6 +116,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Wed Jun 24 2020 Michael Cronenworth - 5.1.0-1 +- version upgrade + * Sun Apr 26 2020 Michael Cronenworth - 5.0.0-1 - version upgrade From 0df7292f5fdbd50cb2c64ebe850269ab7a78b402 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 14:10:02 +0000 Subject: [PATCH 59/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 4fcafe7..453c49c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 5.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -116,6 +116,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 5.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jun 24 2020 Michael Cronenworth - 5.1.0-1 - version upgrade From d51f5bb595becbd22f8b6c2f28a6f3f9ab70eb73 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 10 Oct 2020 11:16:07 -0500 Subject: [PATCH 60/90] Update to 5.1.1 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 353b90a..0fdbc25 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-5.1.0-src.tar.xz +/wine-mono-5.1.1-src.tar.xz diff --git a/sources b/sources index b9e7b5d..bdcbfac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-5.1.0-src.tar.xz) = 92bff1fc934f2a74065cc6899a4d3c1f101586f9a3c86c39d787249d3ac3c5485509a7cef65532716413c179c03d3d424d709d63f3d1773859199e5a4683123f +SHA512 (wine-mono-5.1.1-src.tar.xz) = 9b6e89e043036fbbd44fd9c213d9100478665749c8f6c0aab288f20693128e77a382d0cfa00cfb6dac03668ec6d64065cdaac3fc8e2d4ff3279f3e9ec6d9140d diff --git a/wine-mono.spec b/wine-mono.spec index 4fcafe7..2d0ba55 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 5.1.0 +Version: 5.1.1 Release: 1%{?dist} Summary: Mono library required for Wine @@ -116,6 +116,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Oct 10 2020 Michael Cronenworth - 5.1.1-1 +- version upgrade + * Wed Jun 24 2020 Michael Cronenworth - 5.1.0-1 - version upgrade From 4ac2538eeadc6fa72c461a3d75ffbd4ac9deb1f9 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:56:12 +0000 Subject: [PATCH 61/90] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 288aa43..77e1f68 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -23,6 +23,7 @@ BuildArch: noarch ExcludeArch: %{power64} s390x s390 # 64 +BuildRequires: make BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-headers BuildRequires: mingw64-cpp From 6f13f4b6ab5508eca1285b3adbff51fc6fd90dd0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:31:09 +0000 Subject: [PATCH 62/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 77e1f68..9dd256e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 5.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -117,6 +117,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 5.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Oct 10 2020 Michael Cronenworth - 5.1.1-1 - version upgrade From 111a18e13772bd24697d7f5d77c37deac48c82b7 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sat, 13 Feb 2021 11:01:42 -0600 Subject: [PATCH 63/90] Update to 6.0.0 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0fdbc25..c17fcef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-5.1.1-src.tar.xz +/wine-mono-6.0.0-src.tar.xz diff --git a/sources b/sources index bdcbfac..d380cc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-5.1.1-src.tar.xz) = 9b6e89e043036fbbd44fd9c213d9100478665749c8f6c0aab288f20693128e77a382d0cfa00cfb6dac03668ec6d64065cdaac3fc8e2d4ff3279f3e9ec6d9140d +SHA512 (wine-mono-6.0.0-src.tar.xz) = 4dcc48ca12b035bcaa4b1d5b0fd8bfb35c380ca943a402d8d41131aa0615c695820a1d2b3b90b7a91c0e0f2f28d8a3a62d8275d4d3fa5a1d9ceb27eae1719499 diff --git a/wine-mono.spec b/wine-mono.spec index 9dd256e..8676015 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 5.1.1 -Release: 2%{?dist} +Version: 6.0.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -117,6 +117,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Feb 13 2021 Michael Cronenworth - 6.0.0-1 +- version upgrade + * Wed Jan 27 2021 Fedora Release Engineering - 5.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 6686011fc8cc8f64eec881392e1f27683c18412e Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Sun, 11 Apr 2021 14:49:29 -0500 Subject: [PATCH 64/90] Update to 6.1.1 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c17fcef..b300f11 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-6.0.0-src.tar.xz +/wine-mono-6.1.1-src.tar.xz diff --git a/sources b/sources index d380cc0..debf6ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-6.0.0-src.tar.xz) = 4dcc48ca12b035bcaa4b1d5b0fd8bfb35c380ca943a402d8d41131aa0615c695820a1d2b3b90b7a91c0e0f2f28d8a3a62d8275d4d3fa5a1d9ceb27eae1719499 +SHA512 (wine-mono-6.1.1-src.tar.xz) = 015308c9988657cf5de2c373d1979924460b5513da99ab26df654bdc8273299caee17dcd48699e6a2489378a9328624d64ecf318b71a0c7ce61f01e195e907f1 diff --git a/wine-mono.spec b/wine-mono.spec index 8676015..8ee2e29 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 6.0.0 +Version: 6.1.1 Release: 1%{?dist} Summary: Mono library required for Wine @@ -117,6 +117,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sun Apr 11 2021 Michael Cronenworth - 6.1.1-1 +- version upgrade + * Sat Feb 13 2021 Michael Cronenworth - 6.0.0-1 - version upgrade From 8ec92b12196bf09e99b3dbd5f13ce1349eeb8c4e Mon Sep 17 00:00:00 2001 From: Tomas Hrnciar Date: Mon, 19 Apr 2021 13:18:32 +0200 Subject: [PATCH 65/90] BuildRequire setuptools explicitly See https://fedoraproject.org/wiki/Changes/Reduce_dependencies_on_python3-setuptools --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 8ee2e29..ad5385e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -51,6 +51,7 @@ BuildRequires: gettext BuildRequires: libgdiplus BuildRequires: wine-core BuildRequires: /usr/bin/python +BuildRequires: python3-setuptools BuildRequires: /usr/bin/pathfix.py # https://bugs.winehq.org/show_bug.cgi?id=48937 From abfa5cdecf4a23e851f19a935d78bd844d700214 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 7 Jun 2021 10:32:41 -0500 Subject: [PATCH 66/90] Update to 6.2.0 --- .gitignore | 2 +- sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b300f11..418b7e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-6.1.1-src.tar.xz +/wine-mono-6.2.0-src.tar.xz diff --git a/sources b/sources index debf6ff..e2ad727 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-6.1.1-src.tar.xz) = 015308c9988657cf5de2c373d1979924460b5513da99ab26df654bdc8273299caee17dcd48699e6a2489378a9328624d64ecf318b71a0c7ce61f01e195e907f1 +SHA512 (wine-mono-6.2.0-src.tar.xz) = ab01e872b4312e1c1c36d86e781b52e45a1a5792504883e8de95148ba3b855ee4934ac5736e3225a6dde0edb4b83153326d8928785c35159492e4ee5e8981047 diff --git a/wine-mono.spec b/wine-mono.spec index ad5385e..1658b47 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 6.1.1 +Version: 6.2.0 Release: 1%{?dist} Summary: Mono library required for Wine @@ -118,6 +118,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Jun 07 2021 Michael Cronenworth - 6.2.0-1 +- version upgrade + * Sun Apr 11 2021 Michael Cronenworth - 6.1.1-1 - version upgrade From 14ad7b3b7f1e50e91ac5eba66b0ba5bb5bbd6411 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:57:57 +0000 Subject: [PATCH 67/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 1658b47..816747a 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 6.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -118,6 +118,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 6.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Jun 07 2021 Michael Cronenworth - 6.2.0-1 - version upgrade From eca1e1bfc60f9e3729abaf7d6c9a40efca7e3556 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 30 Aug 2021 12:47:22 -0500 Subject: [PATCH 68/90] Update to 6.3.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-static.patch | 11 +++++------ wine-mono-crlf.patch | 8 ++++---- wine-mono.spec | 9 +++++++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 418b7e1..917b657 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-6.2.0-src.tar.xz +/wine-mono-6.3.0-src.tar.xz diff --git a/sources b/sources index e2ad727..4d9b784 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-6.2.0-src.tar.xz) = ab01e872b4312e1c1c36d86e781b52e45a1a5792504883e8de95148ba3b855ee4934ac5736e3225a6dde0edb4b83153326d8928785c35159492e4ee5e8981047 +SHA512 (wine-mono-6.3.0-src.tar.xz) = c9f99e2a96573cce2c46740cef4a6683f75503035e2c026f1ba712ba055bb098b18a539d96c24a369c86fc9817c0a6a241fb9d83e7ae655dd019166adfd6a69b diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index 0c5ba5e..f34c622 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -4,8 +4,8 @@ # libmono dll's $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(SRCDIR)/mono.make $$(BUILDDIR)/.dir $$(MINGW_DEPS) mkdir -p $$(@D) -- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS="-gdwarf-2 -gstrict-dwarf" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm -+ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CPPFLAGS="-gdwarf-2 -gstrict-dwarf -fPIC" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm +- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2}" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2}" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm ++ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2} -fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2} -fPIC" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm + sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $$(BUILDDIR)/mono-$(1)/libtool sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool @@ -14,18 +14,17 @@ $(RM_F) $$(@D)/CMakeCache.txt mkdir -p $$(@D) # wincrypt.h interferes with boringssl definitions, so we prevent its inclusion -- cd $$(@D); $$(MINGW_ENV) cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls -+ cd $$(@D); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-fPIC -D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls +- cd $$(@D); $$(MINGW_ENV) CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc $$(PDB_CFLAGS_$(1))' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls ++ cd $$(@D); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-fPIC -D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc $$(PDB_CFLAGS_$(1))' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) $$(MINGW_DEPS) +WINEPREFIX=/dev/null $$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/btls-$(1) -@@ -105,7 +106,8 @@ +@@ -105,7 +106,7 @@ # mono native/classlib build $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(SRCDIR)/mono.make $(BUILDDIR)/.dir mkdir -p $(@D) - cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server + cd $(@D) && CPPFLAGS_FOR_BTLS="-fPIC" BTLS_CFLAGS="-fPIC" $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server -+ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $(@D)/libtool $(BUILDDIR)/mono-unix/mono/lib/libSystem.Native.so: $(BUILDDIR)/mono-unix/Makefile $(MONO_LIBNATIVE_SRCS) mkdir -p $(@D) diff --git a/wine-mono-crlf.patch b/wine-mono-crlf.patch index 14caf95..4d65ab1 100644 --- a/wine-mono-crlf.patch +++ b/wine-mono-crlf.patch @@ -1,11 +1,11 @@ --- a/tools/build-msi-tables.sh 2020-04-10 11:06:24.000000000 -0500 +++ b/tools/build-msi-tables.sh 2020-04-27 10:03:20.835241179 -0500 @@ -7,7 +7,7 @@ - mkdir -p ${TABLEDIR} - cp ${TABLESRCDIR}/*.idt ${TABLEDIR} + mkdir -p "${TABLEDIR}" + cp "${TABLESRCDIR}"/*.idt "${TABLEDIR}" -IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}"` +IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}" | dos2unix` - cd "${IMAGEDIR}" - + CONTENTDIR="${TABLEDIR}/cab_contents" + rm -rf "${CONTENTDIR}" diff --git a/wine-mono.spec b/wine-mono.spec index 816747a..cbfb9d3 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 6.2.0 -Release: 2%{?dist} +Version: 6.3.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -80,6 +80,8 @@ sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am. # remove shipped compiler rm -rf llvm-mingw-20200325-ubuntu-18.04/* sed -i 's/$CPPFLAGS_FOR_BTLS $btls_cflags/$CPPFLAGS_FOR_BTLS -fPIC $btls_cflags/' mono/configure.ac +sed -i 's/-gcodeview //' GNUmakefile +sed -i 's/-Wl,-pdb=//' GNUmakefile %build export BTLS_CFLAGS="-fPIC" @@ -118,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Aug 30 2021 Michael Cronenworth - 6.3.0-1 +- version upgrade + * Fri Jul 23 2021 Fedora Release Engineering - 6.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 27b18f1a15af709d67d21243c115ef19d14c2c05 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 4 Oct 2021 14:36:33 -0500 Subject: [PATCH 69/90] Update to 6.4.0 --- .gitignore | 2 +- sources | 2 +- wine-mono-build-static.patch | 11 +++++------ wine-mono.spec | 5 ++++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 917b657..e3ffc10 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/wine-mono-6.3.0-src.tar.xz +/wine-mono-6.4.0-src.tar.xz diff --git a/sources b/sources index 4d9b784..e7e1aba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-6.3.0-src.tar.xz) = c9f99e2a96573cce2c46740cef4a6683f75503035e2c026f1ba712ba055bb098b18a539d96c24a369c86fc9817c0a6a241fb9d83e7ae655dd019166adfd6a69b +SHA512 (wine-mono-6.4.0-src.tar.xz) = 1f49a4a01e55c047408097d9e47d9b8f56f296b08e24e8e8cd47ebabc8af142c2041e63afdb41c5e826f0a46610eca56f8295b6c86cdf97cef9cd8a2c42b79df diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch index f34c622..ebbc941 100644 --- a/wine-mono-build-static.patch +++ b/wine-mono-build-static.patch @@ -1,16 +1,15 @@ --- wine-mono-5.0.0/mono.make.orig 2020-06-01 11:47:42.000000000 -0500 +++ wine-mono-5.0.0/mono.make 2020-06-24 14:47:01.905533172 -0500 -@@ -15,7 +15,8 @@ +@@ -15,7 +15,7 @@ # libmono dll's $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(SRCDIR)/mono.make $$(BUILDDIR)/.dir $$(MINGW_DEPS) mkdir -p $$(@D) -- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2}" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2}" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm -+ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2} -fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2} -fPIC" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm -+ sed -e 's+compiler_flags="-specs=/usr/lib/rpm/redhat/redhat-hardened-ld"+compiler_flags="-static"+' -i $$(BUILDDIR)/mono-$(1)/libtool +- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2}" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2}" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm mono_feature_disable_cleanup=yes ++ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2} -fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2} -fPIC" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm mono_feature_disable_cleanup=yes sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) $$(MINGW_DEPS) -@@ -51,7 +52,7 @@ +@@ -51,7 +51,7 @@ $(RM_F) $$(@D)/CMakeCache.txt mkdir -p $$(@D) # wincrypt.h interferes with boringssl definitions, so we prevent its inclusion @@ -19,7 +18,7 @@ $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) $$(MINGW_DEPS) +WINEPREFIX=/dev/null $$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/btls-$(1) -@@ -105,7 +106,7 @@ +@@ -105,7 +105,7 @@ # mono native/classlib build $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(SRCDIR)/mono.make $(BUILDDIR)/.dir mkdir -p $(@D) diff --git a/wine-mono.spec b/wine-mono.spec index cbfb9d3..5566d88 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 6.3.0 +Version: 6.4.0 Release: 1%{?dist} Summary: Mono library required for Wine @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Oct 04 2021 Michael Cronenworth - 6.4.0-1 +- version upgrade + * Mon Aug 30 2021 Michael Cronenworth - 6.3.0-1 - version upgrade From 55abe78305601e1c4e8f07deffbb85a02c566965 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 20 Dec 2021 17:21:10 -0600 Subject: [PATCH 70/90] Update to 7.0.0 --- .gitignore | 1 + sources | 2 +- wine-mono.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e3ffc10..f011428 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /wine-mono-6.4.0-src.tar.xz +/wine-mono-7.0.0-src.tar.xz diff --git a/sources b/sources index e7e1aba..14ed9ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-6.4.0-src.tar.xz) = 1f49a4a01e55c047408097d9e47d9b8f56f296b08e24e8e8cd47ebabc8af142c2041e63afdb41c5e826f0a46610eca56f8295b6c86cdf97cef9cd8a2c42b79df +SHA512 (wine-mono-7.0.0-src.tar.xz) = 510638f96bc0c9a4d9adba77dc3f42c767a4e2e0e795ddf9e54e8ba76c66c5508099caa62dbfd36f86d7b82ffabd87b86848c26d1412859db3caf775033b4855 diff --git a/wine-mono.spec b/wine-mono.spec index 5566d88..9aef487 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,7 +2,7 @@ %{?mingw_package_header} Name: wine-mono -Version: 6.4.0 +Version: 7.0.0 Release: 1%{?dist} Summary: Mono library required for Wine @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Dec 20 2021 Michael Cronenworth - 7.0.0-1 +- version upgrade + * Mon Oct 04 2021 Michael Cronenworth - 6.4.0-1 - version upgrade From ad7de292dc572b32756e8825267d6365a62972c6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:29:36 +0000 Subject: [PATCH 71/90] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 9aef487..09dcb8f 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,7 +3,7 @@ Name: wine-mono Version: 7.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 7.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Mon Dec 20 2021 Michael Cronenworth - 7.0.0-1 - version upgrade From 0f50c71c6d600fecada81c16ad50d80f919d95f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 29 Jan 2022 16:26:50 +0100 Subject: [PATCH 72/90] Update to 7.1.1 --- .gitignore | 3 +-- sources | 2 +- wine-mono.spec | 11 +++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f011428..1ba1828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/wine-mono-6.4.0-src.tar.xz -/wine-mono-7.0.0-src.tar.xz +/wine-mono-7.*-src.tar.xz diff --git a/sources b/sources index 14ed9ef..f56e3c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.0.0-src.tar.xz) = 510638f96bc0c9a4d9adba77dc3f42c767a4e2e0e795ddf9e54e8ba76c66c5508099caa62dbfd36f86d7b82ffabd87b86848c26d1412859db3caf775033b4855 +SHA512 (wine-mono-7.1.1-src.tar.xz) = 33864619f9194faff0aecdd6673791c563edca25aaad25ae956dab611b978d01cf37c54e473095d50ac553e21eb170160d387f85f4c094d0e77080eb200a7807 diff --git a/wine-mono.spec b/wine-mono.spec index 09dcb8f..3aa164e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.0.0 -Release: 2%{?dist} +Version: 7.1.1 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -23,7 +23,6 @@ BuildArch: noarch ExcludeArch: %{power64} s390x s390 # 64 -BuildRequires: make BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-headers BuildRequires: mingw64-cpp @@ -46,6 +45,7 @@ BuildRequires: cmake BuildRequires: dos2unix BuildRequires: gcc-c++ BuildRequires: libtool +BuildRequires: make BuildRequires: pkgconfig BuildRequires: gettext BuildRequires: libgdiplus @@ -90,7 +90,7 @@ export CPPFLAGS_FOR_BTLS="-fPIC" echo "AUTO_LLVM_MINGW=0" > user-config.make # Disable WpfGfx as it requires LLVM to compile echo "ENABLE_DOTNET_CORE_WPFGFX=0" >> user-config.make -make %{_smp_mflags} image +%make_build image %install mkdir -p %{buildroot}%{_datadir}/wine/mono/wine-mono-%{version}/ @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jan 29 2022 Björn Esser - 7.1.1-1 +- version upgrade + * Sat Jan 22 2022 Fedora Release Engineering - 7.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From c0ce8908dec2a592527bccae97a9076f03728441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 31 Jan 2022 19:27:03 +0100 Subject: [PATCH 73/90] Revert "Update to 7.1.1" This reverts commit 0f50c71c6d600fecada81c16ad50d80f919d95f6. --- .gitignore | 3 ++- sources | 2 +- wine-mono.spec | 7 ++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 1ba1828..f011428 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/wine-mono-7.*-src.tar.xz +/wine-mono-6.4.0-src.tar.xz +/wine-mono-7.0.0-src.tar.xz diff --git a/sources b/sources index f56e3c0..14ed9ef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.1.1-src.tar.xz) = 33864619f9194faff0aecdd6673791c563edca25aaad25ae956dab611b978d01cf37c54e473095d50ac553e21eb170160d387f85f4c094d0e77080eb200a7807 +SHA512 (wine-mono-7.0.0-src.tar.xz) = 510638f96bc0c9a4d9adba77dc3f42c767a4e2e0e795ddf9e54e8ba76c66c5508099caa62dbfd36f86d7b82ffabd87b86848c26d1412859db3caf775033b4855 diff --git a/wine-mono.spec b/wine-mono.spec index 3aa164e..5cfc7d9 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.1.1 -Release: 1%{?dist} +Version: 7.0.0 +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -120,9 +120,6 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog -* Sat Jan 29 2022 Björn Esser - 7.1.1-1 -- version upgrade - * Sat Jan 22 2022 Fedora Release Engineering - 7.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 3188137b69b1230a0536e0b7eee94b111f8adf37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 13 Feb 2022 11:40:08 +0100 Subject: [PATCH 74/90] Update to 7.1.1 --- .gitignore | 3 +-- sources | 2 +- wine-mono.spec | 7 +++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f011428..6451b75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/wine-mono-6.4.0-src.tar.xz -/wine-mono-7.0.0-src.tar.xz +/wine-mono-*-src.tar.xz diff --git a/sources b/sources index 14ed9ef..f56e3c0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.0.0-src.tar.xz) = 510638f96bc0c9a4d9adba77dc3f42c767a4e2e0e795ddf9e54e8ba76c66c5508099caa62dbfd36f86d7b82ffabd87b86848c26d1412859db3caf775033b4855 +SHA512 (wine-mono-7.1.1-src.tar.xz) = 33864619f9194faff0aecdd6673791c563edca25aaad25ae956dab611b978d01cf37c54e473095d50ac553e21eb170160d387f85f4c094d0e77080eb200a7807 diff --git a/wine-mono.spec b/wine-mono.spec index 5cfc7d9..3aa164e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -2,8 +2,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.0.0 -Release: 2%{?dist} +Version: 7.1.1 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jan 29 2022 Björn Esser - 7.1.1-1 +- version upgrade + * Sat Jan 22 2022 Fedora Release Engineering - 7.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 495f7c67131824bb7f986cddd7f2f59cc9eaccba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 13 Feb 2022 12:03:59 +0100 Subject: [PATCH 75/90] Do not set buildflags automatically --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 3aa164e..18ac8f3 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,3 +1,4 @@ +%undefine _auto_set_build_flags %undefine _hardened_build %{?mingw_package_header} From 141adc3d87d3aae2d8fd2e5d07716d142b081290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 13 Feb 2022 13:34:33 +0100 Subject: [PATCH 76/90] Explicitly disable debuginfo --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 18ac8f3..35fee98 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,5 +1,6 @@ %undefine _auto_set_build_flags %undefine _hardened_build +%global debug_package %{nil} %{?mingw_package_header} Name: wine-mono From bb2315357d86b620cff4ea396ad3822bd661aa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Thu, 17 Feb 2022 22:18:49 +0100 Subject: [PATCH 77/90] Revert "Explicitly disable debuginfo" This reverts commit 141adc3d87d3aae2d8fd2e5d07716d142b081290. --- wine-mono.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 35fee98..18ac8f3 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -1,6 +1,5 @@ %undefine _auto_set_build_flags %undefine _hardened_build -%global debug_package %{nil} %{?mingw_package_header} Name: wine-mono From 5c99bb4fd77e164dee2cb257d9a6a07b2d473b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Thu, 17 Feb 2022 22:20:06 +0100 Subject: [PATCH 78/90] Also disable debuginfo for mingw_win64 --- wine-mono.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wine-mono.spec b/wine-mono.spec index 18ac8f3..8858876 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -67,6 +67,7 @@ Requires: wine-filesystem Windows Mono library required for Wine. %global mingw_build_win32 0 +%global mingw_build_win64 0 %{?mingw_debug_package} %prep From 95e7b9653b86cea266518c9c97332a825f46b8bd Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 25 Mar 2022 15:00:44 +0100 Subject: [PATCH 79/90] Rebuild with mingw-gcc-12 --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 8858876..b9d888e 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -4,7 +4,7 @@ Name: wine-mono Version: 7.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -122,6 +122,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Fri Mar 25 2022 Sandro Mani - 7.1.1-2 +- Rebuild with mingw-gcc-12 + * Sat Jan 29 2022 Björn Esser - 7.1.1-1 - version upgrade From 5ea45bfc5633ed6f986ee9774bd6dd04b0a583b4 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 6 Jun 2022 10:20:56 -0500 Subject: [PATCH 80/90] Update to 7.3.0 --- sources | 2 +- wine-mono.spec | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f56e3c0..76aaa06 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.1.1-src.tar.xz) = 33864619f9194faff0aecdd6673791c563edca25aaad25ae956dab611b978d01cf37c54e473095d50ac553e21eb170160d387f85f4c094d0e77080eb200a7807 +SHA512 (wine-mono-7.3.0-src.tar.xz) = effee6d7c6dfa9f0c6c1bca868dba258094cbb85ad2ffb100e5c94365c9eba6c542825f37f1f8a50f8296b971a13fe068838e358a33307518556466a69d89c78 diff --git a/wine-mono.spec b/wine-mono.spec index b9d888e..a6dfd46 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,8 +3,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.1.1 -Release: 2%{?dist} +Version: 7.3.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -17,6 +17,8 @@ Patch0: wine-mono-build-static.patch # https://bugs.winehq.org/show_bug.cgi?id=48937 # fixed in wine 5.7 Patch1: wine-mono-crlf.patch +# Probably a GCC 12 thing +Patch2: wine-mono-7.3.0-iconv.patch # see git://github.com/madewokherd/wine-mono @@ -74,6 +76,7 @@ Windows Mono library required for Wine. %setup -q %patch0 -p1 -b.static %patch1 -p1 -b.crlf +%patch2 -p1 -b.iconv # Fix all Python shebangs pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . @@ -122,6 +125,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Jun 06 2022 Michael Cronenworth - 7.3.0-1 +- version upgrade + * Fri Mar 25 2022 Sandro Mani - 7.1.1-2 - Rebuild with mingw-gcc-12 From d68420aecece88ddf942e8f5acafcca790700527 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 6 Jun 2022 10:38:43 -0500 Subject: [PATCH 81/90] Add missing patch --- wine-mono-7.3.0-iconv.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 wine-mono-7.3.0-iconv.patch diff --git a/wine-mono-7.3.0-iconv.patch b/wine-mono-7.3.0-iconv.patch new file mode 100644 index 0000000..3f351ec --- /dev/null +++ b/wine-mono-7.3.0-iconv.patch @@ -0,0 +1,16 @@ +--- a/mono/mono/eglib/giconv.c 2022-05-31 13:21:00.000000000 -0500 ++++ b/mono/mono/eglib/giconv.c 2022-06-06 09:50:36.251364772 -0500 +@@ -196,12 +196,8 @@ + } else { + outleftptr = NULL; + } +-// AIX needs this for C++ and GNU iconv +-#if defined(__NetBSD__) || defined(_AIX) ++ + return iconv (cd->cd, (const gchar **)inbytes, inleftptr, outbytes, outleftptr); +-#else +- return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr); +-#endif + } + #endif + From d343b2e02dc6efa72ff900859ae1f3382ee0d28c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:26:51 +0000 Subject: [PATCH 82/90] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index a6dfd46..580175c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -4,7 +4,7 @@ Name: wine-mono Version: 7.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -125,6 +125,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 7.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 06 2022 Michael Cronenworth - 7.3.0-1 - version upgrade From 5ce0310a6e8ce485418f18f6a35b4a099bcecfe2 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 31 Oct 2022 21:37:22 -0500 Subject: [PATCH 83/90] Update to 7.4.0 --- sources | 2 +- wine-mono.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 76aaa06..7753f76 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.3.0-src.tar.xz) = effee6d7c6dfa9f0c6c1bca868dba258094cbb85ad2ffb100e5c94365c9eba6c542825f37f1f8a50f8296b971a13fe068838e358a33307518556466a69d89c78 +SHA512 (wine-mono-7.4.0-src.tar.xz) = 8f8cfd9f84e3979cbb7bcc1b90f7bfef8bae10128da2e0f3ebc982992c832e29dae81b8dd2c401eac9832f22b565aba851643f2bba8688e57c0e90f283e8a70e diff --git a/wine-mono.spec b/wine-mono.spec index 580175c..16ea337 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,8 +3,8 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.3.0 -Release: 2%{?dist} +Version: 7.4.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -125,6 +125,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Oct 31 2022 Michael Cronenworth - 7.4.0-1 +- version upgrade + * Sat Jul 23 2022 Fedora Release Engineering - 7.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 237649e0d3f58a99133bfd713a4efa86dcb2180d Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 1 Nov 2022 07:21:11 +0100 Subject: [PATCH 84/90] Switch from pathfix.py to %py3_shebang_fix For more info see https://fedoraproject.org/wiki/Changes/Python3.12#pathfix.py_tool_will_be_removed --- wine-mono.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wine-mono.spec b/wine-mono.spec index 580175c..e72456a 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -55,7 +55,7 @@ BuildRequires: libgdiplus BuildRequires: wine-core BuildRequires: /usr/bin/python BuildRequires: python3-setuptools -BuildRequires: /usr/bin/pathfix.py +BuildRequires: python3-devel # https://bugs.winehq.org/show_bug.cgi?id=48937 # fixed in wine 5.7 @@ -79,7 +79,7 @@ Windows Mono library required for Wine. %patch2 -p1 -b.iconv # Fix all Python shebangs -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . +%py3_shebang_fix . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in # remove shipped compiler From c62f458eb1ff216b05416f29dc234cc25aa5624b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:51:02 +0000 Subject: [PATCH 85/90] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 2448367..a504e6d 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -4,7 +4,7 @@ Name: wine-mono Version: 7.4.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -125,6 +125,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 7.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Mon Oct 31 2022 Michael Cronenworth - 7.4.0-1 - version upgrade From 349bce080fd86409b1af137b5842e4ce1b25dd58 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 19 Jun 2023 23:04:52 -0500 Subject: [PATCH 86/90] Update to 8.0.0 --- sources | 2 +- wine-mono.spec | 26 ++++++++++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sources b/sources index 7753f76..7cbaa2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-7.4.0-src.tar.xz) = 8f8cfd9f84e3979cbb7bcc1b90f7bfef8bae10128da2e0f3ebc982992c832e29dae81b8dd2c401eac9832f22b565aba851643f2bba8688e57c0e90f283e8a70e +SHA512 (wine-mono-8.0.0-src.tar.xz) = 6db05a13bd72679143f10113a5f53b6650f42b9d5af5af932d901751d3c7ddbf2f0ac3e7ffa3c848fc5b2972c085ccd0855ad3849c9aa74ebee9335d4ca7f3c8 diff --git a/wine-mono.spec b/wine-mono.spec index a504e6d..33980af 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,22 +3,15 @@ %{?mingw_package_header} Name: wine-mono -Version: 7.4.0 -Release: 2%{?dist} +Version: 8.0.0 +Release: 1%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 URL: http://wiki.winehq.org/Mono # https://github.com/madewokherd/wine-mono Source0: https://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}-src.tar.xz -# to statically link in winpthreads -Patch0: wine-mono-build-static.patch - -# https://bugs.winehq.org/show_bug.cgi?id=48937 -# fixed in wine 5.7 -Patch1: wine-mono-crlf.patch -# Probably a GCC 12 thing -Patch2: wine-mono-7.3.0-iconv.patch +Patch0: wine-mono-7.3.0-iconv.patch # see git://github.com/madewokherd/wine-mono @@ -74,20 +67,22 @@ Windows Mono library required for Wine. %prep %setup -q -%patch0 -p1 -b.static -%patch1 -p1 -b.crlf -%patch2 -p1 -b.iconv +%patch -P 0 -p1 -b.iconv # Fix all Python shebangs %py3_shebang_fix . sed -i 's/GENMDESC_PRG=python/GENMDESC_PRG=python3/' mono/mono/mini/Makefile.am.in # remove shipped compiler -rm -rf llvm-mingw-20200325-ubuntu-18.04/* +rm -rf llvm-mingw-20210423-ucrt-ubuntu-18.04-x86_64/* sed -i 's/$CPPFLAGS_FOR_BTLS $btls_cflags/$CPPFLAGS_FOR_BTLS -fPIC $btls_cflags/' mono/configure.ac sed -i 's/-gcodeview //' GNUmakefile sed -i 's/-Wl,-pdb=//' GNUmakefile +# workaround coreutils 9.2 behavior change to "cp -n" option (RHBZ#2208129) +# https://github.com/madewokherd/wine-mono/issues/164 +sed -i 's~cp -n $(IMAGEDIR)/lib/mono/4.8-api/\*.dll $(IMAGEDIR)/lib/mono/4.5/~cp -n $(IMAGEDIR)/lib/mono/4.8-api/\*.dll $(IMAGEDIR)/lib/mono/4.5/ || true~' mono.make + %build export BTLS_CFLAGS="-fPIC" export CPPFLAGS_FOR_BTLS="-fPIC" @@ -125,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Jun 19 2023 Michael Cronenworth - 8.0.0-1 +- version upgrade + * Sat Jan 21 2023 Fedora Release Engineering - 7.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 3b725cc4b00427875cceaccee7d5bf05acf0c5ff Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 19 Jun 2023 23:05:42 -0500 Subject: [PATCH 87/90] Remove obsolete patches --- wine-mono-build-static.patch | 29 ----------------------------- wine-mono-crlf.patch | 11 ----------- 2 files changed, 40 deletions(-) delete mode 100644 wine-mono-build-static.patch delete mode 100644 wine-mono-crlf.patch diff --git a/wine-mono-build-static.patch b/wine-mono-build-static.patch deleted file mode 100644 index ebbc941..0000000 --- a/wine-mono-build-static.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- wine-mono-5.0.0/mono.make.orig 2020-06-01 11:47:42.000000000 -0500 -+++ wine-mono-5.0.0/mono.make 2020-06-24 14:47:01.905533172 -0500 -@@ -15,7 +15,7 @@ - # libmono dll's - $$(BUILDDIR)/mono-$(1)/Makefile: $$(SRCDIR)/mono/configure $$(SRCDIR)/mono.make $$(BUILDDIR)/.dir $$(MINGW_DEPS) - mkdir -p $$(@D) -- cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2}" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2}" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm mono_feature_disable_cleanup=yes -+ cd $$(BUILDDIR)/mono-$(1); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CFLAGS:--g -O2} -fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1)) $$$${CXXFLAGS:--g -O2} -fPIC" LDFLAGS="$$(PDB_LDFLAGS_$(1))" $$(SRCDIR_ABS)/mono/configure --prefix="$$(BUILDDIR_ABS)/build-cross-$(1)-install" --build=$$(shell $$(SRCDIR)/mono/config.guess) --target=$$(MINGW_$(1)) --host=$$(MINGW_$(1)) --with-tls=none --disable-mcs-build --enable-win32-dllmain=yes --with-libgc-threads=win32 PKG_CONFIG=false mono_cv_clang=no --disable-boehm mono_feature_disable_cleanup=yes - sed -e 's/-lgcc_s//' -i $$(BUILDDIR)/mono-$(1)/libtool - - $$(BUILDDIR)/mono-$(1)/.built: $$(BUILDDIR)/mono-$(1)/Makefile $$(MONO_MONO_SRCS) $$(MINGW_DEPS) -@@ -51,7 +51,7 @@ - $(RM_F) $$(@D)/CMakeCache.txt - mkdir -p $$(@D) - # wincrypt.h interferes with boringssl definitions, so we prevent its inclusion -- cd $$(@D); $$(MINGW_ENV) CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc $$(PDB_CFLAGS_$(1))' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls -+ cd $$(@D); $$(MINGW_ENV) CPPFLAGS_FOR_BTLS="-fPIC" CXXFLAGS="$$(PDB_CFLAGS_$(1))" LDFLAGS="$$(PDB_LDFLAGS_$(1))" cmake -DCMAKE_TOOLCHAIN_FILE="$$(SRCDIR_ABS)/toolchain-$(1).cmake" -DCMAKE_C_COMPILER=$$(MINGW_$(1))-gcc -DCMAKE_C_FLAGS='-fPIC -D__WINCRYPT_H__ -D_WIN32_WINNT=0x0600 -static-libgcc $$(PDB_CFLAGS_$(1))' -DCMAKE_CXX_COMPILER=$$(MINGW_$(1))-g++ -DOPENSSL_NO_ASM=1 -DBTLS_ROOT="$$(SRCDIR_ABS)/mono/external/boringssl" -DBUILD_SHARED_LIBS=1 $$(SRCDIR_ABS)/mono/mono/btls - - $$(BUILDDIR)/btls-$(1)/.built: $$(BUILDDIR)/btls-$(1)/Makefile $$(MONO_BTLS_SRCS) $$(MINGW_DEPS) - +WINEPREFIX=/dev/null $$(MINGW_ENV) $$(MAKE) -C $$(BUILDDIR)/btls-$(1) -@@ -105,7 +105,7 @@ - # mono native/classlib build - $(BUILDDIR)/mono-unix/Makefile: $(SRCDIR)/mono/configure $(SRCDIR)/mono.make $(BUILDDIR)/.dir - mkdir -p $(@D) -- cd $(@D) && $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server -+ cd $(@D) && CPPFLAGS_FOR_BTLS="-fPIC" BTLS_CFLAGS="-fPIC" $(SRCDIR_ABS)/mono/configure --prefix="$(BUILDDIR_ABS)/mono-unix-install" --with-mcs-docs=no --disable-system-aot --without-compiler-server - - $(BUILDDIR)/mono-unix/mono/lib/libSystem.Native.so: $(BUILDDIR)/mono-unix/Makefile $(MONO_LIBNATIVE_SRCS) - mkdir -p $(@D) diff --git a/wine-mono-crlf.patch b/wine-mono-crlf.patch deleted file mode 100644 index 4d65ab1..0000000 --- a/wine-mono-crlf.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tools/build-msi-tables.sh 2020-04-10 11:06:24.000000000 -0500 -+++ b/tools/build-msi-tables.sh 2020-04-27 10:03:20.835241179 -0500 -@@ -7,7 +7,7 @@ - mkdir -p "${TABLEDIR}" - cp "${TABLESRCDIR}"/*.idt "${TABLEDIR}" - --IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}"` -+IMAGECABWINPATH=`${WINE} winepath -w "${CABFILENAME}" | dos2unix` - - CONTENTDIR="${TABLEDIR}/cab_contents" - rm -rf "${CONTENTDIR}" From fd7833f92ff07dfa9cbbf8733edc39d7cb45165e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 18:14:11 +0000 Subject: [PATCH 88/90] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- wine-mono.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wine-mono.spec b/wine-mono.spec index 33980af..f90230c 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -4,7 +4,7 @@ Name: wine-mono Version: 8.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Mono library required for Wine License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 8.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jun 19 2023 Michael Cronenworth - 8.0.0-1 - version upgrade From ccd3189dc30857d9bfa913b253bc1f14c2e1de23 Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Mon, 30 Oct 2023 11:39:38 -0500 Subject: [PATCH 89/90] Update to 8.1.0 --- sources | 2 +- wine-mono.spec | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sources b/sources index 7cbaa2d..db45d41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (wine-mono-8.0.0-src.tar.xz) = 6db05a13bd72679143f10113a5f53b6650f42b9d5af5af932d901751d3c7ddbf2f0ac3e7ffa3c848fc5b2972c085ccd0855ad3849c9aa74ebee9335d4ca7f3c8 +SHA512 (wine-mono-8.1.0-src.tar.xz) = 90620b1d9a8af6b6077e96f0cf0b1829c6c4da3df1775c1455583c9121bb0be1fd79849461976ae561354eec8cb25d007f443c9278b34099046e837f45a3f3e0 diff --git a/wine-mono.spec b/wine-mono.spec index f90230c..3c49cce 100644 --- a/wine-mono.spec +++ b/wine-mono.spec @@ -3,11 +3,11 @@ %{?mingw_package_header} Name: wine-mono -Version: 8.0.0 -Release: 2%{?dist} +Version: 8.1.0 +Release: 1%{?dist} Summary: Mono library required for Wine -License: GPLv2 and LGPLv2 and MIT and BSD and MS-PL and MPLv1.1 +License: GPL-2.0-or-later AND LGPL-2.1-only AND MIT AND BSD-4-Clause-UC AND MS-PL AND MPL-1.1 URL: http://wiki.winehq.org/Mono # https://github.com/madewokherd/wine-mono Source0: https://dl.winehq.org/wine/wine-mono/%{version}/wine-mono-%{version}-src.tar.xz @@ -120,6 +120,9 @@ cp mono-basic/LICENSE mono-basic-LICENSE %{_datadir}/wine/mono/wine-mono-%{version}/ %changelog +* Mon Oct 30 2023 Michael Cronenworth - 8.1.0-1 +- version upgrade + * Sat Jul 22 2023 Fedora Release Engineering - 8.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 06243d4d7fec047c6c3e25e8ff4077635dad2f99 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 31 Oct 2023 00:29:01 +0300 Subject: [PATCH 90/90] Remove unnecessary files --- sources | 1 - 1 file changed, 1 deletion(-) delete mode 100644 sources diff --git a/sources b/sources deleted file mode 100644 index db45d41..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (wine-mono-8.1.0-src.tar.xz) = 90620b1d9a8af6b6077e96f0cf0b1829c6c4da3df1775c1455583c9121bb0be1fd79849461976ae561354eec8cb25d007f443c9278b34099046e837f45a3f3e0