On Thu, May 7, 2009 at 9:39 PM, Eli Friedman <eli.friedman at gmail.com> wrote:> On Thu, May 7, 2009 at 9:03 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote: >> I was trying to extract out the IR for some CELLBE code. However i >> was not able to compile with llvm-gcc. > > Can you give a couple examples of error messages you're getting?llvm-gcc -emit-llvm -S -W -Wall -Winline -Wno-main -I. -I /opt/cell/sysroot/usr/spu/include -I /opt/cell/sysroot/opt/cell/sdk/usr/spu/include -O3 -c simpleDMA_spu.c simpleDMA_spu.c:42:23: error: spu_mfcio.h: No such file or directory simpleDMA_spu.c: In function ‘main’: simpleDMA_spu.c:60: warning: implicit declaration of function ‘mfc_tag_reserve’ simpleDMA_spu.c:60: error: ‘MFC_TAG_INVALID’ undeclared (first use in this function) simpleDMA_spu.c:60: error: (Each undeclared identifier is reported only once simpleDMA_spu.c:60: error: for each function it appears in.) simpleDMA_spu.c:74: warning: implicit declaration of function ‘mfc_get’ simpleDMA_spu.c:79: warning: implicit declaration of function ‘mfc_write_tag_mask’ simpleDMA_spu.c:83: warning: implicit declaration of function ‘mfc_read_tag_status_all’ what is happening is llvm-gcc is not able to view the header files even when the includes have been given Kshitiz
On Thu, May 7, 2009 at 9:25 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote:>> Can you give a couple examples of error messages you're getting? > llvm-gcc -emit-llvm -S -W -Wall -Winline -Wno-main -I. -I > /opt/cell/sysroot/usr/spu/include -I > /opt/cell/sysroot/opt/cell/sdk/usr/spu/include -O3 -c simpleDMA_spu.c > simpleDMA_spu.c:42:23: error: spu_mfcio.h: No such file or directorySorry for the extremely low-level question, but did you compile llvm-gcc as a cross-compiler targeting Cell? Assuming you did, I'm not sure what the issue is; llvm-gcc should be providing that header. -Eli
On Thu, May 7, 2009 at 10:12 PM, Eli Friedman <eli.friedman at gmail.com> wrote:> On Thu, May 7, 2009 at 9:25 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote: >>> Can you give a couple examples of error messages you're getting? >> llvm-gcc -emit-llvm -S -W -Wall -Winline -Wno-main -I. -I >> /opt/cell/sysroot/usr/spu/include -I >> /opt/cell/sysroot/opt/cell/sdk/usr/spu/include -O3 -c simpleDMA_spu.c >> simpleDMA_spu.c:42:23: error: spu_mfcio.h: No such file or directory > > Sorry for the extremely low-level question, but did you compile > llvm-gcc as a cross-compiler targeting Cell? Assuming you did, I'm > not sure what the issue is; llvm-gcc should be providing that header. >Oh ok.. I think that is the problem. I was using the llvm-gcc x86 pre compiled binary. . I will compile llvm-gcc fromt end from the source code and try that. Thanks a lot.. :) Kshitiz