aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/u-boot
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2011-01-24 15:48:58 +0100
committerKoen Kooi <koen@openembedded.org>2011-01-24 16:01:37 +0100
commite0ec546d18d38ab31ef2787e092be7f9ceba112c (patch)
treee2a53a60364d5766bc413e83e70cf7fe645d977f /recipes/u-boot
parent51d31435b1b627ea66e5bf27cc9e1841228c4f26 (diff)
downloadopenembedded-e0ec546d18d38ab31ef2787e092be7f9ceba112c.tar.gz
u-boot-sakoman: fix break caused by the new binutils
New assemblers need -march=armv7-a+sec on command line or .arch_extension sec inline to enable use of the smc instruction. This patch adds as-instr to check the latter to conditionally enable the former in AFLAGS for files that use smc. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/u-boot')
-rw-r--r--recipes/u-boot/u-boot-sakoman/fix-break-caused-by-new-binutils.patch31
-rw-r--r--recipes/u-boot/u-boot-sakoman_git.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-sakoman/fix-break-caused-by-new-binutils.patch b/recipes/u-boot/u-boot-sakoman/fix-break-caused-by-new-binutils.patch
new file mode 100644
index 0000000000..16bc9803bd
--- /dev/null
+++ b/recipes/u-boot/u-boot-sakoman/fix-break-caused-by-new-binutils.patch
@@ -0,0 +1,31 @@
+Index: git/arch/arm/cpu/armv7/omap4/Makefile
+===================================================================
+--- git.orig/arch/arm/cpu/armv7/omap4/Makefile
++++ git/arch/arm/cpu/armv7/omap4/Makefile
+@@ -26,6 +26,8 @@ include $(TOPDIR)/config.mk
+ LIB = $(obj)lib$(SOC).o
+
+ SOBJS += lowlevel_init.o
++plus_sec := $(call as-instr,.arch_extension sec,+sec)
++lowlevel_init.o: AFLAGS += -Wa,-march=armv7-a$(plus_sec)
+
+ COBJS += board.o
+ COBJS += mem.o
+Index: git/config.mk
+===================================================================
+--- git.orig/config.mk
++++ git/config.mk
+@@ -266,3 +266,13 @@ cmd_link_o_target = $(if $(strip $1),\
+ rm -f $@; $(AR) rcs $@ )
+
+ #########################################################################
++
++# Tries to compile an assembly instruction
++as-instr = $(shell if echo -e "$(1)" | \
++ $(CC) $(AFLAGS) -c -xassembler - \
++ -o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \
++ then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \
++ else echo "$(3)"; fi)
++
++#########################################################################
++
diff --git a/recipes/u-boot/u-boot-sakoman_git.bb b/recipes/u-boot/u-boot-sakoman_git.bb
index 5b9ff1112c..8dfe713b3b 100644
--- a/recipes/u-boot/u-boot-sakoman_git.bb
+++ b/recipes/u-boot/u-boot-sakoman_git.bb
@@ -7,6 +7,7 @@ SRCREV = "261733408a27d14590cf3ec6b596461808050e32"
PV = "2010.12+${PR}+git${SRCREV}"
SRC_URI = "git://www.sakoman.com/git/u-boot.git;branch=omap4-exp;protocol=git \
+ file://fix-break-caused-by-new-binutils.patch \
"
S = "${WORKDIR}/git"