[cfe-commits] [PATCH] Adjust some linker flags for FreeBSD

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jul 28 17:33:08 PDT 2012


On 28 July 2012 12:35, Dimitry Andric <dimitry at andric.com> wrote:
> Hi,
>
> Here are two patches to slightly adjust the flags passed to the linker
> in FreeBSD.
>
> The first patch (freebsd-link-flags-1.diff) only enables the
> --hash-style=both and --enable-new-dtags flags when we're not statically
> linking, similar to what FreeBSD's gcc does.  Also, it only enables the
> --hash-style=both flag for the architectures that actually support it.

A nit: Do you expect other arches to grow support for it? Wouldn't it
be better to invert the list to something like:

if (Arch != llvm::Triple::pppc && Arch != ...).


> The second patch silences warnings about unused -g, -emit-llvm or -w
> flags when linking, similar to the fix that was done for Linux in PR
> 8611.  It also corrects a pasto in the comment in
> linuxtools::Link::ConstructJob() about this.

Would be nice to factor this some day, but LGTM.

Cheers,
Rafael



More information about the cfe-commits mailing list