Commit 87a753f7 authored by Catalin Marinas's avatar Catalin Marinas

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent d967e922
......@@ -643,6 +643,23 @@ config HZ
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default 100
config THUMB2_KERNEL
bool "Compile the kernel in Thumb-2 mode"
depends on CPU_V7 && EXPERIMENTAL
default n
select AEABI
select ARM_ASM_UNIFIED
help
By enabling this option, the kernel will be compiled in
Thumb-2 mode. A compiler/assembler that understand the unified
ARM-Thumb syntax is needed.
If unsure, say N.
config ARM_ASM_UNIFIED
bool
default n
config AEABI
bool "Use the ARM EABI to compile the kernel"
help
......
......@@ -8,7 +8,7 @@ source "lib/Kconfig.debug"
# n, but then RMK will have to kill you ;).
config FRAME_POINTER
bool
default y
default y if !THUMB2_KERNEL
help
If you say N here, the resulting kernel will be slightly smaller and
faster. However, when a problem occurs with the kernel, the
......
......@@ -84,6 +84,13 @@ else
CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
endif
ifeq ($(CONFIG_THUMB2_KERNEL),y)
# We currently suppress all the gas warnings but finer-grained option
# will be provided for the unified assembly syntax
CFLAGS +=-mthumb -Wa$(comma)-W
AFLAGS +=-Wa$(comma)-mthumb -Wa$(comma)-W
endif
# Need -Uarm for gcc < 3.x
CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment