Create a separate variable for compiler flags that enable
specific instruction set extensions, so that they can be used with
cc.compiles/cc.links.
Note that -mfpmath=sse is a code generation option but it does not
enable new instructions, therefore I did not make it part of
qemu_isa_flags.
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 76335bb2a51..bbb0f6d9bcf 100644
--- a/meson.build
+++ b/meson.build
@@ -335,6 +335,10 @@ elif host_os == 'windows'
endif
endif
+# Choose instruction set (currently x86-only)
+
+qemu_isa_flags = []
+
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
# use i686 as default anyway, but for those that don't, an explicit
# specification is necessary
@@ -351,7 +355,7 @@ if host_arch == 'i386' and not cc.links('''
sfaa(&val);
return val;
}''')
- qemu_common_flags = ['-march=i486'] + qemu_common_flags
+ qemu_isa_flags = ['-march=i486']