Skip to content

Commit ff1e5ba

Browse files
theunisipa
authored andcommitted
depends: add gmp package
1 parent cf61b54 commit ff1e5ba

File tree

4 files changed

+81
-1
lines changed

4 files changed

+81
-1
lines changed

depends/packages/gmp.mk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package=gmp
2+
$(package)_version=6.0.0a
3+
$(package)_download_path=https://gmplib.org/download/gmp
4+
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
5+
$(package)_sha256_hash=7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf
6+
$(package)_patches=arm_gmp_build_fix.patch darwin_gmp_build_fix.patch
7+
8+
define $(package)_preprocess_cmds
9+
patch -p1 < $($(package)_patch_dir)/arm_gmp_build_fix.patch && \
10+
patch -p1 < $($(package)_patch_dir)/darwin_gmp_build_fix.patch
11+
endef
12+
13+
define $(package)_set_vars
14+
$(package)_config_opts=--disable-shared CC_FOR_BUILD=$(build_CC)
15+
$(package)_config_opts_x86_64_darwin=--with-pic
16+
$(package)_config_opts_x86_64_linux=--with-pic
17+
$(package)_config_opts_arm_linux=--with-pic
18+
endef
19+
20+
define $(package)_config_cmds
21+
$($(package)_autoconf)
22+
endef
23+
24+
define $(package)_build_cmds
25+
$(MAKE)
26+
endef
27+
28+
define $(package)_stage_cmds
29+
$(MAKE) DESTDIR=$($(package)_staging_dir) install
30+
endef

depends/packages/packages.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packages:=boost openssl
1+
packages:=boost openssl gmp
22
native_packages := native_ccache native_comparisontool
33

44
qt_native_packages = native_protobuf
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# HG changeset patch
3+
# User Torbjorn Granlund <[email protected]>
4+
# Date 1396602422 -7200
5+
# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40
6+
# Parent 0194a75b56b21a9196626430af86c5bd9110c42d
7+
Conditionalise ARM asm on !__thumb__.
8+
9+
diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c
10+
--- a/mpn/generic/div_qr_1n_pi1.c Thu Apr 03 23:58:51 2014 +0200
11+
+++ b/mpn/generic/div_qr_1n_pi1.c Fri Apr 04 11:07:02 2014 +0200
12+
@@ -130,7 +130,7 @@
13+
"%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC)
14+
#endif
15+
16+
-#if defined (__arm__) && W_TYPE_SIZE == 32
17+
+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
18+
#define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \
19+
__asm__ ( "adds %2, %5, %6\n\t" \
20+
"adcs %1, %3, %4\n\t" \
21+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# HG changeset patch
3+
# User Torbjorn Granlund <[email protected]>
4+
# Date 1396470504 -7200
5+
# Node ID 1fab0adc5ff7d9ecddcbda96f407da58347bb49c
6+
# Parent db645603dcdb41afcf78b19b551ecd5a01c3841c
7+
Workaround for Darwin assembler quirk.
8+
9+
diff -r db645603dcdb -r 1fab0adc5ff7 mpn/x86_64/k8/redc_1.asm
10+
--- a/mpn/x86_64/k8/redc_1.asm Mon Mar 31 23:04:32 2014 +0200
11+
+++ b/mpn/x86_64/k8/redc_1.asm Wed Apr 02 22:28:24 2014 +0200
12+
@@ -114,7 +114,7 @@
13+
14+
JUMPTABSECT
15+
ALIGN(8)
16+
-L(tab): JMPENT( L(0m4), L(tab))
17+
+L(tab): JMPENT( L(0), L(tab))
18+
JMPENT( L(1), L(tab))
19+
JMPENT( L(2), L(tab))
20+
JMPENT( L(3), L(tab))
21+
@@ -397,6 +397,7 @@
22+
23+
24+
ALIGN(16)
25+
+L(0):
26+
L(0m4):
27+
L(lo0): mov (mp,nneg,8), %rax
28+
mov nneg, i
29+

0 commit comments

Comments
 (0)