On 1/12/22 15:09, Philippe Mathieu-Daudé wrote: > +Emilio > > On 1/12/22 14:46, Philippe Mathieu-Daudé wrote: >> Anyway, with your/Akihiko/Christian help during review, this flag >> is not necessary anymore to build softmmu/tools (I still have to >> figure how to silent the "#pragma FENV_ACCESS" warning in tests), >> so let forget about this patch (except if we expect macOS ObjC to >> keep evolving and need a way to pass OBJCFLAGS). > > Apparently Clang equivalent of "#pragma STDC FENV_ACESS ON" is > "-ffp-model=strict" > > https://clang.llvm.org/docs/UsersManual.html#cmdoption-ffp-model > > I'll see if patching tests/fp/meson.build is sufficient.
This seems to do the job: -- >8 -- diff --git a/tests/fp/meson.build b/tests/fp/meson.build index 59776a00a79..b790487648a 100644 --- a/tests/fp/meson.build +++ b/tests/fp/meson.build @@ -37,6 +37,12 @@ '-Wno-error', ] +if cc.get_id() == 'clang' and cc.has_argument('-ffp-model=strict') + # Clang does not support '#pragma STDC FENV_ACCESS', but starting + # with Clang 10.0 the equivalent is -ffp-model=strict. + tfcflags += [ '-ffp-model=strict' ] +endif + tfgencases = [ tfdir / 'genCases_ui32.c', tfdir / 'genCases_ui64.c', ---