aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:33:02 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-07-24 07:33:02 -0400
commit16c79651a5ee1ad7e4fca65a7c5309dfca89ed28 (patch)
treed34470a098ee2d2aa6af7e111547f9c6599395b5
parente2ed3be7319f2734fcd9c7638888501934c22751 (diff)
Thumb-2: Add Thumb-2 support to the build files
This patch adds the necessary entries to the Makefile and Kconfig files for building the Thumb-2 kernel. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r--arch/arm/Kconfig12
-rw-r--r--arch/arm/Kconfig.debug1
-rw-r--r--arch/arm/Makefile11
3 files changed, 22 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index da28e7ba6083..a36b5a8b123e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -983,6 +983,18 @@ config HZ
983 default AT91_TIMER_HZ if ARCH_AT91 983 default AT91_TIMER_HZ if ARCH_AT91
984 default 100 984 default 100
985 985
986config THUMB2_KERNEL
987 bool "Compile the kernel in Thumb-2 mode"
988 depends on CPU_V7 && EXPERIMENTAL
989 select AEABI
990 select ARM_ASM_UNIFIED
991 help
992 By enabling this option, the kernel will be compiled in
993 Thumb-2 mode. A compiler/assembler that understand the unified
994 ARM-Thumb syntax is needed.
995
996 If unsure, say N.
997
986config ARM_ASM_UNIFIED 998config ARM_ASM_UNIFIED
987 bool 999 bool
988 1000
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index a89e4734b8f0..1a6f70e52921 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -8,6 +8,7 @@ source "lib/Kconfig.debug"
8# n, but then RMK will have to kill you ;). 8# n, but then RMK will have to kill you ;).
9config FRAME_POINTER 9config FRAME_POINTER
10 bool 10 bool
11 depends on !THUMB2_KERNEL
11 default y if !ARM_UNWIND 12 default y if !ARM_UNWIND
12 help 13 help
13 If you say N here, the resulting kernel will be slightly smaller and 14 If you say N here, the resulting kernel will be slightly smaller and
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3505572a21e6..e150f232458d 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -93,9 +93,16 @@ ifeq ($(CONFIG_ARM_UNWIND),y)
93CFLAGS_ABI +=-funwind-tables 93CFLAGS_ABI +=-funwind-tables
94endif 94endif
95 95
96ifeq ($(CONFIG_THUMB2_KERNEL),y)
97AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=thumb,-Wa$(comma)-mauto-it)
98AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
99CFLAGS_THUMB2 :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN)
100AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb
101endif
102
96# Need -Uarm for gcc < 3.x 103# Need -Uarm for gcc < 3.x
97KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 104KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_THUMB2) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
98KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 105KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
99 106
100CHECKFLAGS += -D__arm__ 107CHECKFLAGS += -D__arm__
101 108