[Buildroot] svn commit: trunk/buildroot/toolchain/kernel-headers
Erik Andersen
andersen at codepoet.org
Tue Oct 10 16:05:31 UTC 2006
On Tue Oct 10, 2006 at 09:20:00AM +0200, Bernhard Fischer wrote:
> >> +KERNEL_ARCH:=$(shell $(SHELL) -c 'if test "$(ARCH)" = "i486" -o "$(ARCH)" = "i586"; then echo i386; else echo $(ARCH); fi')
> >> +
> >
> >How about something like this:
> >
> >KERNEL_ARCH := $(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
> > -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/)
>
> In principle i agree, but then only GCC has -dumpmachine. We know the
> TARGET_ARCH beforehand, so shouldn't need to rely on -dumpmachine and a
> specific compiler to resolve the correct ARCH to be used for the kernel
> (only!), agree?
sure, using ARCH is fine. Still should be adjusted to use the
kernel arch names with a pass through sed...
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the buildroot
mailing list