qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
@ 2024-04-30 16:47 Dario Binacchi
  2024-04-30 17:02 ` Alex Bennée
  2024-04-30 18:15 ` Richard Henderson
  0 siblings, 2 replies; 11+ messages in thread
From: Dario Binacchi @ 2024-04-30 16:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Alex Bennée, Philippe Mathieu-Daudé,
	Thomas Huth, michael, linux-amarula, Dario Binacchi

The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not
always provided by the libc (uClibc). The patch disables its compilation
in case the header is not available.

The patch is based on a suggestion from Paolo Bonzini, which you can
find at the following link.

Link: https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg00492.html
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 tests/fp/meson.build | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/fp/meson.build b/tests/fp/meson.build
index 114b4b483ea7..0e1237be54ed 100644
--- a/tests/fp/meson.build
+++ b/tests/fp/meson.build
@@ -126,12 +126,14 @@ test('fp-test-mulAdd', fptest,
            ['f16_mulAdd', 'f32_mulAdd', 'f64_mulAdd', 'f128_mulAdd'],
      suite: ['softfloat-slow', 'softfloat-ops-slow', 'slow'], timeout: 180)
 
-executable(
-  'fp-bench',
-  ['fp-bench.c', '../../fpu/softfloat.c'],
-  dependencies: [qemuutil, libtestfloat, libsoftfloat],
-  c_args: fpcflags,
-)
+if cc.has_header('fenv.h')
+  executable(
+    'fp-bench',
+    ['fp-bench.c', '../../fpu/softfloat.c'],
+    dependencies: [qemuutil, libtestfloat, libsoftfloat],
+    c_args: fpcflags,
+  )
+endif
 
 fptestlog2 = executable(
   'fp-test-log2',
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-13 12:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30 16:47 [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing Dario Binacchi
2024-04-30 17:02 ` Alex Bennée
2024-04-30 18:15 ` Richard Henderson
2024-05-01 12:18   ` Dario Binacchi
2024-05-01 13:31     ` Richard Henderson
2024-05-01 14:17       ` Dario Binacchi
2024-05-11 10:11         ` Dario Binacchi
2024-05-11 10:25           ` Richard Henderson
2024-05-11 11:09             ` Dario Binacchi
2024-05-13 10:10               ` Thomas Huth
2024-05-13 12:21               ` Alex Bennée

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).