diff mbox

[U-Boot,1/5] x86: Fix compilation on 64-built built machines

Message ID 1335700823-15144-2-git-send-email-graeme.russ@gmail.com
State Superseded, archived
Delegated to: Simon Glass
Headers show

Commit Message

Graeme Russ April 29, 2012, noon UTC
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
---
 Makefile                     |    1 +
 arch/x86/cpu/config.mk       |    3 ++-
 examples/standalone/Makefile |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

Comments

Simon Glass Nov. 28, 2012, 1:35 a.m. UTC | #1
Hi,

On Sun, Apr 29, 2012 at 5:00 AM, Graeme Russ <graeme.russ@gmail.com> wrote:
>
> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>

I have updated the commit subject and applied to x86/next.

Regards,
Simon
diff mbox

Patch

diff --git a/Makefile b/Makefile
index cdd4294..4f5cb60 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@  VERSION_FILE = $(obj)include/generated/version_autogenerated.h
 
 HOSTARCH := $(shell uname -m | \
 	sed -e s/i.86/x86/ \
+	    -e s/x86_64/x86/ \
 	    -e s/sun4u/sparc64/ \
 	    -e s/arm.*/arm/ \
 	    -e s/sa110/arm/ \
diff --git a/arch/x86/cpu/config.mk b/arch/x86/cpu/config.mk
index c00f867..092de68 100644
--- a/arch/x86/cpu/config.mk
+++ b/arch/x86/cpu/config.mk
@@ -23,7 +23,8 @@ 
 
 CROSS_COMPILE ?= i386-linux-
 
-PLATFORM_CPPFLAGS += -DCONFIG_X86 -D__I386__ -march=i386 -Werror
+PLATFORM_CPPFLAGS += -DCONFIG_X86 -D__I386__ -march=i386 -Werror -m32
+PLATFORM_LDFLAGS += -m elf_i386
 
 # DO NOT MODIFY THE FOLLOWING UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!
 LDPPFLAGS += -DRESET_SEG_START=0xffff0000
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index baaa2fb..7c1ea5c 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -98,7 +98,7 @@  $(ELF):
 $(obj)%:	$(obj)%.o $(LIB)
 		$(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
 			-o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
-			-L$(gcclibdir) -lgcc
+			-L$(USE_PRIVATE_LIBGCC) -lgcc
 
 $(SREC):
 $(obj)%.srec:	$(obj)%