[PATCH 1/2] Makefile: include per-arch Makefile before Makefile.flags
Denys Vlasenko
vda.linux at googlemail.com
Sat Jul 15 14:51:16 UTC 2017
Applied this patch, thanks
On Fri, Jul 14, 2017 at 11:08 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Makefile.flags contains:
>
> ARCH_FPIC ?= -fpic
> ARCH_FPIE ?= -fpie
>
> However, arch/$(ARCH)/Makefile gets included *after* Makefile.flags,
> and therefore doesn't get the chance to provide its own value.
>
> Fix this by including arch/$(ARCH)/Makefile *before* Makefile.flags.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e8b23fe..1fdf706 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -508,6 +508,8 @@ ifeq ($(dot-config),1)
> # To avoid any implicit rule to kick in, define an empty command
> .config .kconfig.d: ;
>
> +-include $(srctree)/arch/$(ARCH)/Makefile
> +
> # Now we can define CFLAGS etc according to .config
> include $(srctree)/Makefile.flags
>
> @@ -531,8 +533,6 @@ endif
> # Defaults busybox but it is usually overridden in the arch makefile
> all: busybox doc
>
> --include $(srctree)/arch/$(ARCH)/Makefile
> -
> # arch Makefile may override CC so keep this after arch Makefile is included
> #bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
> CHECKFLAGS += $(NOSTDINC_FLAGS)
> --
> 2.9.4
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list