aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/Makefile
diff options
context:
space:
mode:
authorMarc Hartmayer <mhartmay@linux.ibm.com>2024-10-01 17:36:18 +0200
committerThomas Huth <thuth@redhat.com>2024-10-23 06:53:44 +0200
commit694d79ffce996c0993cebccc07c2ab6fc281e7d0 (patch)
tree92bdad7ee65d07fc547ae772b9ddcef65616830c /pc-bios/s390-ccw/Makefile
parent3259b4424a85d9cdfd1a33ed6030a6c51c1b9b8b (diff)
pc-bios/s390-ccw: Introduce `EXTRA_LDFLAGS`
Some packaging tools want to override `LDFLAGS` when building QEMU, this will result in a build error as most likely no `-nostdlib` flag is passed. Introduce `EXTRA_LDFLAGS` so that the packager can override `LDFLAGS` without breaking the build. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Message-ID: <20241001153618.17791-4-mhartmay@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Drop the hunk to netbook.mak which is not necessary anymore] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/Makefile')
-rw-r--r--pc-bios/s390-ccw/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
index 38254e22df..dc69dd484f 100644
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -4,6 +4,7 @@ all: build-all
include config-host.mak
CFLAGS = -O2 -g -I $(SRC_PATH)/../../include/hw/s390x/ipl
+LDFLAGS ?=
MAKEFLAGS += -rR
GIT_SUBMODULES = roms/SLOF
@@ -46,7 +47,7 @@ EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables
EXTRA_CFLAGS += -msoft-float
EXTRA_CFLAGS += -std=gnu99
EXTRA_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
-LDFLAGS += -Wl,-pie -nostdlib -z noexecstack -z text
+EXTRA_LDFLAGS += -Wl,-pie -nostdlib -z noexecstack -z text
cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>/dev/null
cc-option = if $(call cc-test, $1); then \
@@ -111,7 +112,7 @@ libnet.a: $(LIBNETOBJS)
build-all: s390-ccw.img
s390-ccw.elf: $(OBJECTS) libnet.a libc.a
- $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^,Linking)
+ $(call quiet-command,$(CC) $(EXTRA_LDFLAGS) $(LDFLAGS) -o $@ $^,Linking)
s390-ccw.img: s390-ccw.elf
$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,Stripping $< into)