Skip to contentSkip to conversation

pc-bios/s390-ccw/netboot: Use "-Wl, " prefix to pass parameter to the linker

PATCH In review Thomas Huth 2 participants 2 messages Apr 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pc-bios/s390-ccw/netboot: Use "-Wl, " prefix to pass parameter to the linker

We are using the compiler to do the linking of the bios files. GCC still accepts the "-Ttext=..." linker flag directly and is smart enough to pass it to the linker, but in case we are compiling with Clang, we have to use the official way with the "-Wl," prefix instead.

---
 pc-bios/s390-ccw/netboot.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
pc-bios/s390-ccw/netboot.mak +1 -1
index 577c023afe..68b4d7edcb 100644
@@ -6,7 +6,7 @@ NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o
 LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include
 LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
 
-NETLDFLAGS := $(LDFLAGS) -Ttext=0x7800000
+NETLDFLAGS := $(LDFLAGS) -Wl,-Ttext=0x7800000
 
 $(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
 
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Thomas Huth

We are using the compiler to do the linking of the bios files. GCC still accepts the "-Ttext=..." linker flag directly and is smart enough to pass it to the linker, but in case we are compiling with Clang, we have to use the official way with the "-Wl," prefix instead.

---
 pc-bios/s390-ccw/netboot.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)