[U-Boot] [RFC PATCH 2/2] OMAP4: enable Thumb2 support for OMAP4

Aneesh V aneesh at ti.com
Mon Mar 14 14:27:38 CET 2011


Enable -march=armv7-a and Thumb build for OMAP4. This results in
Thumb2 code generated for OMAP4.

The newly added compiler switches are put under cc-option so
that it doesn't break old compilers.

Signed-off-by: Aneesh V <aneesh at ti.com>
---
 arch/arm/cpu/armv7/omap4/config.mk |   25 +++++++++++++++++++++++++
 include/configs/omap4_sdp4430.h    |    1 +
 2 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap4/config.mk

diff --git a/arch/arm/cpu/armv7/omap4/config.mk b/arch/arm/cpu/armv7/omap4/config.mk
new file mode 100644
index 0000000..a715ba3
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap4/config.mk
@@ -0,0 +1,25 @@
+#
+# Copyright 2011 Linaro Limited
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# Aneesh V <aneesh.v at linaro.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that 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
+#
+
+# Enable armv7 if the compiler supports it
+PLATFORM_CPPFLAGS += $(call cc-option,-march=armv7-a)
diff --git a/include/configs/omap4_sdp4430.h b/include/configs/omap4_sdp4430.h
index 48a3774..74f686b 100644
--- a/include/configs/omap4_sdp4430.h
+++ b/include/configs/omap4_sdp4430.h
@@ -266,4 +266,5 @@
 #define CONFIG_SYS_SPL_BSS_START_ADDR		0x80000000
 #define CONFIG_SYS_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 
+#define CONFIG_SYS_THUMB_BUILD
 #endif /* __CONFIG_H */
-- 
1.7.0.4



More information about the U-Boot mailing list