diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-07-14 23:08:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-15 11:53:53 +0200 |
commit | e9a25ac92495d8276669574e03d3b03e9846dd1c (patch) | |
tree | 9c7e14801d9cdd428746b6ac5a38f80e617225a0 | |
parent | e5b1f5af737078dfe4baba79dd0bc5a3b7616ad0 (diff) | |
download | busybox-w32-e9a25ac92495d8276669574e03d3b03e9846dd1c.tar.gz busybox-w32-e9a25ac92495d8276669574e03d3b03e9846dd1c.tar.bz2 busybox-w32-e9a25ac92495d8276669574e03d3b03e9846dd1c.zip |
Makefile: include per-arch Makefile before Makefile.flags
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@free-electrons.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -508,6 +508,8 @@ ifeq ($(dot-config),1) | |||
508 | # To avoid any implicit rule to kick in, define an empty command | 508 | # To avoid any implicit rule to kick in, define an empty command |
509 | .config .kconfig.d: ; | 509 | .config .kconfig.d: ; |
510 | 510 | ||
511 | -include $(srctree)/arch/$(ARCH)/Makefile | ||
512 | |||
511 | # Now we can define CFLAGS etc according to .config | 513 | # Now we can define CFLAGS etc according to .config |
512 | include $(srctree)/Makefile.flags | 514 | include $(srctree)/Makefile.flags |
513 | 515 | ||
@@ -531,8 +533,6 @@ endif | |||
531 | # Defaults busybox but it is usually overridden in the arch makefile | 533 | # Defaults busybox but it is usually overridden in the arch makefile |
532 | all: busybox doc | 534 | all: busybox doc |
533 | 535 | ||
534 | -include $(srctree)/arch/$(ARCH)/Makefile | ||
535 | |||
536 | # arch Makefile may override CC so keep this after arch Makefile is included | 536 | # arch Makefile may override CC so keep this after arch Makefile is included |
537 | #bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 537 | #bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |
538 | CHECKFLAGS += $(NOSTDINC_FLAGS) | 538 | CHECKFLAGS += $(NOSTDINC_FLAGS) |