[LLVMdev] Problem while compling SPEC2000 with llvm-gcc

Török Edwin edwintorok at gmail.com
Wed Dec 23 06:00:40 PST 2009


On 2009-12-23 08:22, Li Shengmei wrote:
>
> Hi, all
>
>          I use llvm-gcc –O4 to compile SPEC 2000, some benchmarks
> can’t be built successfully, such as 164.gzip, 175.vpr etc.
>
> The error messages are as follows.
>
>  
>
> ……
>
> zh.o unlzw.o unpack.o unzip.o util.o zip.o     -o gzip
>
> bits.o: file not recognized: File format not recognized
>

-O4 outputs LLVM bitcode, instead of ELF files, thus requires a linker
that is able to understand it (such as the Gold linker, with the LLVM
plugin).
Try compiling any C source file with -O4, it won't work unless you have
special support from the linker.

> collect2: ld returned 1 exit status
>
> specmake: *** [gzip] Error 1
>
> specmake  options 2> options.err | tee options.out
>
> COMP: /home2/lishengmei/tools/llvm-gcc-4.2/bin/llvm-gcc  -c -o
> options.o    -O4
>
> LINK: /home2/lishengmei/tools/llvm-gcc-4.2/bin/llvm-gcc              
> -o options
>
>   Some files did not appear to be built: gzip
>
> *** Error building 164.gzip
>
> If you wish to ignore this error, please use '-I' or ignore errors.
>
>  
>
> When I use O3 instead of O4, the errors disappear. I use llvm-2.6
> version on Red hat Linux. The CPU is “Dual-Core AMD Opteron(tm)
> Processor 8218”
>
> Can anyone give help?
>

This page describes how to build Gold, and LLVM's plugin:
http://llvm.org/docs/GoldPlugin.html


>  
>
> Btw, some benchmarks run more slowly wth llvm-gcc O3 than with gcc
> O3(version is 4.4.2) on my system. Such as 186.crafty, 253.perlbmk,
> 254.gap
>
> Anyone give comments?
>

How much slower?

Best regards,
--Edwin




More information about the llvm-dev mailing list