s390x: Fix build error messages
cover s390x: Fix build error messages
This fixes some non-fatal error messages during build. I have only tested TCG with no PV, so it's not intended for merge before that at least.
Thanks,
Nick
Nicholas Piggin (2):
s390x: Only run genprotimg if necessary
s390x: Specify program headers with flags to avoid linker warnings
s390x/Makefile | 4 ++++ s390x/snippets/c/flat.lds.S | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/2 s390x: Only run genprotimg if necessary
genprotimg is not required if the --host-key-document= configure option is not specified, so avoid running it in that case. This prevents the build message:
bash: line 1: genprotimg: command not found
--- s390x/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
s390x/Makefile +4 -0
@@ -213,12 +213,16 @@ $(comm-key): # The genprotimg arguments for the cck changed over time so we need to # figure out which argument to use in order to set the cck +ifneq ($(HOST_KEY_DOCUMENT),) GENPROTIMG_HAS_COMM_KEY = $(shell $(GENPROTIMG) --help | grep -q -- --comm-key && echo yes) ifeq ($(GENPROTIMG_HAS_COMM_KEY),yes) GENPROTIMG_COMM_OPTION := --comm-key else GENPROTIMG_COMM_OPTION := --x-comm-key endif +else +GENPROTIMG_HAS_COMM_KEY = +endif ifeq ($(CONFIG_DUMP),yes) # allow dumping + PCKMO
Signature · 1 line
2.43.0
Re: [kvm-unit-tests PATCH 1/2] s390x: Only run genprotimg if necessary
Quoted 7 lines · Nicholas Piggin
genprotimg is not required if the --host-key-document= configure option is not specified, so avoid running it in that case. This prevents the build message:
bash: line 1: genprotimg: command not found
Signed-off-by Nicholas Piggin <[email protected]>
This solves the immediate problem but I think we're really missing a lot more checks in the makefile and configure to sanitize the SE option space.
Anyway:
Re: [kvm-unit-tests PATCH 1/2] s390x: Only run genprotimg if necessary
Quoted 11 lines · Janosch Frank
Quoted 7 lines · Nicholas Piggin
genprotimg is not required if the --host-key-document= configure option is not specified, so avoid running it in that case. This prevents the build message:
bash: line 1: genprotimg: command not found
Signed-off-by Nicholas Piggin <[email protected]>This solves the immediate problem but I think we're really missing a lot more checks in the makefile and configure to sanitize the SE option space.
Agree, it would be ideal to find genprotimg at configure time and warn or fail if other options were specified. That looked like a bigger job and I don't have a PV environment to test with at the moment.
Quoted 2 lines
Anyway:
Reviewed-by Janosch Frank <[email protected]>
Thanks,
Nick
PATCH 2/2 s390x: Specify program headers with flags to avoid linker warnings
In reply to Nicholas PigginAvoid "LOAD segment with RWX permissions" warnings from new linkers by specifying program headers. See 59a797f451cde and linked commits for similar fixes for other architectures.
--- s390x/snippets/c/flat.lds.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
s390x/snippets/c/flat.lds.S +9 -3
@@ -1,5 +1,11 @@ #include <asm/asm-offsets.h> +PHDRS +{ + text PT_LOAD FLAGS(5); + data PT_LOAD FLAGS(6); +} + SECTIONS { .lowcore : {
@@ -29,7 +35,7 @@ SECTIONS *(.init) *(.text) *(.text.*) - } + } :text . = ALIGN(4K); etext = .; /* End text */
@@ -37,9 +43,9 @@ SECTIONS .data : { *(.data) *(.data.rel*) - } + } :data . = ALIGN(16); - .rodata : { *(.rodata) *(.rodata.*) } + .rodata : { *(.rodata) *(.rodata.*) } :data . = ALIGN(16); .bss : { *(.bss) } /* End data */
Signature · 1 line
2.43.0
Quoted 10 lines · Nicholas Piggin
This fixes some non-fatal error messages during build. I have only tested TCG with no PV, so it's not intended for merge before that at least.
Thanks,
NickNicholas Piggin (2):
s390x: Only run genprotimg if necessary
s390x: Specify program headers with flags to avoid linker warnings
Thanks, I reviewed and tested the patches, and all looks fine. Thus I went ahead and merged the two patches now.
Thomas