Rafael Espindola
2010-Jun-06 23:41 UTC
[LLVMdev] Error while compiling mysql using LLVM-gold
On 6 June 2010 13:48, Guoliang Jin <jingl1345 at gmail.com> wrote:> Thanks Rafael. > > I compiled llvm-gcc by myself, and I can compile mysql now. > > Right now, when I run llvm-gcc a.c -emit-llvm -use-gold-plugin -Wl,debug > I got > ld: error: cannot open debug: No such file or directory > collect2: ld returned 1 exit status > > I do not know why this is happening.It Is -Wl,-debug. Sorry about that. Cheers, -- Rafael Ávila de Espíndola
Rafael Espindola wrote:> On 6 June 2010 13:48, Guoliang Jin <jingl1345 at gmail.com> wrote: > >> Thanks Rafael. >> >> I compiled llvm-gcc by myself, and I can compile mysql now. >> >> Right now, when I run llvm-gcc a.c -emit-llvm -use-gold-plugin -Wl,debug >> I got >> ld: error: cannot open debug: No such file or directory >> collect2: ld returned 1 exit status >> >> I do not know why this is happening. >> > > It Is -Wl,-debug. Sorry about that. > > Cheers, >Thanks Rafael. With the local compiled llvm-gcc, it compiles now, and "-Wl,-debug" gives reasonable output. However, I still do not see the bitcode file for those large software like apache while complied using the gold plugin...
Rafael Espindola
2010-Jun-07 02:28 UTC
[LLVMdev] Error while compiling mysql using LLVM-gold
> Thanks Rafael. With the local compiled llvm-gcc, it compiles now, and > "-Wl,-debug" gives reasonable output. However, I still do not see the > bitcode file for those large software like apache while complied using the > gold plugin...Normally it is all done in the plugin. Are you passing -emit-llvm to llvm-gcc? If so, running file in one of the .o should show "data" and you can get a combined bitcode file by passing -Wl,-plugin-opt=also-emit-llvm to the final link line. So if you do gcc a.o b.o -o foo -Wl,-plugin-opt=also-emit-llvm you will get two files, foo and foo.bc. The first one is an elf file, the second one is bitcode. Cheers, -- Rafael Ávila de Espíndola
Reasonably Related Threads
- [LLVMdev] Error while compiling mysql using LLVM-gold
- [LLVMdev] Error while compiling mysql using LLVM-gold
- [LLVMdev] Error while compiling mysql using LLVM-gold
- [LLVMdev] gold and debug information
- [LLVMdev] What are the optimizations that gold uses during the final link stage?