zipl: Fix dependency generation in zipl/boot

When adding new header from zipl/include to a .c file within zipl/boot
a compiler error appears

	stage3.c:16:10: fatal error: zipl.h: No such file or directory
	 #include "zipl.h"
	          ^~~~~~~~
	compilation terminated.
	  CC      zipl/boot/stage3.o

This is because the rule to generate dependencies (*.o.d) does not use
the CFLAGS_BOOT. Thus it cannot find the header and fails. Note this
only applies to the dependency generation, the actual build succeeds.

To fix this rename the CFLAGS_BOOT to ALL_CFLAGS. Using ALL_CFLAGS
instead of e.g. ALL_CPPFLAGS is important to also overwrite flags given
on the commandline via OPT_FLAGS, e.g.

	make V=1 OPT_FLAGS="-D__FOO__"

While at it also remove the unused and wrong '-D__ASSEMBLY__'.

Fixes: 5a6605fe ("zipl: Ensure that boot loader CFLAGS are not overwritten")
Fixes: aa913b1e ("build process: Add automatic dependency generation")
Signed-off-by: Philipp Rudo <prudo@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:
Philipp Rudo
2019-11-04 13:07:53 +01:00
committed by Jan Höppner
parent abe0ba7412
commit 121d5d8013
+3 -3
View File
@@ -1,7 +1,7 @@
# Common definitions
include ../../common.mak
CFLAGS_BOOT = $(NO_PIE_CFLAGS) -Os -g -I../include -D__ASSEMBLY__ \
ALL_CFLAGS = $(NO_PIE_CFLAGS) -Os -g -I $(rootdir)/zipl/include \
-DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \
-fno-builtin -ffreestanding -fno-asynchronous-unwind-tables \
-fno-delete-null-pointer-checks \
@@ -21,10 +21,10 @@ all: data.o data.h tape0.bin stage3.bin
%: %.S
%.o: %.S
$(CC) $(CFLAGS_BOOT) -c -o $@ $<
$(CC) $(ALL_CFLAGS) -c -o $@ $<
%.o: %.c
$(CC) $(CFLAGS_BOOT) -c -o $@ $<
$(CC) $(ALL_CFLAGS) -c -o $@ $<
eckd2dump_sv.exec: \
head.o stage2dump.o cio.o eckd2dump.o eckd2dump_sv.o \