From 0be92167d74fefcf7a813fd58dd5f61f483e246a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 12 Dec 2020 21:16:42 +0100 Subject: [PATCH] qemu: fix build for soft float targets Soft float targets do no define the FE_... rounding constants thus do not try to fesetround() in case the constants are not defined. --- .../patches/fix-softfloat-fesetround.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 srcpkgs/qemu/patches/fix-softfloat-fesetround.patch diff --git a/srcpkgs/qemu/patches/fix-softfloat-fesetround.patch b/srcpkgs/qemu/patches/fix-softfloat-fesetround.patch new file mode 100644 index 00000000000..009c3eab1b5 --- /dev/null +++ b/srcpkgs/qemu/patches/fix-softfloat-fesetround.patch @@ -0,0 +1,39 @@ +Source: @pullmoll +Upstream: no +Reason: Target architectures with soft float do not define these constants. + +--- tests/fp/fp-bench.c 2020-12-08 17:59:44.000000000 +0100 ++++ tests/fp/fp-bench.c 2020-12-12 20:38:40.702235420 +0100 +@@ -485,16 +485,32 @@ + + switch (rounding) { + case ROUND_EVEN: ++#if defined(FE_TONEAREST) + rhost = FE_TONEAREST; ++#else ++ return; ++#endif + break; + case ROUND_ZERO: ++#if defined(FE_TOWARDZERO) + rhost = FE_TOWARDZERO; ++#else ++ return; ++#endif + break; + case ROUND_DOWN: ++#if defined(FE_DOWNWARD) + rhost = FE_DOWNWARD; ++#else ++ return; ++#endif + break; + case ROUND_UP: ++#if defined(FE_UPWARD) + rhost = FE_UPWARD; ++#else ++ return; ++#endif + break; + case ROUND_TIEAWAY: + die_host_rounding(rounding);