summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2021-09-23 11:20:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-28 17:55:04 +0100
commit165b089a7dd0ee3769703336eed8eb936cdfaf1e (patch)
tree7ceb21a0e6986de4bbf40f5617bcf68382e73eed /meta/classes/kernel.bbclass
parent0afeb9f7402e3a86d07558b49f1218dcaaf46c80 (diff)
downloadpoky-165b089a7dd0ee3769703336eed8eb936cdfaf1e.tar.gz
kernel.bbclass: remove unnecessary dead code
The grep pattern seems to have been wrong ever since we stopped adding the -ffile-prefix-map via a patch in commit 20aea61385e, because the actual upstream gcc produces -ffile-prefix-map=<old>=<new> and not -ffile-prefix-map=<old=new> Besides, these *-prefix-map options are already used when building the kernel due to the setting of KERNEL_CC, and the kernel build system itself also probes for and uses at least -fmacro-prefix-map (hence taking care of __FILE__ etc., but not necessarily things that go in .debug_info sections). (From OE-Core rev: 5d56de8cd653d2a3a7f4c104d50c14e22d412f66) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass15
1 files changed, 2 insertions, 13 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d13c38fb02..4acec1877e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -322,15 +322,6 @@ python do_devshell:prepend () {
322 322
323addtask bundle_initramfs after do_install before do_deploy 323addtask bundle_initramfs after do_install before do_deploy
324 324
325get_cc_option () {
326 # Check if KERNEL_CC supports the option "file-prefix-map".
327 # This option allows us to build images with __FILE__ values that do not
328 # contain the host build path.
329 if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map=<old=new>"; then
330 echo "-ffile-prefix-map=${S}=/kernel-source/"
331 fi
332}
333
334kernel_do_compile() { 325kernel_do_compile() {
335 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE 326 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
336 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then 327 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
@@ -361,9 +352,8 @@ kernel_do_compile() {
361 copy_initramfs 352 copy_initramfs
362 use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio 353 use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
363 fi 354 fi
364 cc_extra=$(get_cc_option)
365 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do 355 for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
366 oe_runmake ${typeformake} CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd 356 oe_runmake ${typeformake} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
367 done 357 done
368 # vmlinux.gz is not built by kernel 358 # vmlinux.gz is not built by kernel
369 if (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux\.gz"); then 359 if (echo "${KERNEL_IMAGETYPES}" | grep -wq "vmlinux\.gz"); then
@@ -390,8 +380,7 @@ do_compile_kernelmodules() {
390 bbnote "KBUILD_BUILD_TIMESTAMP: $ts" 380 bbnote "KBUILD_BUILD_TIMESTAMP: $ts"
391 fi 381 fi
392 if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then 382 if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
393 cc_extra=$(get_cc_option) 383 oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
394 oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
395 384
396 # Module.symvers gets updated during the 385 # Module.symvers gets updated during the
397 # building of the kernel modules. We need to 386 # building of the kernel modules. We need to