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

Eli Friedman eli.friedman at gmail.com
Tue Jun 2 11:07:50 PDT 2009


On Tue, Jun 2, 2009 at 10:03 AM, Chris Lattner<clattner at apple.com> wrote:
>> -Werror: The errors involving %m are PR4142.  The others look like
>> legitimate warnings; they're asking for it by using -Werror :)
>
> Warnings should be convertible back into warnings with -Werror
> -Wno-error=foo

Then I suppose it's a bug that the warnings in question ("if statement
has empty body" and "overflow converting case value to switch
condition type") don't have corresponding command-line options.

>> --signed-char: The ability to use a signed character type is available
>> to the AST, but it isn't exposed in a way that can be easily added as
>> a command-line option.  I'm not entirely sure how we want to implement
>> this.  Please file a bug to keep track of this.
>
> Is this hard to implement?  We should just support the same interface that
> GCC does.  If you don't specify a signed-char flag, it defaults to what the
> target wants, if you do, the command line overrides it.

It's not that hard, but I'm not sure what the best way to do it is.
Should it be in LangOptions as a tri-state option which overrides the
target?

>> -rpath/--no-undefined: These appear to be platform-specific options;
>> do we have a policy about those at the moment?
>
> No idea, Daniel?
>
>> -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?

Possible, but non-trivial: we'd have to be able to detect .bc files
(both archived and unarchived), extract and compile them separately,
then link them with all the other files.  It's certainly doable,
though, if we properly control the toolchain (i.e. we're not using a
gcc-based toolchain).

-Eli




More information about the cfe-dev mailing list