ltp: Use bfd linker when lld is distro linker default
PATCH v2 1/1 ltp: Use bfd linker when lld is distro linker default
---
v2: Also fix KVM_LD and remove -fuse-ld=lld
meta/recipes-extended/ltp/ltp_20230516.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-extended/ltp/ltp_20230516.bb +3 -1
@@ -41,13 +41,15 @@ inherit autotools-brokensep pkgconfig # https://sourceware.org/bugzilla/show_bug.cgi?id=18097 # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" +LDFLAGS:remove = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=lld', '', d)}" +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd', '', d)}" # After 0002-kvm-use-LD-instead-of-hardcoding-ld.patch # https://github.com/linux-test-project/ltp/commit/f94e0ef3b7280f886384703ef9019aaf2f2dfebb # it fails with gold also a bit later when trying to use *-payload.bin # http://errors.yoctoproject.org/Errors/Details/663094/ # work around this by forcing .bfd linked in LD when ld-is-gold is in DISTRO_FEATURES -KVM_LD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" +KVM_LD = "${@bb.utils.contains_any('DISTRO_FEATURES', 'ld-is-gold ld-is-lld', '${HOST_PREFIX}ld.bfd${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${LD}', d)}" TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
2.41.0
Quoted 12 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>---
v2: Also fixKVM_LDand remove -fuse-ld=lldmeta/recipes-extended/ltp/ltp_20230516.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-extended/ltp/ltp_20230516.bb +0
-0
meta/recipes-extended/ltp/ltp_20230516.bb inherit autotools-brokensep pkgconfig · line 45
Quoted 5 lines
meta/recipes-extended/ltp/ltp_20230516.bb +2
-0@@ -41,13 +41,15 @@ inherit autotools-brokensep pkgconfig # https://sourceware.org/bugzilla/show_bug.cgi?id=18097 # https://github.com/linux-test-project/ltp/commit/3fce2064b54843218d085aae326c8f7ecf3a8c41#diff-39268f0855c634ca48c8993fcd2c95b12a65b79e8d9fa5ccd6b0f5a8785c0dd6R36 LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd', '', d)}" +LDFLAGS:remove = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-fuse-ld=lld', '', d)}" +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd', '', d)}"
Why do we need the remove? Nobody would set both ld-is-gold and ls-is- ldd would they?
I don't really like remove on principle in OE-Core...
Cheers,
Richard
Quoted 20 lines · Richard Purdie
Review
Quoted 8 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>---
v2: Also fixKVM_LDand remove -fuse-ld=lldmeta/recipes-extended/ltp/ltp_20230516.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0b/meta/recipes-extended/ltp/ltp_20230516.bb
meta/recipes-extended/ltp/ltp_20230516.bb inherit autotools-brokensep pkgconfig · line 42
Quoted 6 lines
index
e9407d3148e..1efb7637dcf100644meta/recipes-extended/ltp/ltp_20230516.bb +0
-0@@ -41,13 +41,15 @@ inherit autotools-brokensep pkgconfig # https://sourceware.org/bugzilla/show_bug.cgi?id=18097 #meta/recipes-extended/ltp/ltp_20230516.bb inherit autotools-brokensep pkgconfig · line 43
Quoted 1 line
meta/recipes-extended/ltp/ltp_20230516.bb +0
-0LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold',' -fuse-ld=bfd', '', d)}"
meta/recipes-extended/ltp/ltp_20230516.bb inherit autotools-brokensep pkgconfig · line 44
Quoted 1 line
meta/recipes-extended/ltp/ltp_20230516.bb +1
-0+LDFLAGS:remove = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld',
Quoted 8 lines
'-fuse-ld=lld', '', d)}"
meta/recipes-extended/ltp/ltp_20230516.bb inherit autotools-brokensep pkgconfig · line 45
Quoted 1 line
meta/recipes-extended/ltp/ltp_20230516.bb +1
-0+LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld',' -fuse-ld=bfd', '', d)}"
Why do we need the remove? Nobody would set both ld-is-gold and ls-is- ldd would they?
I don't really like remove on principle in OE-Core...
I think it is not needed for will test a v2
Quoted 6 lines
Cheers,
Richard