This allows me to add -fuse-ld=lld/bfd to the build environment without
using XCFLAGS. If I use XCFLAGS the build fails due to the -Werror warning
-Wunused-command-line-argument.
Details
Details
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 12405 Build 12681: arc lint + arc unit
Event Timeline
Comment Actions
FWIW, I used -Wno-unused-command-line-argument in XCFLAGS as my workaround for using -fuse-ld. I'll defer to Bryan on how this should work. One question I have is does this DTRT if a Makefile modifies LDFLAGS? I almost wonder if what we want is to add CCLD and CXXLD variables that are used instead of CC and CXX when linking libraries and programs and have CCLD set to "XCC XCFLAGS XLDFLAGS" and CXXLD set to "XCXX XCXXFLAGS XLDFLAGS" in CROSSENV? (CCLD would default to CC and CXXLD would default to CXX)
Comment Actions
There was one Makefile that did a LDFLAGS= instead of += so I guess this is actually quite fragile. Adding CCLD/CXXLD sounds like the better solution and I'll upload a new patch with that approach if @bdrewery agrees that it makes sense.