On Sat, Jan 19, 2013 at 4:40 PM, Khem Raj <raj.k...@gmail.com> wrote: > kernel compiler is not special and we currently have it so > we want to pass -march and -mtune options as CFLAGS to kernel > build so that compiler picks the right subarch flags when > compiling assembly files in particular. Otherwise defaults > are chosen which may not be right in many case e.g. when > compiling kernel for collie machine we should use arch=armv4 > but it uses toolchain/as defaults which is armv5te > > in some case e.g. thumb1 we know that kernel can not be compiled > in thumb1 mode so we can provide that information e.g. -marm > option through KERNEL_HOST_CC_ARCH variable as we do now > > Signed-off-by: Khem Raj <raj.k...@gmail.com> > --- > meta/classes/kernel-arch.bbclass | 13 +++++++++++++ > meta/classes/kernel.bbclass | 16 +--------------- > meta/classes/module-base.bbclass | 16 ---------------- > 3 files changed, 14 insertions(+), 31 deletions(-) > > diff --git a/meta/classes/kernel-arch.bbclass > b/meta/classes/kernel-arch.bbclass > index b3b78b6..a51e82b 100644 > --- a/meta/classes/kernel-arch.bbclass > +++ b/meta/classes/kernel-arch.bbclass > @@ -43,3 +43,16 @@ def map_uboot_arch(a, d): > > export UBOOT_ARCH = "${@map_uboot_arch(d.getVar('ARCH', True), d)}" > > +# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture > +# specific options necessary for building the kernel and modules. > +TARGET_CC_KERNEL_ARCH ?= "" > +HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}" > +TARGET_LD_KERNEL_ARCH ?= "" > +HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}" > +TARGET_AR_KERNEL_ARCH ?= "" > +HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}" > + > +KERNEL_CC = "${CC} ${HOST_CC_KERNEL_ARCH}"
Why change to ${CC} from "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}? It breaks some kernel builds we have... -M _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core