Skip to contentSkip to conversation

package/python-ujson: fix or1k build

PATCH In review Fabrice Fontaine 2 participants 5 messages Oct 15, 2021 – Oct 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/python-ujson: fix or1k build

Fix the follownig build failure on or1k since bump to version 4.1.0 in commit a47f332a20bf3f79ef4903c8ddd2b7917217e354 and
https://github.com/ultrajson/ultrajson/commit/eb7d894f225bb89d269188ba6ec559b914a71b8a:

In file included from ./deps/double-conversion/double-conversion/bignum-dtoa.h:31,
from ./deps/double-conversion/double-conversion/bignum-dtoa.cc:30:
./deps/double-conversion/double-conversion/utils.h:92:2: error: #error Target architecture was not detected as supported by Double-Conversion.
92 | #error Target architecture was not detected as supported by Double-Conversion.

      |  ^~~~~

Fixes:
- http://autobuild.buildroot.org/results/a82f794f130b0c8d5d626c507bae2e22d15f801b

---
 ...for-aarch64_be-or1k-and-microblazebe.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/python-ujson/0001-Add-support-for-aarch64_be-or1k-and-microblazebe.patch
package/python-ujson/0001-Add-support-for-aarch64_be-or1k-and-microblazebe.patch new file +30 -0
new file mode 100644
index 0000000000..b43eb54dcd
@@ -0,0 +1,30 @@
+From 768a445f0c28311bf88685bf0bb990505c12fd4c Mon Sep 17 00:00:00 2001
+From: Florian Loitsch <[email protected]>
+Date: Sat, 8 Sep 2018 18:18:15 +0200
+Subject: [PATCH] Add support for aarch64_be, or1k and microblazebe.
+
+Fixes #73.
+
+[Retrieved from:
+https://github.com/google/double-conversion/commit/768a445f0c28311bf88685bf0bb990505c12fd4c]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ double-conversion/utils.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/deps/double-conversion/ouble-conversion/utils.h b/deps/double-conversion/double-conversion/utils.h
+index 98a2a11..492bc97 100644
+--- a/deps/double-conversion/double-conversion/utils.h
++++ b/deps/double-conversion/double-conversion/utils.h
+@@ -76,8 +76,9 @@ inline void abort_noreturn() { abort(); }
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2) || \
+-    defined(__AARCH64EL__) || defined(__aarch64__) || \
+-    defined(__riscv)
++    defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
++    defined(__riscv) || \
++    defined(__or1k__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__) || \
+     defined(__pnacl__) || defined(__native_client__)
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/4 package/python-ujson: fix arc build

Fix the follownig build failure on arc since bump to version 4.1.0 in commit a47f332a20bf3f79ef4903c8ddd2b7917217e354 and
https://github.com/ultrajson/ultrajson/commit/eb7d894f225bb89d269188ba6ec559b914a71b8a:

In file included from ./deps/double-conversion/double-conversion/bignum-dtoa.h:31,
from ./deps/double-conversion/double-conversion/bignum-dtoa.cc:30:
./deps/double-conversion/double-conversion/utils.h:92:2: error: #error Target architecture was not detected as supported by Double-Conversion.
92 | #error Target architecture was not detected as supported by Double-Conversion.

      |  ^~~~~

Fixes:
- http://autobuild.buildroot.org/results/93f231c4a860f4467029a2c2e4fc0b67096b14f6

---
 ...0002-Add-support-of-ARC-architecture.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/python-ujson/0002-Add-support-of-ARC-architecture.patch
package/python-ujson/0002-Add-support-of-ARC-architecture.patch new file +36 -0
new file mode 100644
index 0000000000..d38b24f5fc
@@ -0,0 +1,36 @@
+From eafa625a34fd5d8bec18eddfccbca55ce77b4849 Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <[email protected]>
+Date: Thu, 1 Nov 2018 17:36:17 +0200
+Subject: [PATCH] Add support of ARC architecture (#82)
+
+More info about ARC architecture is here: [1] & [2].
+We need ARC supported here for many things like:
+ - ICU (see [3])
+ - Qt5 etc
+
+[1] https://www.synopsys.com/designware-ip/processor-solutions/arc-processors.html
+[2] https://en.wikipedia.org/wiki/ARC_(processor)
+[3] https://unicode-org.atlassian.net/browse/ICU-20155
+
+Fixes #81
+
+[Retrieved from:
+https://github.com/google/double-conversion/commit/eafa625a34fd5d8bec18eddfccbca55ce77b4849]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ double-conversion/utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deps/double-conversion/double-conversion/utils.h b/deps/double-conversion/double-conversion/utils.h
+index 41c5b02..2e1be0d 100644
+--- a/deps/double-conversion/double-conversion/utils.h
++++ b/deps/double-conversion/double-conversion/utils.h
+@@ -94,7 +94,7 @@ int main(int argc, char** argv) {
+     defined(_MIPS_ARCH_MIPS32R2) || \
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || \
+-    defined(__or1k__)
++    defined(__or1k__) || defined(__arc__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__) || \
+     defined(__pnacl__) || defined(__native_client__)
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/4 package/python-ujson: fix microblaze build

In reply to Fabrice Fontaine

Fix the follownig build failure on microblaze since bump to version 4.1.0 in commit a47f332a20bf3f79ef4903c8ddd2b7917217e354 and
https://github.com/ultrajson/ultrajson/commit/eb7d894f225bb89d269188ba6ec559b914a71b8a:

In file included from ./deps/double-conversion/double-conversion/bignum-dtoa.h:31,
from ./deps/double-conversion/double-conversion/bignum-dtoa.cc:30:
./deps/double-conversion/double-conversion/utils.h:92:2: error: #error Target architecture was not detected as supported by Double-Conversion.
92 | #error Target architecture was not detected as supported by Double-Conversion.

      |  ^~~~~

Fixes:
- http://autobuild.buildroot.org/results/3cf5f266e0101a6c43f97801157fb6b2edce1ed0

---
 .../0003-Add-support-for-microblaze.patch     | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/python-ujson/0003-Add-support-for-microblaze.patch
package/python-ujson/0003-Add-support-for-microblaze.patch new file +27 -0
new file mode 100644
index 0000000000..14fd52eb98
@@ -0,0 +1,27 @@
+From 5cc233e98b74c5c370de888198a2b35200d55468 Mon Sep 17 00:00:00 2001
+From: Florian Loitsch <[email protected]>
+Date: Sat, 12 Oct 2019 14:35:52 +0200
+Subject: [PATCH] Add support for microblaze.
+
+Really fixes #73.
+[Retrieved (and backported) from:
+https://github.com/google/double-conversion/commit/5cc233e98b74c5c370de888198a2b35200d55468]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ Changelog                 | 4 ++++
+ double-conversion/utils.h | 1 +
+ 2 files changed, 5 insertions(+)
+
+diff --git a/deps/idouble-conversion/double-conversion/utils.h b/deps/double-conversion/double-conversion/utils.h
+index 1a71df0..221467f 100644
+--- a/deps/doyble-conversion/double-conversion/utils.h
++++ b/deps/double-conversion/double-conversion/utils.h
+@@ -102,6 +102,7 @@ int main(int argc, char** argv) {
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || \
+-    defined(__or1k__) || defined(__arc__)
++    defined(__or1k__) || defined(__arc__) || \
++    defined(__microblaze__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__)
+ #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 4/4 package/python-ujson: fix xtensa build

In reply to Fabrice Fontaine

Fix the follownig build failure on xtensa since bump to version 4.1.0 in commit a47f332a20bf3f79ef4903c8ddd2b7917217e354 and
https://github.com/ultrajson/ultrajson/commit/eb7d894f225bb89d269188ba6ec559b914a71b8a:

In file included from ./deps/double-conversion/double-conversion/bignum-dtoa.h:31,
from ./deps/double-conversion/double-conversion/bignum-dtoa.cc:30:
./deps/double-conversion/double-conversion/utils.h:92:2: error: #error Target architecture was not detected as supported by Double-Conversion.
92 | #error Target architecture was not detected as supported by Double-Conversion.

      |  ^~~~~

Fixes:
- http://autobuild.buildroot.org/results/c75157538d7784809d935aefcb166e89c137c9b7

---
 ...4-Pseiderer-add-nios2-and-xtensa-001.patch | 95 +++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 package/python-ujson/0004-Pseiderer-add-nios2-and-xtensa-001.patch
package/python-ujson/0004-Pseiderer-add-nios2-and-xtensa-001.patch new file +95 -0
new file mode 100644
index 0000000000..8648f93c1a
@@ -0,0 +1,95 @@
+From a54561be5588ac9b16d3c20760b9b554168bb8aa Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Thu, 31 Oct 2019 21:26:27 +0100
+Subject: [PATCH] Pseiderer/add nios2 and xtensa 001 (#119)
+
+* double-conversion: enable for nios2
+
+Nios2 supports double conversion, tested using qemu:
+
+./main || echo "correct"
+correct
+uname -a
+Linux buildroot 4.19.16 #4 Sat Aug 3 14:46:48 CEST 2019 nios2 GNU/Linux
+
+Solves build error
+
+In file included from double-conversion.h:42:0,
+                 from number_decimalquantity.cpp:19:
+double-conversion-utils.h:119:2: error: #error Target architecture was not detected as supported by Double-Conversion.
+ #error Target architecture was not detected as supported by Double-Conversion.
+
+detected by buildroot autobuilders:
+http://autobuild.buildroot.net/results/91e/91eaec34708d91f8a05af189243be0b7cabce31b/
+
+Patch sent upstream: https://github.com/unicode-org/icu/pull/725
+Bug report: https://unicode-org.atlassian.net/browse/ICU-20751
+
+[Bernd: Fixed path]
+Signed-off-by: Bernd Kuhls <[email protected]>
+[Added Changelog entry]
+Signed-off-by: Peter Seiderer <[email protected]>
+
+* double-conversion: enable for xtensa
+
+Signed-off-by: Peter Seiderer <[email protected]>
+
+[Retrieved (dand backported) from:
+https://github.com/google/double-conversion/commit/a54561be5588ac9b16d3c20760b9b554168bb8aa]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+Note:
+
+Double-conversion tested with:
+
+        $ cat div.c
+double Div_double(double x, double y) { return x / y; }
+
+        $ cat main.c
+double Div_double(double x, double y);
+
+int main(int argc, char** argv) {
+  double result = Div_double(89255.0, 1e22);
+  if (result == 89255e-22) {
+    printf("correct result %e\n", result);
+    return 1;
+  } else {
+    printf("wrong result %e\n", result);
+    return 0;
+  }
+}
+
+Tested for xtensa (using qemu_xtensa_lx60_defconfig plus BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE):
+
+        $ ./host/bin/xtensa-buildroot-linux-uclibc-gcc -c div.c
+        $ ./host/bin/xtensa-buildroot-linux-uclibc-gcc -c main.c
+        $ ./host/bin/xtensa-buildroot-linux-uclibc-gcc -o main main.o div.o
+
+        $ ./host/bin/qemu-xtensa -L staging main
+correct result 8.925500e-18
+---
+ Changelog                 | 4 ++++
+ double-conversion/utils.h | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/deps/double-conversion/double-conversion/utils.h b/deps/double-conversion/double-conversion/utils.h
+index 221467f..98ec28b 100644
+--- a/deps/double-conversion/double-conversion/utils.h
++++ b/deps/double-conversion/double-conversion/utils.h
+@@ -94,6 +94,7 @@ int main(int argc, char** argv) {
+     defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \
+     defined(__hppa__) || defined(__ia64__) || \
+     defined(__mips__) || \
++    defined(__nios2__) || \
+     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+     defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+@@ -102,7 +103,7 @@ int main(int argc, char** argv) {
+     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+     defined(__riscv) || defined(__e2k__) || \
+     defined(__or1k__) || defined(__arc__) || \
+-    defined(__microblaze__)
++    defined(__microblaze__) || defined(__XTENSA__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__)
+ #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
In reply to Fabrice Fontaine

Fabrice, All,

On 2021-10-15 21:38 +0200, Fabrice Fontaine spake thusly:

Quoted 8 lines

Fix the follownig build failure on or1k since bump to version 4.1.0 in commit a47f332a20bf3f79ef4903c8ddd2b7917217e354 and
https://github.com/ultrajson/ultrajson/commit/eb7d894f225bb89d269188ba6ec559b914a71b8a:

In file included from ./deps/double-conversion/double-conversion/bignum-dtoa.h:31,
from ./deps/double-conversion/double-conversion/bignum-dtoa.cc:30:
./deps/double-conversion/double-conversion/utils.h:92:2: error: #error Target architecture was not detected as supported by Double-Conversion.
92 | #error Target architecture was not detected as supported by Double-Conversion.

Quoted 6 lines
      |  ^~~~~

Fixes:
- http://autobuild.buildroot.org/results/a82f794f130b0c8d5d626c507bae2e22d15f801b

Series of 4 patches applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 48 lines
---
 ...for-aarch64_be-or1k-and-microblazebe.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/python-ujson/0001-Add-support-for-aarch64_be-or1k-and-microblazebe.patch
package/python-ujson/0001-Add-support-for-aarch64_be-or1k-and-microblazebe.patch new file +30 -0
new file mode 100644
index 0000000000..b43eb54dcd
@@ -0,0 +1,30 @@
+From 768a445f0c28311bf88685bf0bb990505c12fd4c Mon Sep 17 00:00:00 2001
+From: Florian Loitsch <[email protected]>
+Date: Sat, 8 Sep 2018 18:18:15 +0200
+Subject: [PATCH] Add support for aarch64_be, or1k and microblazebe.
+
+Fixes #73.
+
+[Retrieved from:
+https://github.com/google/double-conversion/commit/768a445f0c28311bf88685bf0bb990505c12fd4c]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ double-conversion/utils.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/deps/double-conversion/ouble-conversion/utils.h b/deps/double-conversion/double-conversion/utils.h
+index 98a2a11..492bc97 100644
+--- a/deps/double-conversion/double-conversion/utils.h
++++ b/deps/double-conversion/double-conversion/utils.h
+@@ -76,8 +76,9 @@ inline void abort_noreturn() { abort(); }
+     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
+     defined(__SH4__) || defined(__alpha__) || \
+     defined(_MIPS_ARCH_MIPS32R2) || \
+-    defined(__AARCH64EL__) || defined(__aarch64__) || \
+-    defined(__riscv)
++    defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
++    defined(__riscv) || \
++    defined(__or1k__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__) || \
+     defined(__pnacl__) || defined(__native_client__)
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot