[cfe-dev] Results of the FreeBSD Ports build with CC=clang

Eli Friedman eli.friedman at gmail.com
Wed Jun 3 12:47:48 PDT 2009


On Wed, Jun 3, 2009 at 11:45 AM, Erik Cederstrand<erik at cederstrand.dk> wrote:
> On Tue Jun 2 12:03:30 CDT 2009, Chris Lattner wrote:
>> On Jun 2, 2009, at 12:23 AM, Eli Friedman wrote:
>> > -O4: You could patch the packages, although I'm slightly hesitant to
>> > suggest that... anyone have any better suggestions?
>>
>> This is tricky. I wonder if there is some magic that the clang driver
>> can do for -O4 when the linker doesn't support LTO?
>
> Forgive my ignorance, but wouldn't it be better to get LTO to work on
> FreeBSD? I realize this may be a FreeBSD-specific question, and I'll move
> the discussion there if needed. If I understand correctly:
>
> * the linker needs to know about and be able to use libLTO
> * Clang currently uses GNU ld on FreeBSD
> * GNU ld rules out -O4 since it doesn't support LTO
>
> Would llvm-ld be sufficient as a linker, or is it missing other features
> needed by FreeBSD? What would it take to get LTO support on FreeBSD?

llvm-ld is insufficient because it doesn't interact correctly with
conventional nm/ar/etc.  gold ( http://llvm.org/docs/GoldPlugin.html )
should work on FreeBSD, though.

-Eli



More information about the cfe-dev mailing list