[04/13] perf: Pass LDSHARED and CCLD via EXTRA_OEMAKE

Submitted by Khem Raj on Jan. 26, 2020, 7:27 p.m. | Patch ID: 169512

Details

Message ID f6fff9316613c79939e5a7495ebd8bd3a48c6d00.1580066507.git.raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Jan. 26, 2020, 7:27 p.m.
python code underneath is smart and pokes at python installation in
sysroot for compile environment, the overrides from EXTRA_OEMAKE are
ofcourse preferred but it falls back to python3's distutils/sysconfig
for rest of them, and it does use CCLD and LDSHARED for linking, when we
use clang to compile python3 then it encodes these variables to be clang
however, when building perf we inherit kernel which forces gcc to be
used for compiling perf, which then mixes both compilers due to CCLD and
LDSHARED demands. Therefore override CCLD and LDSHARED in make
environment helps python/distutils to use right linker

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-kernel/perf/perf.bb | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 840f3008b5..6d1b06693d 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -73,6 +73,8 @@  EXTRA_OEMAKE = '\
     CROSS_COMPILE=${TARGET_PREFIX} \
     ARCH=${ARCH} \
     CC="${CC}" \
+    CCLD="${CC}" \
+    LDSHARED="${CC} -shared" \
     AR="${AR}" \
     LD="${LD}" \
     EXTRA_CFLAGS="-ldw" \