mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
contrib: add gmp rules and patches
Dependency required by gnutls. Based on VideoLan code by Jean-Baptiste Kempf et al. Refs: #46617 Change-Id: I2ca6bcb56c607ef1fdb4364808f3012d2293400c
This commit is contained in:

committed by
Tristan Matthews

parent
37a994662f
commit
76bd5fdd41
1
contrib/src/gmp/SHA512SUMS
Normal file
1
contrib/src/gmp/SHA512SUMS
Normal file
@ -0,0 +1 @@
|
||||
06bdd312146f77bd23d1447e60b02bfea2f1e6d00798b073879e8a50a6cf7264bdbf6f31a8347dd3a0889c7a9dee2d24051b74542fc4f9f07ba2d0f744e092ad gmp-6.0.0.tar.bz2
|
27
contrib/src/gmp/clang.patch
Normal file
27
contrib/src/gmp/clang.patch
Normal file
@ -0,0 +1,27 @@
|
||||
# HG changeset patch
|
||||
# User Torbjorn Granlund <tege@gmplib.org>
|
||||
# Date 1396470504 -7200
|
||||
# Node ID 1fab0adc5ff7d9ecddcbda96f407da58347bb49c
|
||||
# Parent db645603dcdb41afcf78b19b551ecd5a01c3841c
|
||||
Workaround for Darwin assembler quirk.
|
||||
|
||||
diff -r db645603dcdb -r 1fab0adc5ff7 mpn/x86_64/k8/redc_1.asm
|
||||
--- a/mpn/x86_64/k8/redc_1.asm Mon Mar 31 23:04:32 2014 +0200
|
||||
+++ b/mpn/x86_64/k8/redc_1.asm Wed Apr 02 22:28:24 2014 +0200
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
JUMPTABSECT
|
||||
ALIGN(8)
|
||||
-L(tab): JMPENT( L(0m4), L(tab))
|
||||
+L(tab): JMPENT( L(0), L(tab))
|
||||
JMPENT( L(1), L(tab))
|
||||
JMPENT( L(2), L(tab))
|
||||
JMPENT( L(3), L(tab))
|
||||
@@ -397,6 +397,7 @@
|
||||
|
||||
|
||||
ALIGN(16)
|
||||
+L(0):
|
||||
L(0m4):
|
||||
L(lo0): mov (mp,nneg,8), %rax
|
||||
mov nneg, i
|
20
contrib/src/gmp/rules.mak
Normal file
20
contrib/src/gmp/rules.mak
Normal file
@ -0,0 +1,20 @@
|
||||
# GNU Multiple Precision Arithmetic
|
||||
|
||||
GMP_VERSION := 6.0.0
|
||||
GMP_URL := https://gmplib.org/download/gmp-$(GMP_VERSION)/gmp-$(GMP_VERSION).tar.bz2
|
||||
|
||||
$(TARBALLS)/gmp-$(GMP_VERSION).tar.bz2:
|
||||
$(call download,$(GMP_URL))
|
||||
|
||||
.sum-gmp: gmp-$(GMP_VERSION).tar.bz2
|
||||
|
||||
gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
|
||||
$(UNPACK)
|
||||
$(APPLY) $(SRC)/gmp/thumb.patch
|
||||
$(APPLY) $(SRC)/gmp/clang.patch
|
||||
$(MOVE)
|
||||
|
||||
.gmp: gmp
|
||||
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
|
||||
cd $< && $(MAKE) install
|
||||
touch $@
|
22
contrib/src/gmp/thumb.patch
Normal file
22
contrib/src/gmp/thumb.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- gmp/mpn/generic/div_qr_1n_pi1.c.orig 2014-03-28 16:11:23.648263232 +0100
|
||||
+++ gmp/mpn/generic/div_qr_1n_pi1.c 2014-03-28 16:22:29.376932722 +0100
|
||||
@@ -131,10 +131,19 @@
|
||||
#endif
|
||||
|
||||
#if defined (__arm__) && W_TYPE_SIZE == 32
|
||||
+#ifdef __thumb2__
|
||||
+#define itcc "it cc\n\t"
|
||||
+#define itcs "it cs\n\t"
|
||||
+#else
|
||||
+#define itcc
|
||||
+#define itcs
|
||||
+#endif
|
||||
#define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \
|
||||
__asm__ ( "adds %2, %5, %6\n\t" \
|
||||
"adcs %1, %3, %4\n\t" \
|
||||
+ itcc \
|
||||
"movcc %0, #0\n\t" \
|
||||
+ itcs \
|
||||
"movcs %0, #-1" \
|
||||
: "=r" (m), "=r" (sh), "=&r" (sl) \
|
||||
: "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC)
|
Reference in New Issue
Block a user