diff options
| -rw-r--r-- | meta/classes/kernel.bbclass | 15 |
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 | ||
| 323 | addtask bundle_initramfs after do_install before do_deploy | 323 | addtask bundle_initramfs after do_install before do_deploy |
| 324 | 324 | ||
| 325 | get_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 | |||
| 334 | kernel_do_compile() { | 325 | kernel_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 |
