diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-11 07:35:38 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-11 07:35:38 +0200 |
commit | c3da5e9e8c2456989102079e29ed8e98855baba4 (patch) | |
tree | dfd6ac934dfb8cd43246961be9c5ff8c3ff753c6 /Makefile | |
parent | f97124673fbedd3500c1d9ea99a7f88825b0a6ff (diff) | |
parent | 006fa56bb1a06a59ae13f349602af13faaeb89d5 (diff) | |
download | barebox-c3da5e9e8c2456989102079e29ed8e98855baba4.tar.gz barebox-c3da5e9e8c2456989102079e29ed8e98855baba4.tar.xz |
Merge branch 'for-next/kbuild'
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -416,7 +416,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builti KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror=implicit-function-declaration -Werror=implicit-int \ - -Os -pipe -Wmissing-prototypes + -Os -pipe -Wmissing-prototypes -std=gnu89 KBUILD_AFLAGS := -D__ASSEMBLY__ LDFLAGS_barebox := -Map barebox.map @@ -533,6 +533,10 @@ ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) KBUILD_MODULES := 1 endif +ifeq ($(MAKECMDGOALS),) + KBUILD_MODULES := 1 +endif + export KBUILD_MODULES KBUILD_BUILTIN ifdef need-config @@ -660,8 +664,8 @@ barebox-alldirs := $(sort $(barebox-dirs) $(patsubst %/,%,$(filter %/, \ $(core-n) $(core-) $(drivers-n) $(drivers-) \ $(net-n) $(net-) $(libs-n) $(libs-)))) -pbl-common-y := $(patsubst %/, %/built-in-pbl.o, $(common-y)) -common-y := $(patsubst %/, %/built-in.o, $(common-y)) +pbl-common-y := $(patsubst %/, %/built-in.pbl.a, $(common-y)) +common-y := $(patsubst %/, %/built-in.a, $(common-y)) ifeq ($(CONFIG_DEFAULT_COMPRESSION_GZIP),y) DEFAULT_COMPRESSION_SUFFIX := .gz @@ -683,7 +687,7 @@ export DEFAULT_COMPRESSION_SUFFIX # Build barebox # --------------------------------------------------------------------------- # barebox is built from the objects selected by $(barebox-init) and -# $(barebox-main). Most are built-in.o files from top-level directories +# $(barebox-main). Most are built-in.a files from top-level directories # in the kernel tree, others are specified in arch/$(SRCARCH)/Makefile. # Ordering when linking is important, and $(barebox-init) must be first. # @@ -696,7 +700,7 @@ export DEFAULT_COMPRESSION_SUFFIX # | +--< init/version.o + more # | # +--< $(barebox-main) -# | +--< driver/built-in.o mm/built-in.o + more +# | +--< driver/built-in.a mm/built-in.a + more # | # +-< kallsyms.o (see description in CONFIG_KALLSYMS section) # @@ -715,7 +719,7 @@ BAREBOX_LDS := $(lds-y) quiet_cmd_barebox__ ?= LD $@ cmd_barebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_barebox) -o $@ \ -T $(BAREBOX_LDS) \ - --start-group $(BAREBOX_OBJS) --end-group \ + --whole-archive $(BAREBOX_OBJS) --no-whole-archive \ $(filter-out $(BAREBOX_LDS) $(BAREBOX_OBJS) FORCE ,$^) # Generate new barebox version |