summaryrefslogtreecommitdiff
path: root/mk/arch
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-03-24 13:04:28 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-03-24 13:04:28 +0100
commitb7556f14725846fc5412b9495ebc5861fe102dc7 (patch)
tree358c02ec8952e0529ed8e5bcc6c04508d9f861eb /mk/arch
parent869e68d0d52ac44af2400d53b00cfcbfdec4dac9 (diff)
downloadembtoolkit-b7556f14725846fc5412b9495ebc5861fe102dc7.tar.gz
embtoolkit-b7556f14725846fc5412b9495ebc5861fe102dc7.tar.bz2
embtoolkit-b7556f14725846fc5412b9495ebc5861fe102dc7.tar.xz
Toolchain: move different supported arch in their own directory
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/arch')
-rw-r--r--mk/arch/arm/arm.mk67
-rw-r--r--mk/arch/mips/mips.mk255
2 files changed, 322 insertions, 0 deletions
diff --git a/mk/arch/arm/arm.mk b/mk/arch/arm/arm.mk
new file mode 100644
index 0000000..ed9b6b8
--- /dev/null
+++ b/mk/arch/arm/arm.mk
@@ -0,0 +1,67 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software; you can distribute it and/or modify it
+# under the terms of the GNU General Public License
+# (Version 2 or later) published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+################################################################################
+#
+# \file arm-arch.mk
+# \brief arm-arch.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date June 2009
+################################################################################
+
+LINUX_ARCH := arm
+GNU_TARGET_ARCH := arm
+EMBTK_MCU_FLAG := $(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING)))
+
+ifeq ($(CONFIG_EMBTK_CLIB_EGLIBC),y)
+# EGLIBC C library
+ifeq ($(CONFIG_EMBTK_ARCH_ARM_BIG_ENDIAN),y)
+GNU_TARGET := armeb-linux
+STRICT_GNU_TARGET := armeb-unknown-linux-gnueabi
+else
+GNU_TARGET := armel-linux
+STRICT_GNU_TARGET := armel-unknown-linux-gnueabi
+endif
+
+else
+# uClibc C library
+ifeq ($(CONFIG_EMBTK_ARCH_ARM_BIG_ENDIAN),y)
+GNU_TARGET := armeb-linux
+STRICT_GNU_TARGET := armeb-unknown-linux-uclibceabi
+else
+GNU_TARGET := armel-linux
+STRICT_GNU_TARGET := armel-unknown-linux-uclibceabi
+endif
+
+endif
+
+# GCC configure options
+GCC_WITH_CPU := --with-cpu=$(subst ",,$(strip $(CONFIG_EMBTK_ARM_MCU_STRING)))
+
+# GCC extra configure options for arm
+GCC3_CONFIGURE_EXTRA_OPTIONS += $(strip $(if $(CONFIG_EMBTK_GCC_LANGUAGE_JAVA), \
+ --enable-sjlj-exceptions))
+
+# Hard or soft floating point for GCC?
+GCC_WITH_FLOAT := $(strip $(if $(CONFIG_EMBTK_SOFTFLOAT), \
+ --with-float=soft,--with-float=softfp))
+# Hard or soft floating point?
+EMBTK_TARGET_FLOAT_CFLAGS := $(strip $(if $(CONFIG_EMBTK_SOFTFLOAT), \
+ -mfloat-abi=soft,-mfloat-abi=softfp))
+
+# Some other flags for TARGET_CFLAGS
+EMBTK_TARGET_MCPU := -mcpu=$(EMBTK_MCU_FLAG)
+EMBTK_TARGET_MARCH :=
diff --git a/mk/arch/mips/mips.mk b/mk/arch/mips/mips.mk
new file mode 100644
index 0000000..6f671e3
--- /dev/null
+++ b/mk/arch/mips/mips.mk
@@ -0,0 +1,255 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
+#
+# This program is free software; you can distribute it and/or modify it
+# under the terms of the GNU General Public License
+# (Version 2 or later) published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+################################################################################
+#
+# \file mips_arch.mk
+# \brief mips_arch.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date May 2009
+################################################################################
+
+LINUX_ARCH := mips
+
+ifeq ($(CONFIG_EMBTK_CLIB_EGLIBC),y)
+#we use EGLIBC C library
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsel-unknown-linux-gnu
+GNU_TARGET_ARCH := mips1
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mips-unknown-linux-gnu
+GNU_TARGET_ARCH := mips1
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsel-unknown-linux-gnu
+GNU_TARGET_ARCH := mips2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mips-unknown-linux-gnu
+GNU_TARGET_ARCH := mips2
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mips64el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips3
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mips64-unknown-linux-gnu
+GNU_TARGET_ARCH := mips3
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mips64el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips4
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mips64-unknown-linux-gnu
+GNU_TARGET_ARCH := mips4
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsisa32el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips32
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mipsisa32-unknown-linux-gnu
+GNU_TARGET_ARCH := mips32
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsisa32r2el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips32r2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mipsisa32r2-unknown-linux-gnu
+GNU_TARGET_ARCH := mips32r2
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mipsisa64el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips64
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mipsisa64-unknown-linux-gnu
+GNU_TARGET_ARCH := mips64
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mipsisa64r2el-unknown-linux-gnu
+GNU_TARGET_ARCH := mips64r2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mipsisa64r2-unknown-linux-gnu
+GNU_TARGET_ARCH := mips64r2
+endif
+
+else
+#We use uClibc C library
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsel-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips1
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS1_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mips-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips1
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsel-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS2_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mips-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips2
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mips64el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips3
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS3_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mips64-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips3
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mips64el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips4
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS4_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mips64-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips4
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsisa32el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips32
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mipsisa32-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips32
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_LITTLE),y)
+GNU_TARGET := mipsel-linux
+STRICT_GNU_TARGET := mipsisa32r2el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips32r2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS32R2_BIG),y)
+GNU_TARGET := mips-linux
+STRICT_GNU_TARGET := mipsisa32r2-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips32r2
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mipsisa64el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips64
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mipsisa64-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips64
+endif
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_LITTLE),y)
+GNU_TARGET := mips64el-linux
+STRICT_GNU_TARGET := mipsisa64r2el-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips64r2
+endif
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_MIPS64R2_BIG),y)
+GNU_TARGET := mips64-linux
+STRICT_GNU_TARGET := mipsisa64r2-unknown-linux-uclibc
+GNU_TARGET_ARCH := mips64r2
+endif
+
+endif
+
+EMBTK_MCU_FLAG := $(GNU_TARGET_ARCH)
+
+#GCC configure options
+GCC_WITH_ARCH := --with-arch=$(GNU_TARGET_ARCH)
+export GCC_WITH_ARCH
+
+#Hard or soft floating point for GCC?
+ifeq ($(CONFIG_EMBTK_HARDFLOAT),y)
+GCC_WITH_FLOAT := --with-float=hard
+EMBTK_TARGET_FLOAT_CFLAGS := -mhard-float
+else
+GCC_WITH_FLOAT := --with-float=soft
+EMBTK_TARGET_FLOAT_CFLAGS := -msoft-float
+endif
+export GCC_WITH_FLOAT EMBTK_TARGET_FLOAT_CFLAGS
+
+ifeq ($(CONFIG_EMBTK_ARCH_MIPS_ABI_O32),y)
+GCC_WITH_ABI := --with-abi=32
+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
+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
+#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
+#EMBTK_TARGET_ABI := -mabi=o64
+#export GCC_WITH_ABI EMBTK_TARGET_ABI
+
+else
+GCC_WITH_ABI := --with-abi=64
+EMBTK_TARGET_ABI := -mabi=64
+export GCC_WITH_ABI EMBTK_TARGET_ABI
+endif
+
+# Some other flags for TARGET_CFLAGS
+EMBTK_TARGET_MCPU :=
+EMBTK_TARGET_MARCH := -march=$(EMBTK_MCU_FLAG)