build: fix recurse-all target
The missing "/all" suffix prevents the pc-bios/ parts of the build
from running.
In the meanwhile, -Wall has moved from QEMU_CFLAGS to CFLAGS. Simplify
everything by not passing down CFLAGS, and add -Wall in the recursive
Makefiles.
Reported-by: Miroslav Rezanina <mrezanin@redhat.com>
Reviewed-by: Miroslav Rezanina <mrezanin@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Fixes: 5e6d1573b4
("remove Makefile.target", 2020-08-21)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1a94933fcc
commit
49b7d74426
4
Makefile
4
Makefile
@ -186,10 +186,10 @@ ROM_DIRS_RULES=$(foreach t, all clean, $(addsuffix /$(t), $(ROM_DIRS)))
|
|||||||
# Only keep -O and -g cflags
|
# Only keep -O and -g cflags
|
||||||
.PHONY: $(ROM_DIRS_RULES)
|
.PHONY: $(ROM_DIRS_RULES)
|
||||||
$(ROM_DIRS_RULES):
|
$(ROM_DIRS_RULES):
|
||||||
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" CFLAGS="$(filter -O% -g%,$(CFLAGS))" $(notdir $@),)
|
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),)
|
||||||
|
|
||||||
.PHONY: recurse-all recurse-clean
|
.PHONY: recurse-all recurse-clean
|
||||||
recurse-all: $(ROM_DIRS)
|
recurse-all: $(addsuffix /all, $(ROM_DIRS))
|
||||||
recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
|
recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -8,15 +8,12 @@ all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
|
|||||||
@true
|
@true
|
||||||
|
|
||||||
include ../../config-host.mak
|
include ../../config-host.mak
|
||||||
|
CFLAGS = -O2 -g
|
||||||
|
|
||||||
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
|
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
|
||||||
cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2)
|
cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2)
|
||||||
|
|
||||||
# Compiling with no optimization creates ROMs that are too large
|
override CFLAGS += -march=i486 -Wall
|
||||||
ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0)
|
|
||||||
override CFLAGS += -O2
|
|
||||||
endif
|
|
||||||
override CFLAGS += -march=i486
|
|
||||||
|
|
||||||
# Flags for dependency generation
|
# Flags for dependency generation
|
||||||
override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
|
override CPPFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
|
||||||
@ -42,7 +39,6 @@ Wa = -Wa,
|
|||||||
override ASFLAGS += -32
|
override ASFLAGS += -32
|
||||||
override CFLAGS += $(call cc-option, $(Wa)-32)
|
override CFLAGS += $(call cc-option, $(Wa)-32)
|
||||||
|
|
||||||
|
|
||||||
LD_I386_EMULATION ?= elf_i386
|
LD_I386_EMULATION ?= elf_i386
|
||||||
override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
|
override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
|
||||||
override LDFLAGS += $(LDFLAGS_NOPIE)
|
override LDFLAGS += $(LDFLAGS_NOPIE)
|
||||||
|
@ -3,6 +3,7 @@ all: build-all
|
|||||||
@true
|
@true
|
||||||
|
|
||||||
include ../../config-host.mak
|
include ../../config-host.mak
|
||||||
|
CFLAGS = -O2 -g
|
||||||
|
|
||||||
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
|
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
|
||||||
cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null > /dev/null \
|
cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null > /dev/null \
|
||||||
@ -28,7 +29,7 @@ QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d
|
|||||||
OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
|
OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
|
||||||
virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o
|
virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o
|
||||||
|
|
||||||
QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
|
QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS))
|
||||||
QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
|
QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
|
||||||
QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
|
QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
|
||||||
QEMU_CFLAGS += -fno-asynchronous-unwind-tables
|
QEMU_CFLAGS += -fno-asynchronous-unwind-tables
|
||||||
|
Loading…
Reference in New Issue
Block a user