From a86cf89c765d99c39b397abe3d9926ab3593f57a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 27 Feb 2014 22:40:34 +0900 Subject: kbuild: consolidate PLATFORM_LIBS We had switched to Kbuild so now we can specify PLATFORM_LIBS/PLATFORM_LIBGCC with relative path. Signed-off-by: Masahiro Yamada Acked-by: Tom Rini Acked-by: Simon Glass Tested-by: Simon Glass --- arch/arm/config.mk | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'arch/arm/config.mk') diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 17b7408..1db80be 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -67,13 +67,8 @@ ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) # times. Also, the prefix needs to be different based on whether # CONFIG_SPL_BUILD is defined or not. 'filter-out' the existing entry # before adding the correct one. -ifdef CONFIG_SPL_BUILD -PLATFORM_LIBS := $(SPLTREE)/arch/arm/lib/eabi_compat.o \ - $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) -else -PLATFORM_LIBS := $(OBJTREE)/arch/arm/lib/eabi_compat.o \ - $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) -endif +PLATFORM_LIBS := arch/arm/lib/eabi_compat.o \ + $(filter-out arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) endif # needed for relocation -- cgit v1.1 From 9b6e2c363f2686d6f7bf61fbe58b7591b71d3e8b Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 28 Feb 2014 14:33:30 +0900 Subject: kbuild: fix CROSS_COMPILE settings in config.mk The syntax CROSS_COMIPLE ?= does not work because config.mk is parsed after exporting CROSS_COMPILE. Like Linux Kernel's arch/$(ARCH)/Makefile, we must write as follows: ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := endif Signed-off-by: Masahiro Yamada --- arch/arm/config.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/arm/config.mk') diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 1db80be..792cb43 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -5,7 +5,9 @@ # SPDX-License-Identifier: GPL-2.0+ # -CROSS_COMPILE ?= arm-linux- +ifeq ($(CROSS_COMPILE),) +CROSS_COMPILE := arm-linux- +endif ifndef CONFIG_STANDALONE_LOAD_ADDR ifneq ($(CONFIG_OMAP_COMMON),) -- cgit v1.1 From 388b2e520b07cc857c03a152fc6006763f78b9d6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 5 Mar 2014 17:49:22 +0900 Subject: kbuild: move "checkthumb" to ARM archprepare "checkthumb" makes sense only for ARM architecture. Move it to arch/arm/config.mk. To make sure gcc supports THUMB mode before beginning build, run "checkthumb" during "archprepare". Signed-off-by: Masahiro Yamada --- arch/arm/config.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'arch/arm/config.mk') diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 792cb43..f4c2d81 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -41,7 +41,17 @@ endif # Only test once ifneq ($(CONFIG_SPL_BUILD),y) -ALL-$(CONFIG_SYS_THUMB_BUILD) += checkthumb +ifeq ($(CONFIG_SYS_THUMB_BUILD),y) +archprepare: checkthumb + +checkthumb: + @if test "$(call cc-version)" -lt "0404"; then \ + echo -n '*** Your GCC does not produce working '; \ + echo 'binaries in THUMB mode.'; \ + echo '*** Your board is configured for THUMB mode.'; \ + false; \ + fi +endif endif # Try if EABI is supported, else fall back to old API, -- cgit v1.1