diff options
author | Richard Kuo <rkuo@codeaurora.org> | 2012-03-27 17:37:33 -0500 |
---|---|---|
committer | Richard Kuo <rkuo@codeaurora.org> | 2013-04-30 19:40:22 -0500 |
commit | 66b03dbfe605c2566cff55bde35372030aa4b3d0 (patch) | |
tree | 1e933ee8a5ad6b3c4c3e5f8184e9ea9069be2908 /arch | |
parent | 8f5a0b9dffeb3cb94f2b0622b6fe0717512ef54b (diff) |
Hexagon: change arch version config to allow comparisons
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/hexagon/Kconfig | 18 | ||||
-rw-r--r-- | arch/hexagon/Makefile | 17 | ||||
-rw-r--r-- | arch/hexagon/include/asm/elf.h | 6 |
3 files changed, 10 insertions, 31 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index dd89a7245ac4..d90a495ab791 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -33,19 +33,6 @@ config HEXAGON Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. - -config HEXAGON_ARCH_V1 - bool - -config HEXAGON_ARCH_V2 - bool - -config HEXAGON_ARCH_V3 - bool - -config HEXAGON_ARCH_V4 - bool - config HEXAGON_PHYS_OFFSET def_bool y ---help--- @@ -109,12 +96,15 @@ choice config HEXAGON_COMET bool "Comet Board" - select HEXAGON_ARCH_V2 ---help--- Support for the Comet platform. endchoice +config HEXAGON_ARCH_VERSION + int "Architecture version" + default 2 + config HEXAGON_VM def_bool y diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index d00d900b2566..207711a0fd0c 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile @@ -15,20 +15,9 @@ KBUILD_CFLAGS += -fno-short-enums # LDFLAGS_MODULE += -shared CFLAGS_MODULE += -mlong-calls -cflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) -cflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) -cflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) -cflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) - -aflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) -aflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) -aflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) -aflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) - -ldflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) -ldflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) -ldflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) -ldflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) +cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) +aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) +ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) KBUILD_CFLAGS += $(cflags-y) KBUILD_AFLAGS += $(aflags-y) diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index 1f14e082588e..83b8d0ea4cb8 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h @@ -168,15 +168,15 @@ do { \ #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_HEXAGON -#ifdef CONFIG_HEXAGON_ARCH_V2 +#if CONFIG_HEXAGON_ARCH_VERSION == 2 #define ELF_CORE_EFLAGS 0x1 #endif -#ifdef CONFIG_HEXAGON_ARCH_V3 +#if CONFIG_HEXAGON_ARCH_VERSION == 3 #define ELF_CORE_EFLAGS 0x2 #endif -#ifdef CONFIG_HEXAGON_ARCH_V4 +#if CONFIG_HEXAGON_ARCH_VERSION == 4 #define ELF_CORE_EFLAGS 0x3 #endif |