Calculate SUBARCH in common makefile
PATCH 1/1 Calculate SUBARCH in common makefile
This patch make possible to use SUBARCH no only
in sandbox makefile.
E.g. this patch make possible CROSS_COMPILER variable autoconstruction for mips architecture.
Signed-off-by Antony Pavlov <[email protected]>
--- Makefile | 12 ++++++++++++ arch/sandbox/Makefile | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-)
Makefile +12 -0
@@ -145,6 +145,18 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH +# SUBARCH tells the usermode build what the underlying arch is. That is set +# first, and if a usermode build is happening, the "ARCH=um" on the command +# line overrides the setting of ARCH below. If a native build is happening, +# then ARCH is assigned, getting whatever value it gets normally, and +# SUBARCH is subsequently ignored. + +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh[234].*/sh/ ) + # Cross compiling and selecting different set of gcc/bin-utils # --------------------------------------------------------------------------- #
arch/sandbox/Makefile +0 -5
@@ -32,11 +32,6 @@ else CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) - ifeq ($(SUBARCH),x86_64) ELF_ARCH := i386:x86-64 ELF_FORMAT := elf64-x86-64
Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox