From: Darren Hart <dvhart@linux.intel.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC
Date: Tue, 22 Jan 2013 12:44:18 -0800 [thread overview]
Message-ID: <50FEFA22.2090008@linux.intel.com> (raw)
In-Reply-To: <613da782b369ba5424b5619b4315ea34e645d53c.1358634922.git.raj.khem@gmail.com>
On 01/19/2013 02:40 PM, Khem Raj 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
>
Makes me nervous... only because I'm not well versed enough across the
architectures to catch some little gotchas. How much testing has this
seen? Which architectures?
--
Darren
> Signed-off-by: Khem Raj <raj.khem@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}"
> +KERNEL_LD = "${LD} ${HOST_LD_KERNEL_ARCH}"
> +KERNEL_AR = "${AR} ${HOST_AR_KERNEL_ARCH}"
> +
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index d459569..e2a582b 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,7 +1,7 @@
> inherit linux-kernel-base module_strip
>
> PROVIDES += "virtual/kernel"
> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
> +DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native"
>
> # we include gcc above, we dont need virtual/libc
> INHIBIT_DEFAULT_DEPS = "1"
> @@ -37,20 +37,6 @@ KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.
>
> KERNEL_RELEASE ?= "${KERNEL_VERSION}"
>
> -KERNEL_CCSUFFIX ?= ""
> -KERNEL_LDSUFFIX ?= ""
> -
> -# Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> -# specific options necessary for building the kernel and modules.
> -#FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
> -TARGET_CC_KERNEL_ARCH ?= ""
> -HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> -TARGET_LD_KERNEL_ARCH ?= ""
> -HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> -
> -KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}"
> -
> # Where built kernel lies in the kernel tree
> KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
> KERNEL_IMAGEDEST = "boot"
> diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
> index 210c47c..cfee50a 100644
> --- a/meta/classes/module-base.bbclass
> +++ b/meta/classes/module-base.bbclass
> @@ -7,22 +7,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}"
>
> export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
> KERNEL_OBJECT_SUFFIX = ".ko"
> -KERNEL_CCSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ccsuffix')}"
> -KERNEL_LDSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-ldsuffix')}"
> -KERNEL_ARSUFFIX = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-arsuffix')}"
> -
> -# 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 = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
> -KERNEL_LD = "${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
> -KERNEL_AR = "${HOST_PREFIX}ar${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
>
> # kernel modules are generally machine specific
> PACKAGE_ARCH = "${MACHINE_ARCH}"
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
next prev parent reply other threads:[~2013-01-22 21:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-19 22:39 [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Khem Raj
2013-01-19 22:40 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
2013-01-22 15:41 ` Enrico Scholz
2013-01-22 16:33 ` Khem Raj
2013-01-24 12:13 ` Changing between gold and bfd linker (was: [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC) Enrico Scholz
2013-01-22 17:34 ` [PATCH 1/4] kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC Khem Raj
2013-01-22 20:44 ` Darren Hart [this message]
2013-01-22 21:44 ` Khem Raj
2013-01-22 21:50 ` Darren Hart
2013-01-22 22:12 ` Khem Raj
2013-01-22 22:19 ` Darren Hart
2013-01-23 8:46 ` Andrea Adami
2013-02-04 20:13 ` McClintock Matthew-B29882
2013-02-04 22:51 ` Khem Raj
2013-02-04 23:56 ` McClintock Matthew-B29882
2013-01-19 22:40 ` [PATCH 2/4] nfs-utils: Upgrade 1.2.3 -> 1.2.8-rc2 Khem Raj
2013-01-21 4:08 ` Saul Wold
2013-01-21 18:43 ` Khem Raj
2013-01-19 22:40 ` [PATCH 3/4] consolekit_0.4.5.bb: Package unpackaged systemd files Khem Raj
2013-01-19 22:40 ` [PATCH 4/4] boost: Upgrade 1.51 -> 1.52 Khem Raj
2013-01-19 23:05 ` [PATCH 0/4] boost, nfs-utils upgrade, drop KERNEL_CC Otavio Salvador
2013-01-20 3:38 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FEFA22.2090008@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.