summaryrefslogtreecommitdiffstats
path: root/pc-bios/optionrom/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/optionrom/Makefile')
-rw-r--r--pc-bios/optionrom/Makefile12
1 files changed, 4 insertions, 8 deletions
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index e90ca2e1c6..3e06c11dea 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -20,28 +20,24 @@ override CFLAGS += $(call cc-option, -fcf-protection=none)
# Flags for dependency generation
override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
-override CFLAGS += $(filter -W%, $(QEMU_CFLAGS))
override CFLAGS += $(call cc-option, -fno-pie)
+override CFLAGS += $(call cc-option, -no-pie)
override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include
override CFLAGS += $(call cc-option, -fno-stack-protector)
override CFLAGS += $(call cc-option, -Wno-array-bounds)
-Wa = -Wa,
-override ASFLAGS += -32
-override CFLAGS += $(call cc-option, $(Wa)-32)
-
-override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
+override LDFLAGS = -nostdlib -Wl,-T,$(SRC_DIR)/flat.lds
pvh.img: pvh.o pvh_main.o
%.o: %.S
- $(call quiet-command,$(CC) $(CPPFLAGS) -E -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@")
+ $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<,"AS","$@")
%.o: %.c
$(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@")
%.img: %.o
- $(call quiet-command,$(LD) $(LDFLAGS) -s -o $@ $^,"BUILD","$@")
+ $(call quiet-command,$(CC) $(CFLAGS) $(LDFLAGS) -s -o $@ $^,"BUILD","$@")
%.raw: %.img
$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"BUILD","$@")