* [PATCH] build: make meson-buildoptions.sh stable
@ 2023-02-06 12:32 Paolo Bonzini
2023-02-06 13:22 ` Alex Bennée
2023-02-06 14:55 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2023-02-06 12:32 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee, f4bug
The library directory can change depending on the multilib setup of the host.
It would be even better to detect it in configure with the same algorithm
that Meson uses, but the important thing to avoid confusing developers is
to have identical contents of scripts/meson-buildoptions.sh, independent
of the distro and architecture on which it was created.
So, for now just give a custom default value to libdir.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/meson-buildoptions.py | 7 +++++--
scripts/meson-buildoptions.sh | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py
index 3e2b4785388f..a04dcc70a5b7 100755
--- a/scripts/meson-buildoptions.py
+++ b/scripts/meson-buildoptions.py
@@ -61,7 +61,10 @@
# Convert the default value of an option to the string used in
# the help message
-def value_to_help(value):
+def get_help(opt):
+ if opt["name"] == "libdir":
+ return 'system default'
+ value = opt["value"]
if isinstance(value, list):
return ",".join(value)
if isinstance(value, bool):
@@ -88,7 +91,7 @@ def sh_print(line=""):
def help_line(left, opt, indent, long):
right = f'{opt["description"]}'
if long:
- value = value_to_help(opt["value"])
+ value = get_help(opt)
if value != "auto" and value != "":
right += f" [{value}]"
if "choices" in opt and long:
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 0f71e92dcba6..d663c9cadfbe 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -49,7 +49,7 @@ meson_options_help() {
printf "%s\n" ' --includedir=VALUE Header file directory [include]'
printf "%s\n" ' --interp-prefix=VALUE where to find shared libraries etc., use %M for'
printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]'
- printf "%s\n" ' --libdir=VALUE Library directory [lib64]'
+ printf "%s\n" ' --libdir=VALUE Library directory [system default]'
printf "%s\n" ' --libexecdir=VALUE Library executable directory [libexec]'
printf "%s\n" ' --localedir=VALUE Locale data directory [share/locale]'
printf "%s\n" ' --localstatedir=VALUE Localstate data directory [/var/local]'
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] build: make meson-buildoptions.sh stable
2023-02-06 12:32 [PATCH] build: make meson-buildoptions.sh stable Paolo Bonzini
@ 2023-02-06 13:22 ` Alex Bennée
2023-02-06 14:55 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2023-02-06 13:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, f4bug
Paolo Bonzini <pbonzini@redhat.com> writes:
> The library directory can change depending on the multilib setup of the host.
> It would be even better to detect it in configure with the same algorithm
> that Meson uses, but the important thing to avoid confusing developers is
> to have identical contents of scripts/meson-buildoptions.sh, independent
> of the distro and architecture on which it was created.
>
> So, for now just give a custom default value to libdir.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] build: make meson-buildoptions.sh stable
2023-02-06 12:32 [PATCH] build: make meson-buildoptions.sh stable Paolo Bonzini
2023-02-06 13:22 ` Alex Bennée
@ 2023-02-06 14:55 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-06 14:55 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: alex.bennee, f4bug
On 6/2/23 13:32, Paolo Bonzini wrote:
> The library directory can change depending on the multilib setup of the host.
> It would be even better to detect it in configure with the same algorithm
> that Meson uses, but the important thing to avoid confusing developers is
> to have identical contents of scripts/meson-buildoptions.sh, independent
> of the distro and architecture on which it was created.
>
> So, for now just give a custom default value to libdir.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> scripts/meson-buildoptions.py | 7 +++++--
> scripts/meson-buildoptions.sh | 2 +-
> 2 files changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-06 14:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-06 12:32 [PATCH] build: make meson-buildoptions.sh stable Paolo Bonzini
2023-02-06 13:22 ` Alex Bennée
2023-02-06 14:55 ` Philippe Mathieu-Daudé
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).