Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From d858ce52d1971cb4e8500b0ebc0472fdae4686ec Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sun, 7 May 2017 23:12:04 +0200
|
||||
Subject: [PATCH] mpn/arm/udiv.asm: workaround binutils bug #14887
|
||||
|
||||
Old binutils versions are affected by bug #14887,
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=14887, which causes a
|
||||
build failure when a register specification is surrounded by
|
||||
whitespaces. Removing those whitespaces works around the issue.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
mpn/arm/udiv.asm | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/mpn/arm/udiv.asm b/mpn/arm/udiv.asm
|
||||
index 25197a6..ed11eb3 100644
|
||||
--- a/mpn/arm/udiv.asm
|
||||
+++ b/mpn/arm/udiv.asm
|
||||
@@ -50,7 +50,7 @@ L(oop): divstep(n1,n0,d)
|
||||
teq r12, #0
|
||||
bne L(oop)
|
||||
|
||||
- str n1, [ rem_ptr ] C store remainder
|
||||
+ str n1, [rem_ptr] C store remainder
|
||||
adc r0, n0, n0 C quotient: add last carry from divstep
|
||||
mov pc, lr
|
||||
|
||||
@@ -89,7 +89,7 @@ L(oop2):
|
||||
addcs n0, n0, #1 C adjust quotient
|
||||
|
||||
L(_even_divisor):
|
||||
- str n1, [ rem_ptr ] C store remainder
|
||||
+ str n1, [rem_ptr] C store remainder
|
||||
mov r0, n0 C quotient
|
||||
ldmfd sp!, { r8, pc }
|
||||
EPILOGUE(mpn_udiv_qrnnd)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
116
package/mpir/0002-Fix-configure-failures-with-Xcode12.patch
Normal file
116
package/mpir/0002-Fix-configure-failures-with-Xcode12.patch
Normal file
@@ -0,0 +1,116 @@
|
||||
From bbc43ca6ae0bec4f64e69c9cd4c967005d6470eb Mon Sep 17 00:00:00 2001
|
||||
From: Mitchell Blank Jr <mitch@bodyfour.com>
|
||||
Date: Mon, 21 Dec 2020 12:05:19 +0000
|
||||
Subject: [PATCH] Fix configure failures with Xcode12
|
||||
|
||||
Changes are needed becuase Xcode12 includes a default of
|
||||
-Werror,-Wimplicit-function-declaration which means that
|
||||
even something like calling "exit(0);" is a compile failure
|
||||
if you haven't done a "#include <stdlib.h>" first (as C99
|
||||
requires, but most other compilers will just warn about)
|
||||
|
||||
I don't know if the "long long reliability test 2" test which
|
||||
tries to provoke a crash on a particular gcc 3.3 build still
|
||||
does what it was originally intended to do with my change.
|
||||
Of course, I doubt anyone has tried to use that compiler in
|
||||
years.
|
||||
|
||||
Fixes #290
|
||||
|
||||
Upstream: https://github.com/wbhart/mpir/commit/bbc43ca6ae0bec4f64e69c9cd4c967005d6470eb
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
acinclude.m4 | 24 +++++++++++++-----------
|
||||
1 file changed, 13 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 91c35bc23..620a629ef 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -589,9 +589,9 @@ extern
|
||||
#endif
|
||||
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
|
||||
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
|
||||
-f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
|
||||
+void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
|
||||
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
|
||||
-h(){}g(){}
|
||||
+void h(){} void g(){}
|
||||
#else
|
||||
int dummy;
|
||||
#endif
|
||||
@@ -603,8 +603,9 @@ GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 2],
|
||||
1666 to get an ICE with -O1 -mpowerpc64. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
-f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
|
||||
-g(){}
|
||||
+extern int g();
|
||||
+void f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
|
||||
+int g(){return 0;}
|
||||
#else
|
||||
int dummy;
|
||||
#endif
|
||||
@@ -3323,11 +3324,11 @@ check (va_alist)
|
||||
ret = vsnprintf (buf, 4, fmt, ap);
|
||||
|
||||
if (strcmp (buf, "hel") != 0)
|
||||
- exit (1);
|
||||
+ return 1;
|
||||
|
||||
/* allowed return values */
|
||||
if (ret != -1 && ret != 3 && ret != 11)
|
||||
- exit (2);
|
||||
+ return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3336,7 +3337,7 @@ int
|
||||
main ()
|
||||
{
|
||||
$i
|
||||
- exit (0);
|
||||
+ return 0;
|
||||
}
|
||||
],
|
||||
[:],
|
||||
@@ -3469,7 +3470,7 @@ cat >conftest.c <<EOF
|
||||
int
|
||||
main ()
|
||||
{
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
}
|
||||
EOF
|
||||
gmp_compile="$1 conftest.c"
|
||||
@@ -3543,7 +3544,7 @@ AC_CACHE_CHECK([for build system executable suffix],
|
||||
int
|
||||
main ()
|
||||
{
|
||||
- exit (0);
|
||||
+ return 0;
|
||||
}
|
||||
EOF
|
||||
for i in .exe ,ff8 ""; do
|
||||
@@ -3577,7 +3578,7 @@ AC_CACHE_CHECK([whether build system compiler is ANSI],
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
}
|
||||
EOF
|
||||
gmp_compile="$CC_FOR_BUILD conftest.c"
|
||||
@@ -3608,10 +3609,11 @@ AC_DEFUN([GMP_CHECK_LIBM_FOR_BUILD],
|
||||
AC_CACHE_CHECK([for build system compiler math library],
|
||||
gmp_cv_check_libm_for_build,
|
||||
[cat >conftest.c <<EOF
|
||||
+#include <math.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
}
|
||||
double d;
|
||||
double
|
||||
31
package/mpir/0003-fix-configure-with-gcc-14.patch
Normal file
31
package/mpir/0003-fix-configure-with-gcc-14.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 4ff3b770cbf86e29b75d12c13e8b854c74bccc5a Mon Sep 17 00:00:00 2001
|
||||
From: Reno Dakota <paparodeo@proton.me>
|
||||
Date: Wed, 4 Dec 2024 23:09:03 +0000
|
||||
Subject: [PATCH] fix configure with gcc-14
|
||||
|
||||
move function definition above caller to fix compile error
|
||||
|
||||
> configure:6438: gcc -m64 conftest.c >&5
|
||||
> conftest.c: In function 'f':
|
||||
> conftest.c:13:44: error: implicit declaration of function 'h' [-Wimplicit-function-declaration]
|
||||
|
||||
Upstream: https://github.com/wbhart/mpir/commit/4ff3b770cbf86e29b75d12c13e8b854c74bccc5a
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
acinclude.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 620a629ef..cd917567f 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -590,8 +590,8 @@ extern
|
||||
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
|
||||
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
|
||||
void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
|
||||
-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
|
||||
void h(){} void g(){}
|
||||
+for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
|
||||
#else
|
||||
int dummy;
|
||||
#endif
|
||||
41
package/mpir/0004-fix-configure-with-gcc-15.patch
Normal file
41
package/mpir/0004-fix-configure-with-gcc-15.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From da003143cc6f217dcf474517d54b3aee06c9c18f Mon Sep 17 00:00:00 2001
|
||||
From: Leon White <l.white@interstellarlab.earth>
|
||||
Date: Mon, 25 Aug 2025 17:24:55 +0200
|
||||
Subject: [PATCH] fix configure with gcc-15
|
||||
|
||||
Added to Alpine Linux with commit
|
||||
https://gitlab.alpinelinux.org/alpine/aports/-/commit/ded83e23c95b2560d2d77c0e61a6425872aa273b
|
||||
|
||||
Fixes compile error
|
||||
|
||||
conftest.c: In function 'f':
|
||||
conftest.c:14:48: error: too many arguments to function 'g'; expected 0, have 6
|
||||
14 | for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
|
||||
| ^ ~
|
||||
conftest.c:13:17: note: declared here
|
||||
13 | void h(){} void g(){}
|
||||
| ^
|
||||
|
||||
Upstream: https://github.com/wbhart/mpir/pull/300
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
acinclude.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index cd917567..53b9ef9c 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -590,7 +590,7 @@ extern
|
||||
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
|
||||
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
|
||||
void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
|
||||
-void h(){} void g(){}
|
||||
+void h(){} void g(int, t1 *, t1, t1 *, t1 *, int) {}
|
||||
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
|
||||
#else
|
||||
int dummy;
|
||||
--
|
||||
2.47.3
|
||||
|
||||
8
package/mpir/Config.in
Normal file
8
package/mpir/Config.in
Normal file
@@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MPIR
|
||||
bool "mpir"
|
||||
select BR2_PACKAGE_GMP
|
||||
help
|
||||
MPIR is a highly optimised library for bignum arithmetic
|
||||
forked from the GMP bignum library.
|
||||
|
||||
https://github.com/wbhart/mpir
|
||||
3
package/mpir/mpir.hash
Normal file
3
package/mpir/mpir.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 86a5039badc3e6738219a262873a1db5513405e15ece9527b718fcd0fac09bb2 mpir-3.0.0.tar.gz
|
||||
sha256 9ccf26cfe845e0eb8bb58053e47366e7ab6b697ae010f7650978d4b71b7d1fc1 COPYING.LIB
|
||||
48
package/mpir/mpir.mk
Normal file
48
package/mpir/mpir.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
#
|
||||
# mpir
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MPIR_VERSION = 3.0.0
|
||||
MPIR_SITE = $(call github,wbhart,mpir,refs/tags/mpir-$(MPIR_VERSION))
|
||||
MPIR_LICENSE = LGPL-3.0+
|
||||
MPIR_LICENSE_FILES = COPYING.LIB
|
||||
MPIR_INSTALL_STAGING = YES
|
||||
MPIR_DEPENDENCIES = gmp host-yasm
|
||||
# 0002-Fix-configure-failures-with-Xcode12.patch
|
||||
# 0003-fix-configure-with-gcc-14.patch
|
||||
MPIR_AUTORECONF = YES
|
||||
|
||||
# We don't care about the documentation
|
||||
MPIR_CONF_ENV = MAKEINFO=true
|
||||
|
||||
ifeq ($(BR2_MIPS_NABI32),y)
|
||||
MPIR_CONF_OPTS += ABI=n32
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_MIPS_NABI64),y)
|
||||
MPIR_CONF_OPTS += ABI=64
|
||||
endif
|
||||
|
||||
# The optimized ARM assembly code uses ARM-only (i.e not Thumb1/2
|
||||
# compatible) instructions.
|
||||
ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_ARM_CPU_HAS_ARM),y:)
|
||||
MPIR_CONF_ENV += MPN_PATH="generic"
|
||||
endif
|
||||
|
||||
# Optimized mips32/mips64 code not suitable for mips32r6/mips64r6
|
||||
ifeq ($(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y)
|
||||
MPIR_CONF_ENV += MPN_PATH="generic"
|
||||
endif
|
||||
|
||||
# Optimized powerpc64 code is not suitable for powerpc64le
|
||||
ifeq ($(BR2_powerpc64le),y)
|
||||
MPIR_CONF_ENV += MPN_PATH="generic"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
||||
MPIR_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user