diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-02-28 21:30:05 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-01 21:29:31 +0000 |
commit | 43a4d45f5145a5b174f5bfa5f2eb9988559d785f (patch) | |
tree | 7a2842911a1aeda2bdeb0f1b1121a07a561c2ac5 /meta/recipes-kernel | |
parent | 6a025980f450004821e8b5a9e78dc20d8d8dd970 (diff) | |
download | poky-43a4d45f5145a5b174f5bfa5f2eb9988559d785f.tar.gz |
kernel: Add kernel specific OBJDUMP
This helps in switching toolchains cleanly for kernel build
between gcc and clang
Currently, some kernels allow building with clang but not all
the distro might use clang as default system compiler but kernel
may demand gcc which is provided via KERNEL_* variables, however
kernel does use OBJCOPY at places during build and it maybe set
to use llvm objcopy when using clang. That should be a deliberate
setting when clang is used for kernel as well, otherwise it should
use binutils provided objcopy
(From OE-Core rev: 17b409f2fd97894e0943d13c2cb0d52abde647e3)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | 3 | ||||
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb index 38282e58f1..28e0807d1d 100644 --- a/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb +++ b/meta/recipes-kernel/make-mod-scripts/make-mod-scripts_1.0.bb | |||
@@ -27,7 +27,8 @@ EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CROS | |||
27 | do_configure() { | 27 | do_configure() { |
28 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | 28 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
29 | for t in prepare scripts_basic scripts; do | 29 | for t in prepare scripts_basic scripts; do |
30 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ | 30 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ |
31 | AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ | ||
31 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t | 32 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} $t |
32 | done | 33 | done |
33 | } | 34 | } |
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb index 2181e45a8d..efe359ec32 100644 --- a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb +++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb | |||
@@ -21,12 +21,12 @@ do_compile() { | |||
21 | then | 21 | then |
22 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP | 22 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP |
23 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | 23 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ |
24 | AR="${KERNEL_AR}" \ | 24 | AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ |
25 | -C ${STAGING_KERNEL_DIR} scripts | 25 | -C ${STAGING_KERNEL_DIR} scripts |
26 | oe_runmake KDIR=${STAGING_KERNEL_DIR} \ | 26 | oe_runmake KDIR=${STAGING_KERNEL_DIR} \ |
27 | M="${S}/runtime/uprobes/" \ | 27 | M="${S}/runtime/uprobes/" \ |
28 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | 28 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ |
29 | AR="${KERNEL_AR}" \ | 29 | AR="${KERNEL_AR}" OBJCOPY="${KERNEL_OBJCOPY}" \ |
30 | -C "${S}/runtime/uprobes/" | 30 | -C "${S}/runtime/uprobes/" |
31 | fi | 31 | fi |
32 | } | 32 | } |