[vlc-devel] [PATCH v2 3/7] contrib: gmp: backport fix for t-sqrlo test

Marvin Scholz epirat07 at gmail.com
Thu Aug 6 00:07:21 CEST 2020


This makes it possible to run make check successfully to better verify
that other patches do not break things.
---
 contrib/src/gmp/rules.mak                     |  1 +
 ...pn-t-sqrlo.c-Initialise-scratch-area.patch | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 contrib/src/gmp/tests-mpn-t-sqrlo.c-Initialise-scratch-area.patch

diff --git a/contrib/src/gmp/rules.mak b/contrib/src/gmp/rules.mak
index ed34d2038e4..8d5d03ffbe3 100644
--- a/contrib/src/gmp/rules.mak
+++ b/contrib/src/gmp/rules.mak
@@ -35,6 +35,7 @@ gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
 	$(APPLY) $(SRC)/gmp/ppc64.patch
 	$(APPLY) $(SRC)/gmp/win-arm64.patch
 	$(APPLY) $(SRC)/gmp/gmp-fix-asm-detection.patch
+	$(APPLY) $(SRC)/gmp/tests-mpn-t-sqrlo.c-Initialise-scratch-area.patch
 	# do not try the cross compiler to detect the build compiler
 	cd $(UNPACK_DIR) && sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc c89 c99/' acinclude.m4
 	$(MOVE)
diff --git a/contrib/src/gmp/tests-mpn-t-sqrlo.c-Initialise-scratch-area.patch b/contrib/src/gmp/tests-mpn-t-sqrlo.c-Initialise-scratch-area.patch
new file mode 100644
index 00000000000..78b3c1f7087
--- /dev/null
+++ b/contrib/src/gmp/tests-mpn-t-sqrlo.c-Initialise-scratch-area.patch
@@ -0,0 +1,27 @@
+From 02ee915921172c416fe0ccf7c6322b77196cdaa1 Mon Sep 17 00:00:00 2001
+From: Marco Bodrato <bodrato at mail.dm.unipi.it>
+Date: Fri, 20 Sep 2019 20:35:11 +0200
+Subject: [PATCH 4/4] tests/mpn/t-sqrlo.c: Initialise scratch area.
+
+---
+ tests/mpn/t-sqrlo.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/mpn/t-sqrlo.c b/tests/mpn/t-sqrlo.c
+index 96caddc6f..be2b1eeac 100644
+--- a/tests/mpn/t-sqrlo.c
++++ b/tests/mpn/t-sqrlo.c
+@@ -93,10 +93,8 @@ main (int argc, char **argv)
+       p_after = pp[n];
+ 
+       itch = mpn_sqrlo_itch (n);
+-#if 0
+       ASSERT_ALWAYS (itch <= mpn_sqrlo_itch (MAX_N));
+       mpn_random2 (scratch-1, itch+2);
+-#endif
+       s_before = scratch[-1];
+       s_after = scratch[itch];
+ 
+-- 
+2.24.3 (Apple Git-128)
+
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list