diff mbox series

x86emul/test: suppress GNU ld 2.39 warning about RWX load segments

Message ID 26c58539-8f58-4727-e327-442f02cc3aac@suse.com (mailing list archive)
State New, archived
Headers show
Series x86emul/test: suppress GNU ld 2.39 warning about RWX load segments | expand

Commit Message

Jan Beulich Sept. 9, 2022, 7:23 a.m. UTC
Commit 68f5aac012b9 ("build: suppress future GNU ld warning about RWX
load segments") didn't quite cover all the cases: I missed ones in the
building of the test code blobs. Clone the workaround to the helper
Makefile in question, kind of open-coding the hypervisor build system's
ld-option macro.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Roger Pau Monné March 14, 2023, 8:44 a.m. UTC | #1
On Fri, Sep 09, 2022 at 09:23:31AM +0200, Jan Beulich wrote:
> Commit 68f5aac012b9 ("build: suppress future GNU ld warning about RWX
> load segments") didn't quite cover all the cases: I missed ones in the
> building of the test code blobs. Clone the workaround to the helper
> Makefile in question, kind of open-coding the hypervisor build system's
> ld-option macro.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

My preference however would be to do this in configure, so if other
use-cases appear on the tools we could perform the check only once.

Thanks, Roger.
diff mbox series

Patch

--- a/tools/tests/x86_emulator/testcase.mk
+++ b/tools/tests/x86_emulator/testcase.mk
@@ -6,6 +6,8 @@  $(call cc-options-add,CFLAGS,CC,$(filter
 
 CFLAGS += -fno-builtin -g0 $($(TESTCASE)-cflags)
 
+LDFLAGS_DIRECT += $(shell { $(LD) -v --warn-rwx-segments; } >/dev/null 2>&1 && echo --no-warn-rwx-segments)
+
 .PHONY: all
 all: $(TESTCASE).bin