mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 17:26:36 +01:00
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 (From OE-Core rev: c49f967384ccbfe131bbb33ee518014f3fc4b38f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24 lines
705 B
Plaintext
24 lines
705 B
Plaintext
inherit module_strip
|
|
|
|
inherit kernel-arch
|
|
|
|
export OS = "${TARGET_OS}"
|
|
export CROSS_COMPILE = "${TARGET_PREFIX}"
|
|
|
|
export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
|
|
KERNEL_OBJECT_SUFFIX = ".ko"
|
|
|
|
# kernel modules are generally machine specific
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
#
|
|
# Ensure the hostprogs are available for module compilation. Modules that
|
|
# inherit this recipe and override do_compile() should be sure to call
|
|
# do_make_scripts() or ensure the scripts are built independently.
|
|
#
|
|
do_make_scripts() {
|
|
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
|
oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
|
|
-C ${STAGING_KERNEL_DIR} scripts
|
|
}
|