aboutsummaryrefslogtreecommitdiff
path: root/pl
diff options
context:
space:
mode:
Diffstat (limited to 'pl')
-rw-r--r--pl/math/Dir.mk2
-rwxr-xr-xpl/math/test/runulp.sh23
2 files changed, 16 insertions, 9 deletions
diff --git a/pl/math/Dir.mk b/pl/math/Dir.mk
index 7909ea0..bb81052 100644
--- a/pl/math/Dir.mk
+++ b/pl/math/Dir.mk
@@ -128,7 +128,7 @@ check-pl/math-rtest: $(math-host-tools) $(math-tools)
cat $(math-rtests) | build/pl/bin/rtest | $(EMULATOR) build/pl/bin/mathtest $(math-testflags)
check-pl/math-ulp: $(math-tools)
- WANT_SVE_MATH=$(WANT_SVE_MATH) ULPFLAGS="$(math-ulpflags)" build/pl/bin/runulp.sh $(EMULATOR)
+ WANT_ERRNO=$(WANT_ERRNO) WANT_SVE_MATH=$(WANT_SVE_MATH) ULPFLAGS="$(math-ulpflags)" build/pl/bin/runulp.sh $(EMULATOR)
check-pl/math: check-pl/math-test check-pl/math-rtest check-pl/math-ulp
diff --git a/pl/math/test/runulp.sh b/pl/math/test/runulp.sh
index 53043d3..1690d5f 100755
--- a/pl/math/test/runulp.sh
+++ b/pl/math/test/runulp.sh
@@ -548,15 +548,22 @@ do
do
[ -n "$X" ] || continue
# fenv checking is enabled by default, but we almost
- # always want to disable it for vector routines, so a
- # hack is needed. Pass "fenv" as fourth argument to
- # prevent -f being added to the run line.
+ # always want to disable it for vector routines. There
+ # are, however, a small number of vector routines in
+ # pl/math which are supposed to set fenv correctly
+ # when WANT_ERRNO is enabled. A hack is needed to
+ # ensure fenv checking is enabled for routines where
+ # this is the case. Pass "fenv" as fourth argument to
+ # prevent -f being added to the run line when
+ # WANT_ERRNO is enabled.
f="-f"
- if [ "$D" = "fenv" ]; then
- f=""
- elif [ ! -z "$D" ]; then
- echo "Unrecognised 4th argument: $D"
- exit 1
+ if [ $WANT_ERRNO -eq 1 ]; then
+ if [ "$D" = "fenv" ]; then
+ f=""
+ elif [ ! -z "$D" ]; then
+ echo "Unrecognised 4th argument: $D"
+ exit 1
+ fi
fi
case "$X" in \#*) continue ;; esac
t $f $F $X