regen for GMP 6.2.1 and i386 and arm64. update docs so i don't forget that i mostly got 'native-gmp' working last year.diff -r1.8 -r1.9 src/external/lgpl3/gmp/README
(mrg)
--- src/external/lgpl3/gmp/README 2018/06/01 21:46:18 1.8
+++ src/external/lgpl3/gmp/README 2021/07/12 07:59:51 1.9
@@ -1,26 +1,39 @@ | @@ -1,26 +1,39 @@ | |||
1 | $NetBSD: README,v 1.8 2018/06/01 21:46:18 mrg Exp $ | 1 | $NetBSD: README,v 1.9 2021/07/12 07:59:51 mrg Exp $ | |
2 | 2 | |||
3 | GMP in NetBSD. We need GMP for GCC >= 4.2. | 3 | GMP in NetBSD. We need GMP for GCC >= 4.2. | |
4 | 4 | |||
5 | 5 | |||
6 | Building GMP without configure - how to port GMP build to a new platform. | 6 | Building GMP without configure - how to port GMP build to a new platform. | |
7 | 7 | |||
8 | The GMP build doesn't map very well to normal make. The ./configure phase | 8 | The GMP build doesn't map very well to normal make. The ./configure phase | |
9 | creates a bunch of symlinks and weeds out the sources lists, and there are | 9 | creates a bunch of symlinks and weeds out the sources lists, and there are | |
10 | files with the same name in different subdirectories linked into the same | 10 | files with the same name in different subdirectories linked into the same | |
11 | final product. All of these issues need to be dealt with. | 11 | final product. All of these issues need to be dealt with. | |
12 | 12 | |||
13 | There are a few steps to this: | 13 | There is a mostly-working "mknative" for GMP now. If this fails, see the | |
14 | section below for the old instructions. | |||
15 | ||||
16 | - run a "./build tools libs", possibly setting MKGCC=no if the | |||
17 | GMP port is currently not working at all. | |||
18 | ||||
19 | - cd to tools/gmp, and run $TOOLDIR/bin/nbmake-$arch native-gmp | |||
20 | ||||
21 | - if that works, commit the files it changed in the source tree. | |||
22 | ||||
23 | - set NEWCONFIGDIR=/writeable/src if eg /usr/src is read-only. | |||
24 | ||||
25 | These are the old steps, that maybe are necessary to fix the automated | |||
26 | output: | |||
14 | 27 | |||
15 | - run ./configure, save the output. you can use the makefile | 28 | - run ./configure, save the output. you can use the makefile | |
16 | "Makefile.netbsd-gmp" in this directory to run this with the | 29 | "Makefile.netbsd-gmp" in this directory to run this with the | |
17 | right options, etc. run it with nbmake-$MACHINE. | 30 | right options, etc. run it with nbmake-$MACHINE. | |
18 | 31 | |||
19 | - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, | 32 | - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, | |
20 | and copy these files into it: | 33 | and copy these files into it: | |
21 | config.h | 34 | config.h | |
22 | config.m4 | 35 | config.m4 | |
23 | gmp-mparam.h | 36 | gmp-mparam.h | |
24 | gmp.h | 37 | gmp.h | |
25 | 38 | |||
26 | some of these files might have src/obj references. in particular | 39 | some of these files might have src/obj references. in particular | |
@@ -44,19 +57,15 @@ There are a few steps to this: | @@ -44,19 +57,15 @@ There are a few steps to this: | |||
44 | files that we then we feed into $CC. | 57 | files that we then we feed into $CC. | |
45 | 58 | |||
46 | this part needs to be automated, but requires that the first | 59 | this part needs to be automated, but requires that the first | |
47 | part's ./configure output be stored for it. this is not done. | 60 | part's ./configure output be stored for it. this is not done. | |
48 | 61 | |||
49 | it would be good to convert the Makefile.inc into a pair of | 62 | it would be good to convert the Makefile.inc into a pair of | |
50 | files -- srcs.mk generated from build-gmp-Makefile.inc.awk, and | 63 | files -- srcs.mk generated from build-gmp-Makefile.inc.awk, and | |
51 | the remaining static part of the Makefile.inc left with the | 64 | the remaining static part of the Makefile.inc left with the | |
52 | include of srcs.mk. | 65 | include of srcs.mk. | |
53 | 66 | |||
54 | The amd64 port is a good reference to compare. | 67 | The amd64 port is a good reference to compare. | |
55 | 68 | |||
56 | 69 | |||
57 | This is still a work in progress and methods used to build may be | |||
58 | changed at any time. | |||
59 | ||||
60 | ||||
61 | mrg@netbsd.org | 70 | mrg@netbsd.org | |
62 | - 2017/08/22 | 71 | - 2021/07/11 |
--- src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/config.h 2020/09/27 00:31:51 1.2
+++ src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/config.h 2021/07/12 07:59:52 1.3
@@ -538,36 +538,36 @@ see https://www.gnu.org/licenses/. | @@ -538,36 +538,36 @@ see https://www.gnu.org/licenses/. | |||
538 | /* Define to 1 to disable the use of inline assembly */ | 538 | /* Define to 1 to disable the use of inline assembly */ | |
539 | /* #undef NO_ASM */ | 539 | /* #undef NO_ASM */ | |
540 | 540 | |||
541 | /* Name of package */ | 541 | /* Name of package */ | |
542 | #define PACKAGE "gmp" | 542 | #define PACKAGE "gmp" | |
543 | 543 | |||
544 | /* Define to the address where bug reports for this package should be sent. */ | 544 | /* Define to the address where bug reports for this package should be sent. */ | |
545 | #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" | 545 | #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" | |
546 | 546 | |||
547 | /* Define to the full name of this package. */ | 547 | /* Define to the full name of this package. */ | |
548 | #define PACKAGE_NAME "GNU MP" | 548 | #define PACKAGE_NAME "GNU MP" | |
549 | 549 | |||
550 | /* Define to the full name and version of this package. */ | 550 | /* Define to the full name and version of this package. */ | |
551 | #define PACKAGE_STRING "GNU MP 6.2.0" | 551 | #define PACKAGE_STRING "GNU MP 6.2.1" | |
552 | 552 | |||
553 | /* Define to the one symbol short name of this package. */ | 553 | /* Define to the one symbol short name of this package. */ | |
554 | #define PACKAGE_TARNAME "gmp" | 554 | #define PACKAGE_TARNAME "gmp" | |
555 | 555 | |||
556 | /* Define to the home page for this package. */ | 556 | /* Define to the home page for this package. */ | |
557 | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | 557 | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | |
558 | 558 | |||
559 | /* Define to the version of this package. */ | 559 | /* Define to the version of this package. */ | |
560 | #define PACKAGE_VERSION "6.2.0" | 560 | #define PACKAGE_VERSION "6.2.1" | |
561 | 561 | |||
562 | /* Define as the return type of signal handlers (`int' or `void'). */ | 562 | /* Define as the return type of signal handlers (`int' or `void'). */ | |
563 | #define RETSIGTYPE void | 563 | #define RETSIGTYPE void | |
564 | 564 | |||
565 | /* The size of `mp_limb_t', as computed by sizeof. */ | 565 | /* The size of `mp_limb_t', as computed by sizeof. */ | |
566 | #define SIZEOF_MP_LIMB_T 8 | 566 | #define SIZEOF_MP_LIMB_T 8 | |
567 | 567 | |||
568 | /* The size of `unsigned', as computed by sizeof. */ | 568 | /* The size of `unsigned', as computed by sizeof. */ | |
569 | #define SIZEOF_UNSIGNED 4 | 569 | #define SIZEOF_UNSIGNED 4 | |
570 | 570 | |||
571 | /* The size of `unsigned long', as computed by sizeof. */ | 571 | /* The size of `unsigned long', as computed by sizeof. */ | |
572 | #define SIZEOF_UNSIGNED_LONG 8 | 572 | #define SIZEOF_UNSIGNED_LONG 8 | |
573 | 573 | |||
@@ -580,27 +580,27 @@ see https://www.gnu.org/licenses/. | @@ -580,27 +580,27 @@ see https://www.gnu.org/licenses/. | |||
580 | /* Define to 1 if sscanf requires writable inputs */ | 580 | /* Define to 1 if sscanf requires writable inputs */ | |
581 | /* #undef SSCANF_WRITABLE_INPUT */ | 581 | /* #undef SSCANF_WRITABLE_INPUT */ | |
582 | 582 | |||
583 | /* Define to 1 if you have the ANSI C header files. */ | 583 | /* Define to 1 if you have the ANSI C header files. */ | |
584 | #define STDC_HEADERS 1 | 584 | #define STDC_HEADERS 1 | |
585 | 585 | |||
586 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | 586 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | |
587 | #define TIME_WITH_SYS_TIME 1 | 587 | #define TIME_WITH_SYS_TIME 1 | |
588 | 588 | |||
589 | /* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ | 589 | /* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ | |
590 | #define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC | 590 | #define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC | |
591 | 591 | |||
592 | /* Version number of package */ | 592 | /* Version number of package */ | |
593 | #define VERSION "6.2.0" | 593 | #define VERSION "6.2.1" | |
594 | 594 | |||
595 | /* Define to 1 to enable ASSERT checking, per --enable-assert */ | 595 | /* Define to 1 to enable ASSERT checking, per --enable-assert */ | |
596 | /* #undef WANT_ASSERT */ | 596 | /* #undef WANT_ASSERT */ | |
597 | 597 | |||
598 | /* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */ | 598 | /* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */ | |
599 | /* #undef WANT_FAKE_CPUID */ | 599 | /* #undef WANT_FAKE_CPUID */ | |
600 | 600 | |||
601 | /* Define to 1 when building a fat binary. */ | 601 | /* Define to 1 when building a fat binary. */ | |
602 | /* #undef WANT_FAT_BINARY */ | 602 | /* #undef WANT_FAT_BINARY */ | |
603 | 603 | |||
604 | /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ | 604 | /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ | |
605 | #define WANT_FFT 1 | 605 | #define WANT_FFT 1 | |
606 | 606 | |||
@@ -631,27 +631,27 @@ see https://www.gnu.org/licenses/. | @@ -631,27 +631,27 @@ see https://www.gnu.org/licenses/. | |||
631 | # define WORDS_BIGENDIAN 1 | 631 | # define WORDS_BIGENDIAN 1 | |
632 | # endif | 632 | # endif | |
633 | #else | 633 | #else | |
634 | # ifndef WORDS_BIGENDIAN | 634 | # ifndef WORDS_BIGENDIAN | |
635 | /* # undef WORDS_BIGENDIAN */ | 635 | /* # undef WORDS_BIGENDIAN */ | |
636 | # endif | 636 | # endif | |
637 | #endif | 637 | #endif | |
638 | 638 | |||
639 | /* Define to 1 if the assembler understands the mulx instruction */ | 639 | /* Define to 1 if the assembler understands the mulx instruction */ | |
640 | /* #undef X86_ASM_MULX */ | 640 | /* #undef X86_ASM_MULX */ | |
641 | 641 | |||
642 | /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a | 642 | /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a | |
643 | `char[]'. */ | 643 | `char[]'. */ | |
644 | #define YYTEXT_POINTER 1 | 644 | /* #undef YYTEXT_POINTER */ | |
645 | 645 | |||
646 | /* Define to `__inline__' or `__inline' if that's what the C compiler | 646 | /* Define to `__inline__' or `__inline' if that's what the C compiler | |
647 | calls it, or to nothing if 'inline' is not supported under any name. */ | 647 | calls it, or to nothing if 'inline' is not supported under any name. */ | |
648 | #ifndef __cplusplus | 648 | #ifndef __cplusplus | |
649 | /* #undef inline */ | 649 | /* #undef inline */ | |
650 | #endif | 650 | #endif | |
651 | 651 | |||
652 | /* Define to the equivalent of the C99 'restrict' keyword, or to | 652 | /* Define to the equivalent of the C99 'restrict' keyword, or to | |
653 | nothing if this is not supported. Do not define if restrict is | 653 | nothing if this is not supported. Do not define if restrict is | |
654 | supported directly. */ | 654 | supported directly. */ | |
655 | #define restrict __restrict | 655 | #define restrict __restrict | |
656 | /* Work around a bug in Sun C++: it does not support _Restrict or | 656 | /* Work around a bug in Sun C++: it does not support _Restrict or | |
657 | __restrict__, even though the corresponding Sun C compiler ends up with | 657 | __restrict__, even though the corresponding Sun C compiler ends up with |
--- src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/config.m4 2020/09/27 00:31:51 1.2
+++ src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/config.m4 2021/07/12 07:59:52 1.3
@@ -17,19 +17,20 @@ define( | @@ -17,19 +17,20 @@ define( | |||
17 | define(<LSYM_PREFIX>, <.L>) | 17 | define(<LSYM_PREFIX>, <.L>) | |
18 | define(<W32>, <.long>) | 18 | define(<W32>, <.long>) | |
19 | define(<ALIGN_LOGARITHMIC>,<yes>) | 19 | define(<ALIGN_LOGARITHMIC>,<yes>) | |
20 | define(<SQR_TOOM2_THRESHOLD>,<18>) | 20 | define(<SQR_TOOM2_THRESHOLD>,<18>) | |
21 | define(<BMOD_1_TO_MOD_1_THRESHOLD>,<40>) | 21 | define(<BMOD_1_TO_MOD_1_THRESHOLD>,<40>) | |
22 | define(<SIZEOF_UNSIGNED>,<4>) | 22 | define(<SIZEOF_UNSIGNED>,<4>) | |
23 | define(<GMP_LIMB_BITS>,64) | 23 | define(<GMP_LIMB_BITS>,64) | |
24 | define(<GMP_NAIL_BITS>,0) | 24 | define(<GMP_NAIL_BITS>,0) | |
25 | define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) | 25 | define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) | |
26 | >) | 26 | >) | |
27 | changequote(`,') | 27 | changequote(`,') | |
28 | ifdef(`__CONFIG_M4_INCLUDED__',,` | 28 | ifdef(`__CONFIG_M4_INCLUDED__',,` | |
29 | include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') | 29 | include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') | |
30 | include_mpn(`arm64/arm64-defs.m4') | |||
30 | define_not_for_expansion(`HAVE_HOST_CPU_aarch64') | 31 | define_not_for_expansion(`HAVE_HOST_CPU_aarch64') | |
31 | define_not_for_expansion(`HAVE_ABI_64') | 32 | define_not_for_expansion(`HAVE_ABI_64') | |
32 | define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') | 33 | define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') | |
33 | define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') | 34 | define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') | |
34 | ') | 35 | ') | |
35 | define(`__CONFIG_M4_INCLUDED__') | 36 | define(`__CONFIG_M4_INCLUDED__') |
--- src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/gmp.h 2020/09/27 00:31:51 1.2
+++ src/external/lgpl3/gmp/lib/libgmp/arch/aarch64/gmp.h 2021/07/12 07:59:52 1.3
@@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; | @@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; | |||
351 | #endif | 351 | #endif | |
352 | 352 | |||
353 | 353 | |||
354 | /* PORTME: What other compilers have a useful "extern inline"? "static | 354 | /* PORTME: What other compilers have a useful "extern inline"? "static | |
355 | inline" would be an acceptable substitute if the compiler (or linker) | 355 | inline" would be an acceptable substitute if the compiler (or linker) | |
356 | discards unused statics. */ | 356 | discards unused statics. */ | |
357 | 357 | |||
358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | 358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | |
359 | for an inline too, so as to correctly specify "dllimport" on windows, in | 359 | for an inline too, so as to correctly specify "dllimport" on windows, in | |
360 | case the function is called rather than inlined. | 360 | case the function is called rather than inlined. | |
361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 | 361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 | |
362 | inline semantics, unless -fgnu89-inline is used. */ | 362 | inline semantics, unless -fgnu89-inline is used. */ | |
363 | #ifdef __GNUC__ | 363 | #ifdef __GNUC__ | |
364 | #if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ | 364 | #if (defined __GNUC_STDC_INLINE__) || \ | |
365 | || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) | 365 | (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) | |
366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | 366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | |
367 | #else | |||
368 | #define __GMP_EXTERN_INLINE extern __inline__ | |||
369 | #endif | 367 | #endif | |
370 | #define __GMP_INLINE_PROTOTYPES 1 | 368 | #define __GMP_INLINE_PROTOTYPES 1 | |
371 | #endif | 369 | #endif | |
372 | 370 | |||
373 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 | 371 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 | |
374 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 | 372 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 | |
375 | mode, which is the default), but an unnecessary local copy of foo is | 373 | mode, which is the default), but an unnecessary local copy of foo is | |
376 | emitted unless -O is used. "extern __inline" is accepted, but the | 374 | emitted unless -O is used. "extern __inline" is accepted, but the | |
377 | "extern" appears to be ignored, ie. it becomes a plain global function | 375 | "extern" appears to be ignored, ie. it becomes a plain global function | |
378 | but which is inlined within its file. Don't know if all old versions of | 376 | but which is inlined within its file. Don't know if all old versions of | |
379 | DEC C supported __inline, but as a start let's do the right thing for | 377 | DEC C supported __inline, but as a start let's do the right thing for | |
380 | current versions. */ | 378 | current versions. */ | |
381 | #ifdef __DECC | 379 | #ifdef __DECC | |
@@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v | @@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v | |||
1683 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | 1681 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | |
1684 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) | 1682 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) | |
1685 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | 1683 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1686 | #define mpn_sec_div_r __MPN(sec_div_r) | 1684 | #define mpn_sec_div_r __MPN(sec_div_r) | |
1687 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | 1685 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | |
1688 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) | 1686 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) | |
1689 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | 1687 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1690 | 1688 | |||
1691 | #define mpn_sec_invert __MPN(sec_invert) | 1689 | #define mpn_sec_invert __MPN(sec_invert) | |
1692 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); | 1690 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); | |
1693 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) | 1691 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) | |
1694 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; | 1692 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1695 | 1693 | |||
1694 | #define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) | |||
1695 | __GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); | |||
1696 | ||||
1696 | 1697 | |||
1697 | /**************** mpz inlines ****************/ | 1698 | /**************** mpz inlines ****************/ | |
1698 | 1699 | |||
1699 | /* The following are provided as inlines where possible, but always exist as | 1700 | /* The following are provided as inlines where possible, but always exist as | |
1700 | library functions too, for binary compatibility. | 1701 | library functions too, for binary compatibility. | |
1701 | 1702 | |||
1702 | Within gmp itself this inlining generally isn't relied on, since it | 1703 | Within gmp itself this inlining generally isn't relied on, since it | |
1703 | doesn't get done for all compilers, whereas if something is worth | 1704 | doesn't get done for all compilers, whereas if something is worth | |
1704 | inlining then it's worth arranging always. | 1705 | inlining then it's worth arranging always. | |
1705 | 1706 | |||
1706 | There are two styles of inlining here. When the same bit of code is | 1707 | There are two styles of inlining here. When the same bit of code is | |
1707 | wanted for the inline as for the library version, then __GMP_FORCE_foo | 1708 | wanted for the inline as for the library version, then __GMP_FORCE_foo | |
1708 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE | 1709 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE | |
@@ -2319,18 +2320,18 @@ enum | @@ -2319,18 +2320,18 @@ enum | |||
2319 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, | 2320 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, | |
2320 | GMP_ERROR_DIVISION_BY_ZERO = 2, | 2321 | GMP_ERROR_DIVISION_BY_ZERO = 2, | |
2321 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, | 2322 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, | |
2322 | GMP_ERROR_INVALID_ARGUMENT = 8 | 2323 | GMP_ERROR_INVALID_ARGUMENT = 8 | |
2323 | }; | 2324 | }; | |
2324 | 2325 | |||
2325 | /* Define CC and CFLAGS which were used to build this version of GMP */ | 2326 | /* Define CC and CFLAGS which were used to build this version of GMP */ | |
2326 | #define __GMP_CC "gcc" | 2327 | #define __GMP_CC "gcc" | |
2327 | #define __GMP_CFLAGS "-O2 -pedantic -march=armv8-a" | 2328 | #define __GMP_CFLAGS "-O2 -pedantic -march=armv8-a" | |
2328 | 2329 | |||
2329 | /* Major version number is the value of __GNU_MP__ too, above. */ | 2330 | /* Major version number is the value of __GNU_MP__ too, above. */ | |
2330 | #define __GNU_MP_VERSION 6 | 2331 | #define __GNU_MP_VERSION 6 | |
2331 | #define __GNU_MP_VERSION_MINOR 2 | 2332 | #define __GNU_MP_VERSION_MINOR 2 | |
2332 | #define __GNU_MP_VERSION_PATCHLEVEL 0 | 2333 | #define __GNU_MP_VERSION_PATCHLEVEL 1 | |
2333 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) | 2334 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) | |
2334 | 2335 | |||
2335 | #define __GMP_H__ | 2336 | #define __GMP_H__ | |
2336 | #endif /* __GMP_H__ */ | 2337 | #endif /* __GMP_H__ */ |
--- src/external/lgpl3/gmp/lib/libgmp/arch/i386/config.h 2020/09/27 00:31:52 1.5
+++ src/external/lgpl3/gmp/lib/libgmp/arch/i386/config.h 2021/07/12 07:59:52 1.6
@@ -538,36 +538,36 @@ see https://www.gnu.org/licenses/. | @@ -538,36 +538,36 @@ see https://www.gnu.org/licenses/. | |||
538 | /* Define to 1 to disable the use of inline assembly */ | 538 | /* Define to 1 to disable the use of inline assembly */ | |
539 | /* #undef NO_ASM */ | 539 | /* #undef NO_ASM */ | |
540 | 540 | |||
541 | /* Name of package */ | 541 | /* Name of package */ | |
542 | #define PACKAGE "gmp" | 542 | #define PACKAGE "gmp" | |
543 | 543 | |||
544 | /* Define to the address where bug reports for this package should be sent. */ | 544 | /* Define to the address where bug reports for this package should be sent. */ | |
545 | #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" | 545 | #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" | |
546 | 546 | |||
547 | /* Define to the full name of this package. */ | 547 | /* Define to the full name of this package. */ | |
548 | #define PACKAGE_NAME "GNU MP" | 548 | #define PACKAGE_NAME "GNU MP" | |
549 | 549 | |||
550 | /* Define to the full name and version of this package. */ | 550 | /* Define to the full name and version of this package. */ | |
551 | #define PACKAGE_STRING "GNU MP 6.2.0" | 551 | #define PACKAGE_STRING "GNU MP 6.2.1" | |
552 | 552 | |||
553 | /* Define to the one symbol short name of this package. */ | 553 | /* Define to the one symbol short name of this package. */ | |
554 | #define PACKAGE_TARNAME "gmp" | 554 | #define PACKAGE_TARNAME "gmp" | |
555 | 555 | |||
556 | /* Define to the home page for this package. */ | 556 | /* Define to the home page for this package. */ | |
557 | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | 557 | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | |
558 | 558 | |||
559 | /* Define to the version of this package. */ | 559 | /* Define to the version of this package. */ | |
560 | #define PACKAGE_VERSION "6.2.0" | 560 | #define PACKAGE_VERSION "6.2.1" | |
561 | 561 | |||
562 | /* Define as the return type of signal handlers (`int' or `void'). */ | 562 | /* Define as the return type of signal handlers (`int' or `void'). */ | |
563 | #define RETSIGTYPE void | 563 | #define RETSIGTYPE void | |
564 | 564 | |||
565 | /* The size of `mp_limb_t', as computed by sizeof. */ | 565 | /* The size of `mp_limb_t', as computed by sizeof. */ | |
566 | #define SIZEOF_MP_LIMB_T 4 | 566 | #define SIZEOF_MP_LIMB_T 4 | |
567 | 567 | |||
568 | /* The size of `unsigned', as computed by sizeof. */ | 568 | /* The size of `unsigned', as computed by sizeof. */ | |
569 | #define SIZEOF_UNSIGNED 4 | 569 | #define SIZEOF_UNSIGNED 4 | |
570 | 570 | |||
571 | /* The size of `unsigned long', as computed by sizeof. */ | 571 | /* The size of `unsigned long', as computed by sizeof. */ | |
572 | #define SIZEOF_UNSIGNED_LONG 4 | 572 | #define SIZEOF_UNSIGNED_LONG 4 | |
573 | 573 | |||
@@ -580,27 +580,27 @@ see https://www.gnu.org/licenses/. | @@ -580,27 +580,27 @@ see https://www.gnu.org/licenses/. | |||
580 | /* Define to 1 if sscanf requires writable inputs */ | 580 | /* Define to 1 if sscanf requires writable inputs */ | |
581 | /* #undef SSCANF_WRITABLE_INPUT */ | 581 | /* #undef SSCANF_WRITABLE_INPUT */ | |
582 | 582 | |||
583 | /* Define to 1 if you have the ANSI C header files. */ | 583 | /* Define to 1 if you have the ANSI C header files. */ | |
584 | #define STDC_HEADERS 1 | 584 | #define STDC_HEADERS 1 | |
585 | 585 | |||
586 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | 586 | /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ | |
587 | #define TIME_WITH_SYS_TIME 1 | 587 | #define TIME_WITH_SYS_TIME 1 | |
588 | 588 | |||
589 | /* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ | 589 | /* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ | |
590 | /* #undef TUNE_SQR_TOOM2_MAX */ | 590 | /* #undef TUNE_SQR_TOOM2_MAX */ | |
591 | 591 | |||
592 | /* Version number of package */ | 592 | /* Version number of package */ | |
593 | #define VERSION "6.2.0" | 593 | #define VERSION "6.2.1" | |
594 | 594 | |||
595 | /* Define to 1 to enable ASSERT checking, per --enable-assert */ | 595 | /* Define to 1 to enable ASSERT checking, per --enable-assert */ | |
596 | /* #undef WANT_ASSERT */ | 596 | /* #undef WANT_ASSERT */ | |
597 | 597 | |||
598 | /* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */ | 598 | /* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */ | |
599 | /* #undef WANT_FAKE_CPUID */ | 599 | /* #undef WANT_FAKE_CPUID */ | |
600 | 600 | |||
601 | /* Define to 1 when building a fat binary. */ | 601 | /* Define to 1 when building a fat binary. */ | |
602 | /* #undef WANT_FAT_BINARY */ | 602 | /* #undef WANT_FAT_BINARY */ | |
603 | 603 | |||
604 | /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ | 604 | /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ | |
605 | #define WANT_FFT 1 | 605 | #define WANT_FFT 1 | |
606 | 606 |
--- src/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h 2020/09/27 00:31:52 1.4
+++ src/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h 2021/07/12 07:59:52 1.5
@@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; | @@ -351,31 +351,29 @@ typedef __mpq_struct *mpq_ptr; | |||
351 | #endif | 351 | #endif | |
352 | 352 | |||
353 | 353 | |||
354 | /* PORTME: What other compilers have a useful "extern inline"? "static | 354 | /* PORTME: What other compilers have a useful "extern inline"? "static | |
355 | inline" would be an acceptable substitute if the compiler (or linker) | 355 | inline" would be an acceptable substitute if the compiler (or linker) | |
356 | discards unused statics. */ | 356 | discards unused statics. */ | |
357 | 357 | |||
358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | 358 | /* gcc has __inline__ in all modes, including strict ansi. Give a prototype | |
359 | for an inline too, so as to correctly specify "dllimport" on windows, in | 359 | for an inline too, so as to correctly specify "dllimport" on windows, in | |
360 | case the function is called rather than inlined. | 360 | case the function is called rather than inlined. | |
361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 | 361 | GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 | |
362 | inline semantics, unless -fgnu89-inline is used. */ | 362 | inline semantics, unless -fgnu89-inline is used. */ | |
363 | #ifdef __GNUC__ | 363 | #ifdef __GNUC__ | |
364 | #if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ | 364 | #if (defined __GNUC_STDC_INLINE__) || \ | |
365 | || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) | 365 | (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) | |
366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | 366 | #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) | |
367 | #else | |||
368 | #define __GMP_EXTERN_INLINE extern __inline__ | |||
369 | #endif | 367 | #endif | |
370 | #define __GMP_INLINE_PROTOTYPES 1 | 368 | #define __GMP_INLINE_PROTOTYPES 1 | |
371 | #endif | 369 | #endif | |
372 | 370 | |||
373 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 | 371 | /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 | |
374 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 | 372 | strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 | |
375 | mode, which is the default), but an unnecessary local copy of foo is | 373 | mode, which is the default), but an unnecessary local copy of foo is | |
376 | emitted unless -O is used. "extern __inline" is accepted, but the | 374 | emitted unless -O is used. "extern __inline" is accepted, but the | |
377 | "extern" appears to be ignored, ie. it becomes a plain global function | 375 | "extern" appears to be ignored, ie. it becomes a plain global function | |
378 | but which is inlined within its file. Don't know if all old versions of | 376 | but which is inlined within its file. Don't know if all old versions of | |
379 | DEC C supported __inline, but as a start let's do the right thing for | 377 | DEC C supported __inline, but as a start let's do the right thing for | |
380 | current versions. */ | 378 | current versions. */ | |
381 | #ifdef __DECC | 379 | #ifdef __DECC | |
@@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v | @@ -1683,26 +1681,29 @@ __GMP_DECLSPEC void mpn_sec_tabselect (v | |||
1683 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | 1681 | __GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | |
1684 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) | 1682 | #define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) | |
1685 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | 1683 | __GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1686 | #define mpn_sec_div_r __MPN(sec_div_r) | 1684 | #define mpn_sec_div_r __MPN(sec_div_r) | |
1687 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | 1685 | __GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); | |
1688 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) | 1686 | #define mpn_sec_div_r_itch __MPN(sec_div_r_itch) | |
1689 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | 1687 | __GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1690 | 1688 | |||
1691 | #define mpn_sec_invert __MPN(sec_invert) | 1689 | #define mpn_sec_invert __MPN(sec_invert) | |
1692 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); | 1690 | __GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); | |
1693 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) | 1691 | #define mpn_sec_invert_itch __MPN(sec_invert_itch) | |
1694 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; | 1692 | __GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; | |
1695 | 1693 | |||
1694 | #define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) | |||
1695 | __GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); | |||
1696 | ||||
1696 | 1697 | |||
1697 | /**************** mpz inlines ****************/ | 1698 | /**************** mpz inlines ****************/ | |
1698 | 1699 | |||
1699 | /* The following are provided as inlines where possible, but always exist as | 1700 | /* The following are provided as inlines where possible, but always exist as | |
1700 | library functions too, for binary compatibility. | 1701 | library functions too, for binary compatibility. | |
1701 | 1702 | |||
1702 | Within gmp itself this inlining generally isn't relied on, since it | 1703 | Within gmp itself this inlining generally isn't relied on, since it | |
1703 | doesn't get done for all compilers, whereas if something is worth | 1704 | doesn't get done for all compilers, whereas if something is worth | |
1704 | inlining then it's worth arranging always. | 1705 | inlining then it's worth arranging always. | |
1705 | 1706 | |||
1706 | There are two styles of inlining here. When the same bit of code is | 1707 | There are two styles of inlining here. When the same bit of code is | |
1707 | wanted for the inline as for the library version, then __GMP_FORCE_foo | 1708 | wanted for the inline as for the library version, then __GMP_FORCE_foo | |
1708 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE | 1709 | arranges for that code to be emitted and the __GMP_EXTERN_INLINE | |
@@ -2319,18 +2320,18 @@ enum | @@ -2319,18 +2320,18 @@ enum | |||
2319 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, | 2320 | GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, | |
2320 | GMP_ERROR_DIVISION_BY_ZERO = 2, | 2321 | GMP_ERROR_DIVISION_BY_ZERO = 2, | |
2321 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, | 2322 | GMP_ERROR_SQRT_OF_NEGATIVE = 4, | |
2322 | GMP_ERROR_INVALID_ARGUMENT = 8 | 2323 | GMP_ERROR_INVALID_ARGUMENT = 8 | |
2323 | }; | 2324 | }; | |
2324 | 2325 | |||
2325 | /* Define CC and CFLAGS which were used to build this version of GMP */ | 2326 | /* Define CC and CFLAGS which were used to build this version of GMP */ | |
2326 | #define __GMP_CC "gcc" | 2327 | #define __GMP_CC "gcc" | |
2327 | #define __GMP_CFLAGS "-m32 -O2 -pedantic -fomit-frame-pointer -mtune=i486 -march=i486 -mno-avx" | 2328 | #define __GMP_CFLAGS "-m32 -O2 -pedantic -fomit-frame-pointer -mtune=i486 -march=i486 -mno-avx" | |
2328 | 2329 | |||
2329 | /* Major version number is the value of __GNU_MP__ too, above. */ | 2330 | /* Major version number is the value of __GNU_MP__ too, above. */ | |
2330 | #define __GNU_MP_VERSION 6 | 2331 | #define __GNU_MP_VERSION 6 | |
2331 | #define __GNU_MP_VERSION_MINOR 2 | 2332 | #define __GNU_MP_VERSION_MINOR 2 | |
2332 | #define __GNU_MP_VERSION_PATCHLEVEL 0 | 2333 | #define __GNU_MP_VERSION_PATCHLEVEL 1 | |
2333 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) | 2334 | #define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) | |
2334 | 2335 | |||
2335 | #define __GMP_H__ | 2336 | #define __GMP_H__ | |
2336 | #endif /* __GMP_H__ */ | 2337 | #endif /* __GMP_H__ */ |