[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 1/7] configure: Allow passing extra Objective C compil
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH v3 1/7] configure: Allow passing extra Objective C compiler flags |
Date: |
Wed, 12 Jan 2022 15:47:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 |
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',
---
[RFC PATCH v3 2/7] ui/cocoa: Remove allowedFileTypes restriction in SavePanel, Philippe Mathieu-Daudé, 2022/01/10
[RFC PATCH v3 3/7] hvf: Make hvf_get_segments() / hvf_put_segments() local, Philippe Mathieu-Daudé, 2022/01/10
[RFC PATCH v3 4/7] hvf: Remove deprecated hv_vcpu_flush() calls, Philippe Mathieu-Daudé, 2022/01/10
[RFC PATCH v3 5/7] audio/coreaudio: Remove a deprecation warning on macOS 12, Philippe Mathieu-Daudé, 2022/01/10