* [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision
@ 2019-02-05 12:54 Matt Weber
2019-02-05 12:58 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Matt Weber @ 2019-02-05 12:54 UTC (permalink / raw)
To: buildroot
Fixes
http://autobuild.buildroot.net/results/02f/02ff68698603ebdce5d13d3130a15b5a1ecc14d2/build-end.log
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
...-Fix-Name-Collision-With-LibTomMath-Funcs.patch | 63 ++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
diff --git a/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch b/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
new file mode 100644
index 0000000..621a4b3
--- /dev/null
+++ b/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
@@ -0,0 +1,63 @@
+From 588d4805097d01865538a2d5c52d59c99a1015e7 Mon Sep 17 00:00:00 2001
+From: Matt Weber <matthew.weber@rockwellcollins.com>
+Date: Tue, 5 Feb 2019 06:48:41 -0600
+Subject: [PATCH] Fix Name Collision With LibTomMath Funcs
+
+Upstream: https://github.com/MoarVM/MoarVM/commit/f7204a3ee5199dd70f26d6fe133008cc86c63bbe
+(Similar but version difference has Buildroot only using a subset of the changes
+
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
+---
+ src/math/bigintops.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/math/bigintops.c b/src/math/bigintops.c
+index 2275593..8ab7ed6 100644
+--- a/src/math/bigintops.c
++++ b/src/math/bigintops.c
+@@ -45,7 +45,7 @@ int MVM_bigint_mp_set_uint64(mp_int * a, MVMuint64 b) {
+ return MP_OKAY;
+ }
+
+-static MVMnum64 mp_get_double(mp_int *a) {
++static MVMnum64 MVM_mp_get_double(mp_int *a) {
+ MVMnum64 d = 0.0;
+ MVMnum64 sign = SIGN(a) == MP_NEG ? -1.0 : 1.0;
+ int i;
+@@ -680,8 +680,8 @@ MVMObject * MVM_bigint_pow(MVMThreadContext *tc, MVMObject *a, MVMObject *b,
+ }
+ }
+ else {
+- MVMnum64 f_base = mp_get_double(base);
+- MVMnum64 f_exp = mp_get_double(exponent);
++ MVMnum64 f_base = MVM_mp_get_double(base);
++ MVMnum64 f_exp = MVM_mp_get_double(exponent);
+ r = MVM_repr_box_num(tc, num_type, pow(f_base, f_exp));
+ }
+ clear_temp_bigints(tmp, 2);
+@@ -880,7 +880,7 @@ MVMnum64 MVM_bigint_to_num(MVMThreadContext *tc, MVMObject *a) {
+
+ if (MVM_BIGINT_IS_BIG(ba)) {
+ mp_int *ia = ba->u.bigint;
+- return mp_get_double(ia);
++ return MVM_mp_get_double(ia);
+ } else {
+ return (double)ba->u.smallint.value;
+ }
+@@ -913,11 +913,11 @@ MVMnum64 MVM_bigint_div_num(MVMThreadContext *tc, MVMObject *a, MVMObject *b) {
+ mp_init(&reduced_b);
+ mp_div_2d(ia, max_size - 1023, &reduced_a, NULL);
+ mp_div_2d(ib, max_size - 1023, &reduced_b, NULL);
+- c = mp_get_double(&reduced_a) / mp_get_double(&reduced_b);
++ c = MVM_mp_get_double(&reduced_a) / MVM_mp_get_double(&reduced_b);
+ mp_clear(&reduced_a);
+ mp_clear(&reduced_b);
+ } else {
+- c = mp_get_double(ia) / mp_get_double(ib);
++ c = MVM_mp_get_double(ia) / MVM_mp_get_double(ib);
+ }
+ clear_temp_bigints(tmp, 2);
+ } else {
+--
+1.9.1
+
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision
2019-02-05 12:54 [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision Matt Weber
@ 2019-02-05 12:58 ` Thomas Petazzoni
2019-02-05 13:26 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-02-05 12:58 UTC (permalink / raw)
To: buildroot
On Tue, 5 Feb 2019 06:54:32 -0600
Matt Weber <matthew.weber@rockwellcollins.com> wrote:
> Fixes
> http://autobuild.buildroot.net/results/02f/02ff68698603ebdce5d13d3130a15b5a1ecc14d2/build-end.log
>
> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
> ---
> ...-Fix-Name-Collision-With-LibTomMath-Funcs.patch | 63 ++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
>
> diff --git a/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch b/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
> new file mode 100644
> index 0000000..621a4b3
> --- /dev/null
> +++ b/package/moarvm/0001-Fix-Name-Collision-With-LibTomMath-Funcs.patch
> @@ -0,0 +1,63 @@
> +From 588d4805097d01865538a2d5c52d59c99a1015e7 Mon Sep 17 00:00:00 2001
> +From: Matt Weber <matthew.weber@rockwellcollins.com>
Please preserve the original authorship. Create a Git branch that
starts with the tag we're using in Buildroot, cherry-pick the upstream
commit, fix the conflicts and then git format-patch.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision
2019-02-05 12:58 ` Thomas Petazzoni
@ 2019-02-05 13:26 ` Peter Korsgaard
2019-02-05 13:47 ` Matthew Weber
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2019-02-05 13:26 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
Hi,
>> +From 588d4805097d01865538a2d5c52d59c99a1015e7 Mon Sep 17 00:00:00 2001
>> +From: Matt Weber <matthew.weber@rockwellcollins.com>
> Please preserve the original authorship. Create a Git branch that
> starts with the tag we're using in Buildroot, cherry-pick the upstream
> commit, fix the conflicts and then git format-patch.
And please use git cherry-pick -sx <sha1> to add the original git sha1 and you
signed-off-by to the patch header.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision
2019-02-05 13:26 ` Peter Korsgaard
@ 2019-02-05 13:47 ` Matthew Weber
0 siblings, 0 replies; 4+ messages in thread
From: Matthew Weber @ 2019-02-05 13:47 UTC (permalink / raw)
To: buildroot
Peter,
On Tue, Feb 5, 2019 at 7:26 AM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
>
> Hi,
>
> >> +From 588d4805097d01865538a2d5c52d59c99a1015e7 Mon Sep 17 00:00:00 2001
> >> +From: Matt Weber <matthew.weber@rockwellcollins.com>
>
> > Please preserve the original authorship. Create a Git branch that
> > starts with the tag we're using in Buildroot, cherry-pick the upstream
> > commit, fix the conflicts and then git format-patch.
>
> And please use git cherry-pick -sx <sha1> to add the original git sha1 and you
> signed-off-by to the patch header.
>
Ok, I'll keep that in mind. I sent a v2 which picks the commit and
should have maintained that authorship. If not let me know.
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-05 13:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-05 12:54 [Buildroot] [PATCH] package/moarvm: resolve libtommath name collision Matt Weber
2019-02-05 12:58 ` Thomas Petazzoni
2019-02-05 13:26 ` Peter Korsgaard
2019-02-05 13:47 ` Matthew Weber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox