Hi, On Thu, May 12, 2011 at 12:50:23PM +0200, konica sarker wrote: > On Wed, May 11, 2011 at 1:15 PM, konica sarker <konica.sarker@xxxxxxxxx> wrote: > > On Wed, May 11, 2011 at 12:31 PM, Kai Ruottu <kai.ruottu@xxxxxxxxxxx> wrote: > >> 11.5.2011 12:49, konica sarker kirjoitti: > >>>>> > >>>>> I want to compile a program from my personal computer (ubuntu is > >>>>> running) written for SPU target. > >>>>> Can you tell me the what is the command for this? > >>>> > >>>> Ubuntu should provide a package called 'spu-gcc' and the GCC-driver > >>>> in it being 'spu-gcc'... > >>>> > >>> Yes, I installed that package. now is is identifying the command spu-gcc > >>> but I have compiled a test code (following), and got some error message... > >>> Could you tell me why is this?ie what tzpe of error message is this? > >>> > >>> my code: > >>> > >>> int main(int argc, char *argv[]) > >>> { > >>> > >>> int x; > >>> return 0; > >>> > >>> } > >>> > >>> the error message : > >>> > >>> /tmp/ccz6TI1D.s: Assembler messages: > >>> /tmp/ccz6TI1D.s:3: Error: alignment not a power of 2 > >>> /tmp/ccz6TI1D.s:7: Error: no such instruction: `stqd $sp,-80($sp)' > >>> /tmp/ccz6TI1D.s:8: Error: no such instruction: `ai $sp,$sp,-80' > >>> /tmp/ccz6TI1D.s:9: Error: no such instruction: `lqd $2,48($sp)' > >> > >> Sounds like you haven't any 'spu-binutils'. That a GCC needs > >> suitable binutils: assembler, linker etc. and most probably > >> also a suitable C library, maybe 'spu-newlib' or something > >> package, was unfortunately not told :( > >> > >> Probably the Ubuntu's "package manager" has a "search" possibility > >> for finding all "spu" related packages.. > >> > > > > Ya, it works perfectly....thanks a lot :) > > > > I have another Problem. I have installed spu-binutils, spu-newlib, and > then spu-gcc.(.deb file, downloaded from internet) > Now I can compile my code with "spu-gcc -c test.c " command. > but the problem is, I have made a change in spu.h file, then how do I > rebuild GCC compiler? > > I have given a command >>./configure target=SPU then >> make > but make is giving error. > > so, my target is , I want to modify spu.c and spu.h and after > modifying, how do I recompile the compiler? Probably the easiest (as fully automated...) way is to do it "the Ubuntu way" (I'm using Debian, so I'm not 100% sure the comands are exactly the same on Ubuntu) - download the source code of the spu-cross-compiler should be something like "apt-get source spu-gcc" This will download the complete source code, including all modifications done by Ubuntu. - cd' into that new directory and change the spu.h/spu.c files then create the Ubuntu-packages: dpkg-buildpackage (here, dpkg-buildpackage will check that all dependencies are fullfilled. If something is missing, it will tell you the name of the Ubuntu-package you have to install). - now install the locally generated package spu-gcc.versionnumber.deb using "dpkg -i ..." Then everything should be fine :-) The same is of course possible with the spu-binutils,.. packages, if you want to change there something. HTH, Axel