[cfe-dev] Bug with -O4

Eli Friedman eli.friedman at gmail.com
Tue Apr 28 01:17:50 PDT 2009


On Tue, Apr 28, 2009 at 12:48 AM, Robert Purves <listrp at gmail.com> wrote:
> I'm not sure what I expect -O4 to do, but clang's response was a
> surprise.
>
> $ cat test.c
> int main( void ) { return 0; }
> $ gcc test.c -O4
> $ llvm-gcc-4.2 test.c -O4
> $ clang test.c -O4
> ld warning: in /var/folders/88/88AKX+F62RWmd++8ZOxBkU+++TI/-Tmp-/cc-
> NuzMfl.o, file is not of required architecture
> Undefined symbols:
>   "_main", referenced from:
>       start in crt1.10.5.o
> ld: symbol(s) not found

-O4 implies LTO; it's still somewhat experimental.  I'm not sure what
the current status is, though.

-Eli




More information about the cfe-dev mailing list