mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl: Use the compiler for linking instead of ld
Instead of directly calling ld, it is recommended to call the compiler to do the linking. Do that and adapt the linker flags accordingly. This also fixes build issues with newer binutils as -no-pie has never been a valid option for ld itself. See: https://sourceware.org/bugzilla/show_bug.cgi?id=27050 https://bugs.launchpad.net/ubuntu/+source/s390-tools/+bug/1907789 LD has no user anymore and is removed. Closes: https://github.com/ibm-s390-tools/s390-tools/pull/106 Reported-by: Lukas Märdian <lukas.maerdian@canonical.com> Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -60,7 +60,6 @@ endef
|
||||
|
||||
$(eval $(call cmd_define, AS," AS ",$(CROSS_COMPILE)as))
|
||||
$(eval $(call cmd_define, LINK," LINK ",$(CROSS_COMPILE)gcc))
|
||||
$(eval $(call cmd_define, LD," LD ",$(CROSS_COMPILE)ld))
|
||||
$(eval $(call cmd_define, CC," CC ",$(CROSS_COMPILE)gcc))
|
||||
$(eval $(call cmd_define, HOSTCC," HOSTCC ",gcc))
|
||||
$(eval $(call cmd_define, LINKXX," LINKXX ",$(CROSS_COMPILE)g++))
|
||||
|
||||
@@ -110,7 +110,7 @@ stage3.bin: stage3.exec
|
||||
$< $@
|
||||
|
||||
data.o: $(FILES)
|
||||
$(LD) $(NO_PIE_LDFLAGS) -r -b binary -o data.o $(FILES)
|
||||
$(LINK) $(NO_PIE_LDFLAGS) -static -nostdlib -Wl,--relocatable -Wl,--format,binary -o data.o $(FILES)
|
||||
|
||||
data.h: data.o
|
||||
rm -f data.h
|
||||
|
||||
Reference in New Issue
Block a user