mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
gcc-plugins: Add support for plugin subdirectories
This adds support for building more complex gcc plugins that live in a subdirectory instead of just in a single source file. Reported-by: PaX Team <pageexec@freemail.hu> Signed-off-by: Emese Revfy <re.emese@gmail.com> [kees: clarified commit message] Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
7040c83bfb
commit
caefd8c9a9
2 changed files with 8 additions and 4 deletions
|
@ -12,15 +12,18 @@ else
|
|||
export HOST_EXTRACXXFLAGS
|
||||
endif
|
||||
|
||||
export GCCPLUGINS_DIR HOSTLIBS
|
||||
|
||||
ifneq ($(CFLAGS_KCOV), $(SANCOV_PLUGIN))
|
||||
GCC_PLUGIN := $(filter-out $(SANCOV_PLUGIN), $(GCC_PLUGIN))
|
||||
endif
|
||||
|
||||
$(HOSTLIBS)-y := $(GCC_PLUGIN)
|
||||
export HOSTLIBS
|
||||
|
||||
$(HOSTLIBS)-y := $(foreach p,$(GCC_PLUGIN),$(if $(findstring /,$(p)),,$(p)))
|
||||
always := $($(HOSTLIBS)-y)
|
||||
|
||||
$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
|
||||
|
||||
subdir-y := $(GCC_PLUGIN_SUBDIR)
|
||||
subdir- += $(GCC_PLUGIN_SUBDIR)
|
||||
|
||||
clean-files += *.so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue