Currently, the Kbuild core manipulates header search paths in a crazy way [1]. To fix this mess, I want all Makefiles to add explicit $(srctree)/ to the search paths in the srctree. Some Makefiles are already written in that way, but not all. The goal of this work is to make the notation consistent, and finally get rid of the gross hacks. Having whitespaces after -I does not matter since commit 48f6e3cf5bc6 ("kbuild: do not drop -I without parameter"). [1]: https://patchwork.kernel.org/patch/9632347/ Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
32 lines
837 B
Makefile
32 lines
837 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for some libs needed by zImage.
|
|
#
|
|
|
|
zlib := inffast.c inflate.c inftrees.c
|
|
|
|
lib-y += $(zlib:.c=.o) zmem.o
|
|
|
|
ccflags-y := -I $(srctree)/lib/zlib_inflate
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
CFLAGS_REMOVE_inflate.o = -pg
|
|
CFLAGS_REMOVE_zmem.o = -pg
|
|
CFLAGS_REMOVE_inftrees.o = -pg
|
|
CFLAGS_REMOVE_inffast.o = -pg
|
|
endif
|
|
|
|
KASAN_SANITIZE := n
|
|
|
|
CFLAGS_REMOVE_inflate.o += -fstack-protector -fstack-protector-strong
|
|
CFLAGS_REMOVE_zmem.o += -fstack-protector -fstack-protector-strong
|
|
CFLAGS_REMOVE_inftrees.o += -fstack-protector -fstack-protector-strong
|
|
CFLAGS_REMOVE_inffast.o += -fstack-protector -fstack-protector-strong
|
|
|
|
quiet_cmd_copy_zlib = COPY $@
|
|
cmd_copy_zlib = cat $< > $@
|
|
|
|
$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
|
|
$(call cmd,copy_zlib)
|
|
|
|
clean-files := $(zlib)
|