[PATCH 5/6] Makefile: tune the include order
Sumit Garg
sumit.garg at linaro.org
Wed Mar 27 14:21:42 CET 2024
Hi Peng,
On Wed, 27 Mar 2024 at 18:41, Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan at nxp.com>
>
> For OF_UPSTREAM support, the U-Boot headers under dt-bindings/ maybe
> different with OF_UPSTREAM headers. So let OF_UPSTREAM headers be
> included first when migrating to OF_UPSTREAM.
No, please don't do that. The current include order gives preference
to the U-Boot headers under dt-bindings/ such that we don't break
platforms which haven't converted to OF_UPSTREAM.
So while migrating to OF_UPSTREAM, you should just drop redundant
headers under dt-bindings/ instead.
-Sumit
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
> Makefile | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b80924241ec..b9c2d896c2e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -827,6 +827,7 @@ KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
> # Use UBOOTINCLUDE when you must reference the include/ directory.
> # Needed to be compatible with the O= option
> UBOOTINCLUDE := \
> + -I$(srctree)/dts/upstream/include \
> -Iinclude \
> $(if $(KBUILD_SRC), -I$(srctree)/include) \
> $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
> @@ -835,8 +836,7 @@ UBOOTINCLUDE := \
> -I$(srctree)/arch/arm/thumb1/include), \
> -I$(srctree)/arch/arm/thumb1/include)) \
> -I$(srctree)/arch/$(ARCH)/include \
> - -include $(srctree)/include/linux/kconfig.h \
> - -I$(srctree)/dts/upstream/include
> + -include $(srctree)/include/linux/kconfig.h
>
> NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>
> @@ -907,7 +907,7 @@ ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
> PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
> else
> ifndef CONFIG_CC_IS_CLANG
> -PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
> +PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`)
> endif
> endif
> PLATFORM_LIBS += $(PLATFORM_LIBGCC)
>
> --
> 2.35.3
>
More information about the U-Boot
mailing list