From: Jinliang Li <jinliang.li@linux.alibaba.com>
To: musl@lists.openwall.com
Cc: jinliang.li@linux.alibaba.com
Subject: [musl] [PATCH] Fix build error for vabs.f64 and vsqrt.f64
Date: Fri, 20 Nov 2020 18:45:03 +0800 [thread overview]
Message-ID: <20201120104503.65390-1-jinliang.li@linux.alibaba.com> (raw)
To fix the build error "Error: selected fpu does not support instruction vabs.f64 or vsqrt.f64",
when single precision fpu, e.g. -mfpu=fpv5-sp-d16 is selected.
Check if double precision fpu is supported for vabs.f64 and vsqrt.f64.
---
src/math/arm/fabs.c | 2 +-
src/math/arm/sqrt.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/math/arm/fabs.c b/src/math/arm/fabs.c
index f890520a..6e1d367d 100644
--- a/src/math/arm/fabs.c
+++ b/src/math/arm/fabs.c
@@ -1,6 +1,6 @@
#include <math.h>
-#if __ARM_PCS_VFP
+#if __ARM_PCS_VFP && __ARM_FP&8
double fabs(double x)
{
diff --git a/src/math/arm/sqrt.c b/src/math/arm/sqrt.c
index 874af960..567e2e91 100644
--- a/src/math/arm/sqrt.c
+++ b/src/math/arm/sqrt.c
@@ -1,6 +1,6 @@
#include <math.h>
-#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)
+#if (__ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)) && (__ARM_FP&8)
double sqrt(double x)
{
--
2.28.0
next reply other threads:[~2020-11-20 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 10:45 Jinliang Li [this message]
2020-11-20 18:01 ` Szabolcs Nagy
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=20201120104503.65390-1-jinliang.li@linux.alibaba.com \
--to=jinliang.li@linux.alibaba.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).