From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1 2/2] package/icu: fix double conversion compile for xtensa
Date: Mon, 28 Oct 2019 22:06:54 +0100 [thread overview]
Message-ID: <20191028210654.20400-2-ps.report@gmx.net> (raw)
In-Reply-To: <20191028210654.20400-1-ps.report@gmx.net>
Fixes [1]:
In file included from double-conversion.h:42,
from number_decimalquantity.cpp:19:
double-conversion-utils.h:121:2: error: #error Target architecture was not detected as supported by Double-Conversion.
#error Target architecture was not detected as supported by Double-Conversion.
[1] http://autobuild.buildroot.net/results/fc331ae8e2484be6818f4fc334d3f8c9658fffdc
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
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
---
...-double-conversion-enable-for-xtensa.patch | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 package/icu/0008-double-conversion-enable-for-xtensa.patch
diff --git a/package/icu/0008-double-conversion-enable-for-xtensa.patch b/package/icu/0008-double-conversion-enable-for-xtensa.patch
new file mode 100644
index 0000000000..7694ee2293
--- /dev/null
+++ b/package/icu/0008-double-conversion-enable-for-xtensa.patch
@@ -0,0 +1,26 @@
+From f8f37357fa7cc403848d2bafe6152a707ca3a074 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Mon, 28 Oct 2019 21:26:05 +0100
+Subject: [PATCH] double-conversion: enable for xtensa
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ source/i18n/double-conversion-utils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/i18n/double-conversion-utils.h b/source/i18n/double-conversion-utils.h
+index a00037e..b3100ac 100644
+--- a/source/i18n/double-conversion-utils.h
++++ b/source/i18n/double-conversion-utils.h
+@@ -104,7 +104,7 @@ int main(int argc, char** argv) {
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
+ defined(__riscv) || \
+ defined(__or1k__) || defined(__arc__) || \
+- defined(__microblaze__) || \
++ defined(__microblaze__) || defined(__XTENSA__) || \
+ defined(__EMSCRIPTEN__)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(__mc68000__) || \
+--
+2.23.0
+
--
2.23.0
next prev parent reply other threads:[~2019-10-28 21:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 21:06 [Buildroot] [PATCH v1 1/2] package/qemu: enable xtensa support for host-qemu Peter Seiderer
2019-10-28 21:06 ` Peter Seiderer [this message]
2019-10-28 23:14 ` [Buildroot] [PATCH v1 2/2] package/icu: fix double conversion compile for xtensa Arnout Vandecappelle
2019-10-29 21:27 ` Peter Seiderer
2019-10-29 21:34 ` Arnout Vandecappelle
2019-10-28 23:13 ` [Buildroot] [PATCH v1 1/2] package/qemu: enable xtensa support for host-qemu Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191028210654.20400-2-ps.report@gmx.net \
--to=ps.report@gmx.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox