I just tried out the latest LLVM and Clang trunk versions. They compiled without a single warning out of the box, but I'm having trouble linking a Hello, World! example. My code is

#include <stdio.h>

int main(){
  printf("Hello, World!\n");
}

If I compile using

clang test.c

I get the following error

/usr/bin/ld: crt1.o: No such file: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Using -v shows that the GNU ld is invoked as:

"/usr/bin/ld" --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out crt1.o crti.o crtbegin.o -L -L/../../.. /tmp/cc-0XJTsG.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtend.o crtn.o

But I have the crt1.o object file!

locate crt1.o

Output:

/usr/lib/Mcrt1.o
/usr/lib/Scrt1.o
/usr/lib/crt1.o
/usr/lib/gcrt1.o

This also works:

clang -c test.c
gcc test.o

And of course

gcc test.c

What I further tried:

clang -Xlinker "-L /usr/lib" tes
Edit
Report