Hi, well, I downloaded the head revision of llvm and llvm-gcc. As you said it hangs at: Formal argument #0 has unhandled type f32 /home/julio/trunk/llvm-gcc/gcc/libgcc2.c:1765: internal compiler error: Abortado Please submit a full bug report, with preprocessed source if appropriate. Actually, I don't need fp, there is any way to disable? By the way, I'm working with a MIPS coprocessor with vectorial reconfigurable units (similar to RSVP). My future work will be autovectorize loops (I've already studied some code in LLVM and doesn seems very difficult, thanks to ScalarEvolution, LoopInfo, etc.). I was wondering about compiling newlib with gcc, compiling my code with llvm, and linking with the traditional ld, OR, compiling newlib with llvm, link my code and newlib (in llvm bitcode), and finally assemble to MIPS binary. With the second way, I could optimize functions like memcpy with vectorial instructions :). The problem, is that in newlib there are c code mixed with MIPS assembler. I was wondering if configuring its compilation using llvm-gcc as CC and gnu-as as AS would work (linking the as files finally with ld and the result of the llvm assembler). In this way, with llvm-gcc working with -c and --emit-llvm command-options, would call gnu-as or llvm-as? Thanks. Julio PD: My english isn't as good as I wanted, so if you don't understand me let me know. 2008/7/6 Bruno Cardoso Lopes <bruno.cardoso at gmail.com>:> Hi Julio, > > On Sun, Jul 6, 2008 at 1:58 PM, Julio <julio.martin.hidalgo at gmail.com> > wrote: > > Hello, I'm trying to compile llvm-gcc to crosscompile mips. I have > already > > modified a config.gcc to add mips as a target with llvm, but it gives me > > "Did not get a target machine!" (from llvm-backend.cpp). > > > > I thought that I had to modify TargetMachOWriterInfo.h with MIPS info, > but > > now the problem is that I don't know where can I get the <mach/machine.h> > (I > > don't have it in /usr/include). > > > > Any suggestions? > > Are you using the llvm-gcc top-of-tree(TOT) ? the TOT contains mips > crosscompile > support, btw, you wont be able to pass through libgcc fp compile, which is > what > I'm working right now. > What I suggest is that you begin the cross-compilation using llvm-gcc TOT, > and > when it breaks, use cc1 directly to emit llvm bytecode specific for mips. > Then, > use llc. > If you have doubts, just ask :) > > -- > Bruno Cardoso Lopes > http://www.brunocardoso.cc > "When faced with untenable alternatives, you > should consider your imperative." > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080707/4a83fae7/attachment.html>
And one last thing, the problem seems to be related to libcpp. Using only C frontend will work? 2008/7/7 Julio <julio.martin.hidalgo at gmail.com>:> Hi, well, I downloaded the head revision of llvm and llvm-gcc. As you said > it hangs at: > > Formal argument #0 has unhandled type f32 > /home/julio/trunk/llvm-gcc/gcc/libgcc2.c:1765: internal compiler error: > Abortado > Please submit a full bug report, > with preprocessed source if appropriate. > > Actually, I don't need fp, there is any way to disable? > > By the way, I'm working with a MIPS coprocessor with vectorial > reconfigurable units (similar to RSVP). My future work will be autovectorize > loops (I've already studied some code in LLVM and doesn seems very > difficult, thanks to ScalarEvolution, LoopInfo, etc.). I was wondering about > compiling newlib with gcc, compiling my code with llvm, and linking with the > traditional ld, OR, compiling newlib with llvm, link my code and newlib (in > llvm bitcode), and finally assemble to MIPS binary. With the second way, I > could optimize functions like memcpy with vectorial instructions :). > > The problem, is that in newlib there are c code mixed with MIPS assembler. > I was wondering if configuring its compilation using llvm-gcc as CC and > gnu-as as AS would work (linking the as files finally with ld and the result > of the llvm assembler). In this way, with llvm-gcc working with -c and > --emit-llvm command-options, would call gnu-as or llvm-as? > > Thanks. > Julio > > PD: My english isn't as good as I wanted, so if you don't understand me let > me know. > > > > 2008/7/6 Bruno Cardoso Lopes <bruno.cardoso at gmail.com>: > > Hi Julio, >> >> On Sun, Jul 6, 2008 at 1:58 PM, Julio <julio.martin.hidalgo at gmail.com> >> wrote: >> > Hello, I'm trying to compile llvm-gcc to crosscompile mips. I have >> already >> > modified a config.gcc to add mips as a target with llvm, but it gives me >> > "Did not get a target machine!" (from llvm-backend.cpp). >> > >> > I thought that I had to modify TargetMachOWriterInfo.h with MIPS info, >> but >> > now the problem is that I don't know where can I get the >> <mach/machine.h> (I >> > don't have it in /usr/include). >> > >> > Any suggestions? >> >> Are you using the llvm-gcc top-of-tree(TOT) ? the TOT contains mips >> crosscompile >> support, btw, you wont be able to pass through libgcc fp compile, which is >> what >> I'm working right now. >> What I suggest is that you begin the cross-compilation using llvm-gcc TOT, >> and >> when it breaks, use cc1 directly to emit llvm bytecode specific for mips. >> Then, >> use llc. >> If you have doubts, just ask :) >> >> -- >> Bruno Cardoso Lopes >> http://www.brunocardoso.cc >> "When faced with untenable alternatives, you >> should consider your imperative." >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080707/875fb23a/attachment.html>
> Formal argument #0 has unhandled type f32 > /home/julio/trunk/llvm-gcc/gcc/libgcc2.c:1765: internal > compiler error: Abortado > Please submit a full bug report, > with preprocessed source if appropriate.I think an "export LC_ALL=C" cures the "Abortado" :-) This looks like your host-compiler (e.g. what comes with your Linux/BSD/MacOSX/xxxx-Distribution) has a bug. It cannot compile this code. The best way for you would be to get this fixed. If this is not feasible, sometimes you can look at the exact gcc commandline, and run this commandline manually, but ommitting the "-O2". Quite often the source can than be compiled. Naturally this is just a band-aid ... Also, have a look at the list of broken compilers: http://llvm.org/docs/GettingStarted.html#brokengcc
Hi Julio, On Mon, Jul 7, 2008 at 6:53 AM, Julio <julio.martin.hidalgo at gmail.com> wrote:> And one last thing, the problem seems to be related to libcpp. Using only C > frontend will work?The problem is with libgcc2, which contains libcalls needed to support some operations your processor cant directly do.>> Actually, I don't need fp, there is any way to disable?dunno how to disable>> By the way, I'm working with a MIPS coprocessor with vectorial >> reconfigurable units (similar to RSVP). My future work will be autovectorize >> loops (I've already studied some code in LLVM and doesn seems very >> difficult, thanks to ScalarEvolution, LoopInfo, etc.). I was wondering about >> compiling newlib with gcc, compiling my code with llvm, and linking with the >> traditional ld, OR, compiling newlib with llvm, link my code and newlib (in >> llvm bitcode), and finally assemble to MIPS binary. With the second way, I >> could optimize functions like memcpy with vectorial instructions :).cool :)>> The problem, is that in newlib there are c code mixed with MIPS assembler. >> I was wondering if configuring its compilation using llvm-gcc as CC and >> gnu-as as AS would work (linking the as files finally with ld and the result >> of the llvm assembler). In this way, with llvm-gcc working with -c and >> --emit-llvm command-options, would call gnu-as or llvm-as?with llvm-gcc crosscompiler ready you should have the (mips) gnu-as/ld called automatically by gcc (as long as they are identified by 'configure') I haven't tried to compile newlib yet (I'll will in the near feature), if it breaks send me the bugs with testcases and I'll try to fix it for you. The mips BE is still under heavy devel, so I dunno if it will perfectly fit your needs. Anyway, I can help you with the bugs! :) -- Bruno Cardoso Lopes http://www.brunocardoso.cc "When faced with untenable alternatives, you should consider your imperative."