s390x: Improve out-of-source builds
cover s390x: Improve out-of-source builds
Marc Hartmayer (2):
s390x/Makefile: Make sure the linker script is generated in the build
directory
s390x/Makefile: Add auxinfo.o to cflatobjs
s390x/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
base-commit: 0ed2cdf3c80ee803b9150898e687e77e4d6f5db2
Signature · 1 line
2.48.1
PATCH 1/2 s390x/Makefile: Make sure the linker script is generated in the build directory
This change makes sure that the 'flat.lds' linker script is actually generated in the build directory and not source directory - this makes a difference in case of an out-of-source build.
--- s390x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
s390x/Makefile +2 -2
@@ -182,8 +182,8 @@ lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ $(CC) $(CFLAGS) -c -o $@ $< -DPROGNAME=\"$(@:.aux.o=.elf)\" .SECONDEXPANSION: -%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o - @$(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \ +%.elf: $(FLATLIBS) $(asmlib) s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o + @$(CC) $(LDFLAGS) -o $@ -T s390x/flat.lds \ $(filter %.o, $^) $(FLATLIBS) $(snippets-obj) $(snippet-hdr-obj) || \ { echo "Failure probably caused by missing definition of gen-se-header executable"; exit 1; } @chmod a-x $@
Signature · 1 line
2.48.1
Re: [kvm-unit-tests PATCH v1 1/2] s390x/Makefile: Make sure the linker script is generated in the build directory
Quoted 14 lines · Marc Hartmayer
This change makes sure that the '
flat.lds' linker script is actually generated in the build directory and not source directory - this makes a difference in case of an out-of-source build.Signed-off-by Marc Hartmayer <[email protected]>--- s390x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)s390x/Makefile +0
-0
s390x/Makefile lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ · line 187
Quoted 8 lines
s390x/Makefile +2
-2@@ -182,8 +182,8 @@ lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ $(CC) $(CFLAGS) -c -o $@ $< -DPROGNAME=\"$(@:.aux.o=.elf)\" .SECONDEXPANSION: -%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o - @$(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \ +%.elf: $(FLATLIBS) $(asmlib) s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o + @$(CC) $(LDFLAGS) -o $@ -T s390x/flat.lds \
s390x/flat.lds should be replaced by $(TESTDIR)/flat.lds
Quoted 7 lines
s390x/Makefile +0
-0$(filter %.o, $^) $(FLATLIBS) $(snippets-obj) $(snippet-hdr-obj) || \ { echo "Failure probably caused by missing definition of gen-se-header executable"; exit 1; }@chmod a-x $@
Signature · 1 line
2.48.1
Signature · 8 lines
Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
Re: [kvm-unit-tests PATCH v1 1/2] s390x/Makefile: Make sure the linker script is generated in the build directory
Quoted 17 lines · Marc Hartmayer
Quoted 16 lines · Marc Hartmayer
This change makes sure that the '
flat.lds' linker script is actually generated in the build directory and not source directory - this makes a difference in case of an out-of-source build.Signed-off-by Marc Hartmayer <[email protected]>--- s390x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)s390x/Makefile +0
-0@@ -182,8 +182,8 @@ lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ $(CC) $(CFLAGS) -c -o $@ $< -DPROGNAME=\"$(@:.aux.o=.elf)\"
Quoted 8 lines
s390x/Makefile lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ · line 186
Quoted 6 lines
s390x/Makefile +2
-2.SECONDEXPANSION: -%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o - @$(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \ +%.elf: $(FLATLIBS) $(asmlib) s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o + @$(CC) $(LDFLAGS) -o $@ -T s390x/flat.lds \
s390x/flat.ldsshould be replaced by $(TESTDIR)/flat.lds
fwiw, s/TESTDIR/TEST_DIR/
Otherwise, yes, will fix it up when picking. Thanks!
Re: [kvm-unit-tests PATCH v1 1/2] s390x/Makefile: Make sure the linker script is generated in the build directory
Quoted 22 lines · Nico Boehr
Quoted 21 lines · Marc Hartmayer
Quoted 19 lines · Marc Hartmayer
This change makes sure that the '
flat.lds' linker script is actually generated in the build directory and not source directory - this makes a difference in case of an out-of-source build.Signed-off-by Marc Hartmayer <[email protected]>--- s390x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)s390x/Makefile +0
-2@@ -182,8 +182,8 @@ lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ $(CC) $(CFLAGS) -c -o $@ $< -DPROGNAME=\"$(@:.aux.o=.elf)\" .SECONDEXPANSION: -%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o - @$(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \
Quoted 8 lines
Quoted 4 lines
s390x/Makefile lds-autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d -MT $@ · line 186
Quoted 2 lines
s390x/Makefile +2
-0+%.elf: $(FLATLIBS) $(asmlib) s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o + @$(CC) $(LDFLAGS) -o $@ -T s390x/flat.lds \
s390x/flat.ldsshould be replaced by $(TESTDIR)/flat.ldsfwiw, s/TESTDIR/TEST_DIR/
Otherwise, yes, will fix it up when picking. Thanks!
Thanks.
Signature · 8 lines
Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Wolfgang Wendt Geschäftsführung: David Faller Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
Re: [kvm-unit-tests PATCH v1 1/2] s390x/Makefile: Make sure the linker script is generated in the build directory
In reply to Marc HartmayerQuoted 5 lines · Marc Hartmayer
This change makes sure that the '
flat.lds' linker script is actually generated in the build directory and not source directory - this makes a difference in case of an out-of-source build.Signed-off-by Marc Hartmayer <[email protected]>
PATCH 2/2 s390x/Makefile: Add auxinfo.o to cflatobjs
In reply to Marc HartmayerThis makes sure that the file is removed in case of make clean as the top Makefile cleans all objects defined in 'cflagsobjs'.
--
Note: AFAICT, the computed sh256sum values of the generated .elf and .bin files
did not change.
--- s390x/Makefile | 1 + 1 file changed, 1 insertion(+)
s390x/Makefile +1 -0
@@ -90,6 +90,7 @@ LDFLAGS += -Wl,--build-id=none asm-offsets = lib/$(ARCH)/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak +cflatobjs += lib/auxinfo.o cflatobjs += lib/util.o cflatobjs += lib/alloc.o cflatobjs += lib/alloc_phys.o
Signature · 1 line
2.48.1
Re: [kvm-unit-tests PATCH v1 2/2] s390x/Makefile: Add auxinfo.o to cflatobjs
Quoted 4 lines · Marc Hartmayer
This makes sure that the file is removed in case of
make cleanas the topMakefilecleans all objects defined in 'cflagsobjs'.Signed-off-by Marc Hartmayer <[email protected]>