now we can detect the host build from gcc macro and cross compile the sandbox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> Cc: Loïc Minier <loic.minier@xxxxxxxxxx> --- v2: as discuss with Loïc use the size of the pointer Loïc to build on most of arch you need this fix and 3 others already in the next commit 9a5898e5: sandbox: simplify linker script commit 15f87657: sandbox: remove duplicate barebox.lds.S ommit e3e71f5e: sandbox: move __SANDBOX__ to Makefile Sacha those 4 patches could go to the master as they fix the sandbox Best Regards, J. arch/sandbox/Makefile | 13 ------------- arch/sandbox/include/asm/elf.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile index b88f1f6..9fd18a2 100644 --- a/arch/sandbox/Makefile +++ b/arch/sandbox/Makefile @@ -36,19 +36,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) -ifeq ($(SUBARCH),x86_64) -ELF_CLASS := ELFCLASS64 -endif -ifeq ($(SUBARCH),i386) -ELF_CLASS := ELFCLASS32 -endif -ifeq ($(SUBARCH),powerpc) -ELF_CLASS := ELFCLASS32 -endif - -CPPFLAGS += -DELF_CLASS="$(ELF_CLASS)" -export ELF_CLASS - archprepare: maketools PHONY += maketools diff --git a/arch/sandbox/include/asm/elf.h b/arch/sandbox/include/asm/elf.h index b60d248..405393f 100644 --- a/arch/sandbox/include/asm/elf.h +++ b/arch/sandbox/include/asm/elf.h @@ -1,2 +1,11 @@ +#ifndef __ASM_SANDBOX_ELF_H__ +#define __ASM_SANDBOX_ELF_H__ -/* nothing yet */ +#if __SIZEOF_POINTER__ = 8 +#define ELF_CLASS ELFCLASS64 +#define CONFIG_PHYS_ADDR_T_64BIT +#else +#define ELF_CLASS ELFCLASS32 +#endif + +#endif /* __ASM_SANDBOX_ELF_H__ */ -- 1.7.7 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox