meson.build: add -mcx16 flag
PATCH 1/1 meson.build: add -mcx16 flag
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -298,7 +298,7 @@ endforeach qemu_common_flags = [ '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', - '-fno-strict-aliasing', '-fno-common', '-fwrapv' ] + '-fno-strict-aliasing', '-fno-common', '-fwrapv', '-mcx16' ] qemu_cflags = [] qemu_ldflags = []
Signature · 1 line
2.25.1
Quoted 1 line · Artyom Kunakovsky
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
Isn't this simply user error, with the right answer being to pass a valid CPU target to --cpu, rather than "unknown"
Quoted 5 lines
Signed-off-by Artyom Kunakovsky <[email protected]>--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
The compilation error caused by attempting of use 128 bit '__sync_val_compare_and_swap_16', which is supported on the host but not enabled, I don't think this is expected behavior.
Also the patch is little incomplete, I already sent v2 patch, that applying the flag only for x86_64 host.
With regards,
Artyom K.
________________________________
From: Daniel P. Berrangé <[email protected]>
Sent: Thursday, May 23, 2024 11:02:31 AM
To: Artyom Kunakovsky <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [PATCH] meson.build: add -mcx16 flag
Quoted 1 line · Artyom Kunakovsky
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
Isn't this simply user error, with the right answer being to pass a valid CPU target to --cpu, rather than "unknown"
Quoted 5 lines
Signed-off-by Artyom Kunakovsky <[email protected]>--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 6 lines · Daniel P. Berrangé
Quoted 1 line · Artyom Kunakovsky
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
Isn't this simply user error, with the right answer being to pass a valid CPU target to --cpu, rather than "unknown"
I've felt for ages that we should probably drop the "unrecognized host CPU, fall back to TCI" path and insist that we only run on recognized CPU types. Then we could also sanity check that the user passed a valid --cpu option.
thanks
-- PMM
Quoted 5 lines · Peter Maydell
Quoted 4 lines · Daniel P. Berrangé
Quoted 1 line · Artyom Kunakovsky
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
Quoted 7 lines
Quoted 2 lines
Isn't this simply user error, with the right answer being to pass a valid CPU target to --cpu, rather than "unknown"
I've felt for ages that we should probably drop the "unrecognized host CPU, fall back to TCI" path and insist that we only run on recognized CPU types. Then we could also sanity check that the user passed a valid --cpu option.
Yeah, I think that's reasonable. Worst case, a user will have to send us a patch to recognise a new CPU target, at which point at least we know that it exists as a possible target.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 12 lines · Artyom Kunakovsky
fix linker error if the project was configured by the './configure --cpu=unknown --target-list=riscv64-softmmu' command
Signed-off-by Artyom Kunakovsky <[email protected]>--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meson.build +0
-0
meson.build endforeach · line 301
Quoted 5 lines
meson.build +1
-1@@ -298,7 +298,7 @@ endforeach qemu_common_flags = [ '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', - '-fno-strict-aliasing', '-fno-common', '-fwrapv' ] + '-fno-strict-aliasing', '-fno-common', '-fwrapv', '-mcx16' ]
-mcx16 does not exist on non-x86 hosts so this change breaks them.
QEMU's configure script knows to add -mcx16 on x86 hosts; you've added --cpu=unknown yourself, you have to add --extra-cflags=-mcx16 as well.
Paolo
Quoted 3 lines
meson.build +0
-0qemu_cflags = [] qemu_ldflags = []