From 9bed26e23fd8d3aa6e8fd40bcb5b0a25dd9d6a36 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Feb 2014 07:11:32 +0100 Subject: add thumb2 support as an option for cubox-i --- mk/vars.mk | 13 +++++++++++-- target/config/Config.in | 13 +++++++++++++ target/linux/config/Config.in.kernel | 3 +++ toolchain/glibc/Makefile | 4 ++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/mk/vars.mk b/mk/vars.mk index eacf12395..540d0e03b 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -72,15 +72,24 @@ TARGET_CC:= ${TARGET_COMPILER_PREFIX}gcc TARGET_CXX:= ${TARGET_COMPILER_PREFIX}g++ TARGET_LD:= ${TARGET_COMPILER_PREFIX}ld +MODE_FLAGS:= +ifeq ($(ADK_LINUX_ARM),y) +ifeq ($(ADK_LINUX_ARM_WITH_THUMB),y) +MODE_FLAGS:= -mthumb +else +MODE_FLAGS:= -marm +endif +endif + TARGET_CPPFLAGS:= ifeq ($(ADK_LINUX_MICROBLAZE),y) TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident $(ADK_TARGET_ABI_CFLAGS) TARGET_CFLAGS_LIBC:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident $(TARGET_OPTIMIZATION) else -TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(ADK_TARGET_ABI_CFLAGS) +TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(ADK_TARGET_ABI_CFLAGS) $(MODE_FLAGS) TARGET_CFLAGS_LIBC:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts $(TARGET_OPTIMIZATION) endif -TARGET_CXXFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident +TARGET_CXXFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident $(MODE_FLAGS) TARGET_LDFLAGS:= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib \ -Wl,-O1 -Wl,-rpath -Wl,/usr/lib \ -Wl,-rpath-link -Wl,${STAGING_TARGET_DIR}/usr/lib \ diff --git a/target/config/Config.in b/target/config/Config.in index 12e2b8003..6cab5a99d 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -172,6 +172,19 @@ config ADK_TARGET_KERNEL_MINICONFIG default "raspberry-pi" if ADK_TARGET_SYSTEM_RASPBERRY_PI default "cubox-i" if ADK_TARGET_SYSTEM_CUBOX_I +choice +prompt "Use ARM thumb mode" +depends on ADK_TARGET_SYSTEM_CUBOX_I + +config ADK_LINUX_ARM_WITHOUT_THUMB + boolean "disabled" + +config ADK_LINUX_ARM_WITH_THUMB + boolean "enabled" + select ADK_KERNEL_THUMB2_KERNEL + +endchoice + choice prompt "Qemu Emulation using VirtIO drivers" depends on ADK_TARGET_SYSTEM_QEMU_SPARC64 diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel index 785ae6475..bd4169948 100644 --- a/target/linux/config/Config.in.kernel +++ b/target/linux/config/Config.in.kernel @@ -101,3 +101,6 @@ config ADK_KERNEL_CPU_MIPS64_R1 config ADK_KERNEL_PREEMPT boolean + +config ADK_KERNEL_THUMB2_KERNEL + boolean diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index 306927fc6..0905f2f61 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk include ../rules.mk # glibc does not compile with Os -TARGET_CFLAGS_LIBC:= $(subst Os,O2,$(TARGET_CFLAGS)) +TARGET_CFLAGS_LIBC:= $(subst Os,O2,$(TARGET_CFLAGS_LIBC)) ifneq ($(ADK_DEBUG),) TARGET_CFLAGS_LIBC+= -O2 endif # ssp partially supported -TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS)) +TARGET_CFLAGS_LIBC:= $(filter-out -fstack-protector,$(TARGET_CFLAGS_LIBC)) include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -- cgit v1.2.3