[LLVMdev] CMake: Gold linker detection

C Bergström cbergstrom at pathscale.com
Tue Jan 27 22:16:06 PST 2015


On Wed, Jan 28, 2015 at 7:00 AM, Sumanth Gundapaneni <
sgundapa at codeaurora.org> wrote:

> I reacted as per my case.  You need CFLAGS in order to what linker you
> might be using.
>
> In case of clang, you can use “-fuse-ld” to control the invocation of
> linker.
>
> In my opinion, it is not necessary to carry forward LDFLAGS unless you
> want to control specific parts of the linker.
>

Unless I'm mistaken typically LDFLAGS are passed like this. (I think you
are mistaken)

${COMPILER} ${LDFLAGS}

ld ${LDFLAGS} # It doesn't mean this isn't also possible

Regardless if you're dealing with a cross compiler or whatever weird CFLAGS
you have to pass. This is a linker issue and LDFLAGS are designed to deal
precisely with that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150128/132a739d/attachment.html>


More information about the llvm-dev mailing list