diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-05-24 18:44:37 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-05-24 18:47:17 +0200 |
commit | 298466fe87e755c6444362affac6ec91c708f8e3 (patch) | |
tree | 4180f2a106470badfe9b3184f45371e8f662a07b /mk | |
parent | 9cff46149da70dde61533caff37d67b9b2038a14 (diff) | |
download | embtoolkit-298466fe87e755c6444362affac6ec91c708f8e3.tar.gz embtoolkit-298466fe87e755c6444362affac6ec91c708f8e3.tar.bz2 embtoolkit-298466fe87e755c6444362affac6ec91c708f8e3.tar.xz |
Toolchain: MIPS arch: define EMBTK_TARGET_ARCH
This patch defines EMBTK_TARGET_ARCH for mips (in the future all have to define
it). This helps to determinate if we're in 32bits arch or in 64bits arch.
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/mips-arch.mk | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/mk/mips-arch.mk b/mk/mips-arch.mk index da01530..aebd6f2 100644 --- a/mk/mips-arch.mk +++ b/mk/mips-arch.mk @@ -29,88 +29,104 @@ ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_LITTLE),y) GNU_TARGET := mipsel-linux STRICT_GNU_TARGET := mipsel-unknown-linux-gnu GNU_TARGET_ARCH := mips1 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_BIG),y) GNU_TARGET := mips-linux STRICT_GNU_TARGET := mips-unknown-linux-gnu GNU_TARGET_ARCH := mips1 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_LITTLE),y) GNU_TARGET := mipsel-linux STRICT_GNU_TARGET := mipsel-unknown-linux-gnu GNU_TARGET_ARCH := mips2 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_BIG),y) GNU_TARGET := mips-linux STRICT_GNU_TARGET := mips-unknown-linux-gnu GNU_TARGET_ARCH := mips2 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_LITTLE),y) GNU_TARGET := mips64el-linux STRICT_GNU_TARGET := mips64el-unknown-linux-gnu GNU_TARGET_ARCH := mips3 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_BIG),y) GNU_TARGET := mips64-linux STRICT_GNU_TARGET := mips64-unknown-linux-gnu GNU_TARGET_ARCH := mips3 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_LITTLE),y) GNU_TARGET := mips64el-linux STRICT_GNU_TARGET := mips64el-unknown-linux-gnu GNU_TARGET_ARCH := mips4 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_BIG),y) GNU_TARGET := mips64-linux STRICT_GNU_TARGET := mips64-unknown-linux-gnu GNU_TARGET_ARCH := mips4 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_LITTLE),y) GNU_TARGET := mipsel-linux STRICT_GNU_TARGET := mipsisa32el-unknown-linux-gnu GNU_TARGET_ARCH := mips32 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_BIG),y) GNU_TARGET := mips-linux STRICT_GNU_TARGET := mipsisa32-unknown-linux-gnu GNU_TARGET_ARCH := mips32 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_LITTLE),y) GNU_TARGET := mipsel-linux STRICT_GNU_TARGET := mipsisa32r2el-unknown-linux-gnu GNU_TARGET_ARCH := mips32r2 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_BIG),y) GNU_TARGET := mips-linux STRICT_GNU_TARGET := mipsisa32r2-unknown-linux-gnu GNU_TARGET_ARCH := mips32r2 +EMBTK_TARGET_ARCH := 32 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_LITTLE),y) GNU_TARGET := mips64el-linux STRICT_GNU_TARGET := mipsisa64el-unknown-linux-gnu GNU_TARGET_ARCH := mips64 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_BIG),y) GNU_TARGET := mips64-linux STRICT_GNU_TARGET := mipsisa64-unknown-linux-gnu GNU_TARGET_ARCH := mips64 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_LITTLE),y) GNU_TARGET := mips64el-linux STRICT_GNU_TARGET := mipsisa64r2el-unknown-linux-gnu GNU_TARGET_ARCH := mips64r2 +EMBTK_TARGET_ARCH := 64 endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_BIG),y) GNU_TARGET := mips64-linux STRICT_GNU_TARGET := mipsisa64r2-unknown-linux-gnu GNU_TARGET_ARCH := mips64r2 +EMBTK_TARGET_ARCH := 64 endif endif @@ -119,22 +135,27 @@ endif ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_O32),y) GCC_WITH_ABI := --with-abi=32 -export GCC_WITH_ABI +EMBTK_TARGET_ABI := -mabi=32 +export GCC_WITH_ABI EMBTK_TARGET_ABI else ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_N32),y) GCC_WITH_ABI := --with-abi=n32 -export GCC_WITH_ABI +EMBTK_TARGET_ABI := -mabi=n32 +export GCC_WITH_ABI EMBTK_TARGET_ABI else ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_EABI),y) GCC_WITH_ABI := --with-abi=eabi -export GCC_WITH_ABI +EMBTK_TARGET_ABI := -mabi=eabi +export GCC_WITH_ABI EMBTK_TARGET_ABI else ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_O64),y) GCC_WITH_ABI := --with-abi=o64 -export GCC_WITH_ABI +EMBTK_TARGET_ABI := -mabi=o64 +export GCC_WITH_ABI EMBTK_TARGET_ABI else GCC_WITH_ABI := --with-abi=64 -export GCC_WITH_ABI +EMBTK_TARGET_ABI := -mabi=64 +export GCC_WITH_ABI EMBTK_TARGET_ABI endif |