Skip to contentSkip to conversation

libunix-statgrab: Use compiler driver for linking as well

PATCH New Khem Raj 1 participant 1 message Dec 6, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libunix-statgrab: Use compiler driver for linking as well

the build system tries to deduce the compiler and its friends and fails because OE passes LDFLAGS assuming that linker will be invoked via compiler driver ( gcc or clang ) therefore prefixes linker options with -Wl, but libunix-statgrab build system enquires LD variable for linker and uses LDFLAGS with it, which causes linker to fail since ld does not recognise -Wl, etc. Therefore using CCLD for linker is right choice here

Fixes
Checking for cc... i686-yoe-linux-ld: unrecognized option '-Wl,-O1'
i686-yoe-linux-ld: use the --help option for usage information

---
 meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-perl/recipes-perl/libstatgrab/libunix-statgrab_0.112.bb +2 -0
index 7af7f92fb9..c2b6d4abf8 100644
@@ -33,6 +33,8 @@ SRC_URI[sha256sum] = "16a29f7acaeec081bf0e7303ba5ee24fda1d21a1104669b837745f3ea6
 
 S = "${WORKDIR}/Unix-Statgrab-${PV}"
 
+export LD = "${CCLD}"
+
 inherit cpan pkgconfig ptest-perl
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1