Bug 12926

Summary: Standard SDK sets LD=<cross>-ld but LDFLAGS with "-Wl," as if LD=<cross>-gcc
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yann Dirson <ydirson>
Component: oe-core otherAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium CC: randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 4.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Yann Dirson 2018-09-18 19:51:22 UTC
When cross-compiling a kernel using the SDK from current sumo head, I get hit by link failures, the cross ld rejecting -Wl,-O1 and such that it gets from LDFLAGS.

Looks like a mismatch, since such flags are clearly meant for a cross gcc wrapper, though I wonder how such a thing would have been missed - can't see what I would have done wrong though...
Comment 2 Richard Purdie 2018-09-20 18:12:07 UTC
This definitely is an oddity but it matches how the build system works today. I believe there may be some oddity in autotools and we're following the convention with the SDK matching the way the rest of OE works.

I did once look into either specifiing gcc as LD or making LDFLAGS not use the -Wl prefixes but doing that basically causes the world to break.

I don't really want to change the SDK to be different to the build system and I also suspect if we did, it would stop working with autotool'd projects.

We should probably check into this a bit further but I can't see a way we can realistically change what we have here...
Comment 3 Richard Purdie 2018-09-20 18:14:06 UTC
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=3920
Comment 4 Ross Burton 2020-01-29 16:36:56 UTC
Assigning to RP so he can decide whether we do something, or just close it as a fact.
Comment 5 Richard Purdie 2020-02-19 23:35:41 UTC
We really can't change this, this is how the world expects these variables to behave, odd as it sounds...