* [PULL 0/2] Final build system fixes for 9.0 @ 2024-04-12 10:03 Paolo Bonzini 2024-04-12 10:04 ` [PULL 1/2] Makefile: fix use of -j without an argument Paolo Bonzini ` (4 more replies) 0 siblings, 5 replies; 8+ messages in thread From: Paolo Bonzini @ 2024-04-12 10:03 UTC (permalink / raw) To: qemu-devel The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 2d6d995709482cc8b6a76dbb5334a28001a14a9a: meson.build: Disable -fzero-call-used-regs on OpenBSD (2024-04-12 12:02:12 +0200) ---------------------------------------------------------------- build system fixes ---------------------------------------------------------------- Matheus Tavares Bernardino (1): Makefile: fix use of -j without an argument Thomas Huth (1): meson.build: Disable -fzero-call-used-regs on OpenBSD Makefile | 9 +++++++-- meson.build | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) -- 2.44.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PULL 1/2] Makefile: fix use of -j without an argument 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini @ 2024-04-12 10:04 ` Paolo Bonzini 2024-04-12 10:04 ` [PULL 2/2] meson.build: Disable -fzero-call-used-regs on OpenBSD Paolo Bonzini ` (3 subsequent siblings) 4 siblings, 0 replies; 8+ messages in thread From: Paolo Bonzini @ 2024-04-12 10:04 UTC (permalink / raw) To: qemu-devel; +Cc: Matheus Tavares Bernardino From: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Our Makefile massages the given make arguments to invoke ninja accordingly. One key difference is that ninja will parallelize by default, whereas make only does so with -j<n> or -j. The make man page says that "if the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously". We use to support that by replacing -j with "" (empty string) when calling ninja, so that it would do its auto-parallelization based on the number of CPU cores. This was accidentally broken at d1ce2cc95b (Makefile: preserve --jobserver-auth argument when calling ninja, 2024-04-02), causing `make -j` to fail: $ make -j V=1 /usr/bin/ninja -v -j -d keepdepfile all | cat make -C contrib/plugins/ V="1" TARGET_DIR="contrib/plugins/" all ninja: fatal: invalid -j parameter make: *** [Makefile:161: run-ninja] Error Let's fix that and indent the touched code for better readability. Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Fixes: d1ce2cc95b ("Makefile: preserve --jobserver-auth argument when calling ninja", 2024-04-02) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 183756018ff..02a257584ba 100644 --- a/Makefile +++ b/Makefile @@ -141,8 +141,13 @@ MAKE.n = $(findstring n,$(firstword $(filter-out --%,$(MAKEFLAGS)))) MAKE.k = $(findstring k,$(firstword $(filter-out --%,$(MAKEFLAGS)))) MAKE.q = $(findstring q,$(firstword $(filter-out --%,$(MAKEFLAGS)))) MAKE.nq = $(if $(word 2, $(MAKE.n) $(MAKE.q)),nq) -NINJAFLAGS = $(if $V,-v) $(if $(MAKE.n), -n) $(if $(MAKE.k), -k0) \ - $(or $(filter -l% -j%, $(MAKEFLAGS)), $(if $(filter --jobserver-auth=%, $(MAKEFLAGS)),, -j1)) \ +NINJAFLAGS = \ + $(if $V,-v) \ + $(if $(MAKE.n), -n) \ + $(if $(MAKE.k), -k0) \ + $(filter-out -j, \ + $(or $(filter -l% -j%, $(MAKEFLAGS)), \ + $(if $(filter --jobserver-auth=%, $(MAKEFLAGS)),, -j1))) \ -d keepdepfile ninja-cmd-goals = $(or $(MAKECMDGOALS), all) ninja-cmd-goals += $(foreach g, $(MAKECMDGOALS), $(.ninja-goals.$g)) -- 2.44.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PULL 2/2] meson.build: Disable -fzero-call-used-regs on OpenBSD 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini 2024-04-12 10:04 ` [PULL 1/2] Makefile: fix use of -j without an argument Paolo Bonzini @ 2024-04-12 10:04 ` Paolo Bonzini 2024-04-12 11:07 ` [PULL 0/2] Final build system fixes for 9.0 Philippe Mathieu-Daudé ` (2 subsequent siblings) 4 siblings, 0 replies; 8+ messages in thread From: Paolo Bonzini @ 2024-04-12 10:04 UTC (permalink / raw) To: qemu-devel; +Cc: Thomas Huth, Philippe Mathieu-Daudé From: Thomas Huth <thuth@redhat.com> QEMU currently does not work on OpenBSD since the -fzero-call-used-regs option that we added to meson.build recently does not work with the "retguard" extension from OpenBSD's Clang. Thus let's disable the -fzero-call-used-regs here until there's a better solution available. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2278 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240411120819.56417-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c9c3217ba4b..91a0aa64c64 100644 --- a/meson.build +++ b/meson.build @@ -562,7 +562,11 @@ hardening_flags = [ # # NB: Clang 17 is broken and SEGVs # https://github.com/llvm/llvm-project/issues/75168 -if cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb(); }', +# +# NB2: This clashes with the "retguard" extension of OpenBSD's Clang +# https://gitlab.com/qemu-project/qemu/-/issues/2278 +if host_os != 'openbsd' and \ + cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb(); }', name: '-fzero-call-used-regs=used-gpr', args: ['-O2', '-fzero-call-used-regs=used-gpr']) hardening_flags += '-fzero-call-used-regs=used-gpr' -- 2.44.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PULL 0/2] Final build system fixes for 9.0 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini 2024-04-12 10:04 ` [PULL 1/2] Makefile: fix use of -j without an argument Paolo Bonzini 2024-04-12 10:04 ` [PULL 2/2] meson.build: Disable -fzero-call-used-regs on OpenBSD Paolo Bonzini @ 2024-04-12 11:07 ` Philippe Mathieu-Daudé 2024-04-12 11:08 ` Paolo Bonzini 2024-04-12 11:16 ` Peter Maydell 2024-04-12 14:54 ` Peter Maydell 2024-04-12 16:13 ` Peter Maydell 4 siblings, 2 replies; 8+ messages in thread From: Philippe Mathieu-Daudé @ 2024-04-12 11:07 UTC (permalink / raw) To: Peter Maydell, Paolo Bonzini, qemu-devel Hi Peter, On 12/4/24 12:03, Paolo Bonzini wrote: > The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: > > Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) > > are available in the Git repository at: > > https://gitlab.com/bonzini/qemu.git tags/for-upstream > > for you to fetch changes up to 2d6d995709482cc8b6a76dbb5334a28001a14a9a: > > meson.build: Disable -fzero-call-used-regs on OpenBSD (2024-04-12 12:02:12 +0200) > > ---------------------------------------------------------------- > build system fixes Since these 2 patches don't modify what we can build with v9.0.0-rc3, would it be acceptable to merge them without having to produce a v9.0.0-rc4 tag before the final release? > ---------------------------------------------------------------- > Matheus Tavares Bernardino (1): > Makefile: fix use of -j without an argument > > Thomas Huth (1): > meson.build: Disable -fzero-call-used-regs on OpenBSD > > Makefile | 9 +++++++-- > meson.build | 6 +++++- > 2 files changed, 12 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PULL 0/2] Final build system fixes for 9.0 2024-04-12 11:07 ` [PULL 0/2] Final build system fixes for 9.0 Philippe Mathieu-Daudé @ 2024-04-12 11:08 ` Paolo Bonzini 2024-04-12 11:16 ` Peter Maydell 1 sibling, 0 replies; 8+ messages in thread From: Paolo Bonzini @ 2024-04-12 11:08 UTC (permalink / raw) To: Philippe Mathieu-Daudé; +Cc: Peter Maydell, qemu-devel > Since these 2 patches don't modify what we can build with v9.0.0-rc3, > would it be acceptable to merge them without having to produce a > v9.0.0-rc4 tag before the final release? I didn't want to ask you about that, but I agree it would not be an issue. Paolo ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PULL 0/2] Final build system fixes for 9.0 2024-04-12 11:07 ` [PULL 0/2] Final build system fixes for 9.0 Philippe Mathieu-Daudé 2024-04-12 11:08 ` Paolo Bonzini @ 2024-04-12 11:16 ` Peter Maydell 1 sibling, 0 replies; 8+ messages in thread From: Peter Maydell @ 2024-04-12 11:16 UTC (permalink / raw) To: Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, qemu-devel On Fri, 12 Apr 2024 at 12:07, Philippe Mathieu-Daudé <philmd@linaro.org> wrote: > > Hi Peter, > > On 12/4/24 12:03, Paolo Bonzini wrote: > > The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: > > > > Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) > > > > are available in the Git repository at: > > > > https://gitlab.com/bonzini/qemu.git tags/for-upstream > > > > for you to fetch changes up to 2d6d995709482cc8b6a76dbb5334a28001a14a9a: > > > > meson.build: Disable -fzero-call-used-regs on OpenBSD (2024-04-12 12:02:12 +0200) > > > > ---------------------------------------------------------------- > > build system fixes > > Since these 2 patches don't modify what we can build with v9.0.0-rc3, > would it be acceptable to merge them without having to produce a > v9.0.0-rc4 tag before the final release? As a principle, I don't ever do a final release that doesn't match the last rc tag. If the changes are minimal I might reduce the time between last-rc and final release. But we'll see if anything else turns up that needs to go into 9.0. There was so much late stuff for rc3 that I have a feeling this might not be the only 9.0 pullreq. thanks -- PMM ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PULL 0/2] Final build system fixes for 9.0 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini ` (2 preceding siblings ...) 2024-04-12 11:07 ` [PULL 0/2] Final build system fixes for 9.0 Philippe Mathieu-Daudé @ 2024-04-12 14:54 ` Peter Maydell 2024-04-12 16:13 ` Peter Maydell 4 siblings, 0 replies; 8+ messages in thread From: Peter Maydell @ 2024-04-12 14:54 UTC (permalink / raw) To: Paolo Bonzini; +Cc: qemu-devel On Fri, 12 Apr 2024 at 11:04, Paolo Bonzini <pbonzini@redhat.com> wrote: > > The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: > > Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) > > are available in the Git repository at: > > https://gitlab.com/bonzini/qemu.git tags/for-upstream > > for you to fetch changes up to 2d6d995709482cc8b6a76dbb5334a28001a14a9a: > > meson.build: Disable -fzero-call-used-regs on OpenBSD (2024-04-12 12:02:12 +0200) > > ---------------------------------------------------------------- > build system fixes > > ---------------------------------------------------------------- > Matheus Tavares Bernardino (1): > Makefile: fix use of -j without an argument > > Thomas Huth (1): > meson.build: Disable -fzero-call-used-regs on OpenBSD Something's gone wrong with your pullreq : that tags/for-upstream doesn't have these commits, it still has the contents from your April 9th pullreq. thanks -- PMM ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PULL 0/2] Final build system fixes for 9.0 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini ` (3 preceding siblings ...) 2024-04-12 14:54 ` Peter Maydell @ 2024-04-12 16:13 ` Peter Maydell 4 siblings, 0 replies; 8+ messages in thread From: Peter Maydell @ 2024-04-12 16:13 UTC (permalink / raw) To: Paolo Bonzini; +Cc: qemu-devel On Fri, 12 Apr 2024 at 11:04, Paolo Bonzini <pbonzini@redhat.com> wrote: > > The following changes since commit 02e16ab9f4f19c4bdd17c51952d70e2ded74c6bf: > > Update version for v9.0.0-rc3 release (2024-04-10 18:05:18 +0100) > > are available in the Git repository at: > > https://gitlab.com/bonzini/qemu.git tags/for-upstream > > for you to fetch changes up to 2d6d995709482cc8b6a76dbb5334a28001a14a9a: > > meson.build: Disable -fzero-call-used-regs on OpenBSD (2024-04-12 12:02:12 +0200) > > ---------------------------------------------------------------- > build system fixes > > ---------------------------------------------------------------- Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0 for any user-visible changes. -- PMM ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-04-12 16:14 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-12 10:03 [PULL 0/2] Final build system fixes for 9.0 Paolo Bonzini 2024-04-12 10:04 ` [PULL 1/2] Makefile: fix use of -j without an argument Paolo Bonzini 2024-04-12 10:04 ` [PULL 2/2] meson.build: Disable -fzero-call-used-regs on OpenBSD Paolo Bonzini 2024-04-12 11:07 ` [PULL 0/2] Final build system fixes for 9.0 Philippe Mathieu-Daudé 2024-04-12 11:08 ` Paolo Bonzini 2024-04-12 11:16 ` Peter Maydell 2024-04-12 14:54 ` Peter Maydell 2024-04-12 16:13 ` Peter Maydell
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).