diff options
| author | Ilias Apalodimas <[email protected]> | 2025-05-20 08:21:17 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-05-29 18:42:37 -0600 |
| commit | 3d21332c2f3e299836fc55d69887aa88168ac567 (patch) | |
| tree | 318b6a3342756a10e9277537741419544d2e00d0 /scripts/Makefile.lib | |
| parent | cfccf25100c26cb98d537106f0756363cb0647c6 (diff) | |
kbuild: skip 'addtree' and 'flags' magic for external module build
Backport from kernel
commit 58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build")
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'scripts/Makefile.lib')
| -rw-r--r-- | scripts/Makefile.lib | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7690cc61f9a..f1a78886e84 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -143,15 +143,14 @@ _c_flags += $(if $(patsubst n%,, \ $(CFLAGS_KASAN)) endif -# If building the kernel in a separate objtree expand all occurrences -# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). - -ifeq ($(KBUILD_SRC),) __c_flags = $(_c_flags) __a_flags = $(_a_flags) __cpp_flags = $(_cpp_flags) -else +# If building the kernel in a separate objtree expand all occurrences +# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). +ifeq ($(KBUILD_EXTMOD),) +ifneq ($(KBUILD_SRC),) # -I$(obj) locates generated .h files # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files # and locates generated .h files @@ -161,6 +160,7 @@ __c_flags = $(if $(obj),$(call addtree,-I$(src)) -I$(obj)) \ __a_flags = $(call flags,_a_flags) __cpp_flags = $(call flags,_cpp_flags) endif +endif # Modified for U-Boot: LINUXINCLUDE -> UBOOTINCLUDE c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ |
