~# ppu-gcc -o test test.c
test.c: In function 'main':
test.c:3: warning: incompatible implicit declaration of built-in function 'printf'
/usr/local/ps3dev/ppu/lib/gcc/ppu/4.2.0/../../../../ppu/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
I'm using ubuntu 8.04 on x86 pentium M, and the 4.2.0 is the right version according to the toolchain scripts for ppu, you can see 002-gcc-4.2.0-ppu-stage1.sh in scripts folder.
you used the toolchain for otheros, which has neither support for libc nor newlib. You may only be able to use the toolchain for compiling kernels or the otheros demo.
ouasse wrote:you used the toolchain for otheros, which has neither support for libc nor newlib. You may only be able to use the toolchain for compiling kernels or the otheros demo.
And be able to cross compile without any problems to run on a linux box. I haven't personaly tried this yet though, instead I'm using ssh to connect to my PS3 and call make from the command line which uses the CBE version of the IBM Cell SDK.
I edit the code on my PC though by using a folder shared with Samba.
The reason I'm doing it this way, is because I can't be bothered/don't yet know how to cross-compile the necessary support libraries (X11 dev, SDL, libc etc.) that I need. But because all that stuff is pre-built on my PS3, it's just easier to compile via ssh :)
The ps3toolchain, which is used for otheros development, has support for newlib but it doesn't have an OS added yet. This means there's no startup code, which is why it can't find crt*.o. You can find some startup code in the otheros demo.
As for Ubuntu:
danpeori@yggdrasil:~$ apt-cache search ppu-
ppu-binutils - PPU assembler, linker and binary utilities
ppu-g++ - PPU C++ compiler
ppu-gcc - PPU C compiler
ppu-gdb - Combined debugger for Linux on Cell BE
ppu-gfortran - PPU Fortran compiler
ppu-gnat - PPU Ada compiler
ppu-sysroot - Cell Broadband Engine (CBE) Cross-Compile System Root
ppu-sysroot64 - PPU cross-sysroot (64-bit)
aptitude search ppu-
i ppu-binutils - PPU assembler, linker and binary utilities
i ppu-g++ - PPU C++ compiler
i ppu-gcc - PPU C compiler
i ppu-gdb - Combined debugger for Linux on Cell BE
p ppu-gfortran - PPU Fortran compiler
p ppu-gnat - PPU Ada compiler
i ppu-sysroot - Cell Broadband Engine (CBE) Cross-Compile
i A ppu-sysroot64 - PPU cross-sysroot (64-bit)
aptitude search spu-
i spu-binutils - SPU assembler, linker and binary utilities
i spu-g++ - SPU cross-compiler (C++ compiler)
i spu-gcc - SPU cross-compiler (preprocessor and C com
i spu-gdb - SPU stand-alone debugger
p spu-gfortran - SPU cross-compiler (Fortran compiler)
i spu-newlib - SPU C library
And the test helloworld program compiled and linked.
file test
test: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped