Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross-compiling GCC 3.0.4 for the Playstation 2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
Chewi
Developer
Developer


Joined: 01 Sep 2003
Posts: 886
Location: Edinburgh, Scotland

PostPosted: Sun Apr 09, 2006 3:59 pm    Post subject: Cross-compiling GCC 3.0.4 for the Playstation 2 Reply with quote

Hello. I'm trying to cross-compile GCC for Linux on the Playstation 2. An ebuild for GCC 3.2.2 already exists but this will only compile static ELFs, which aren't suitable for Linux, so I'm trying to make one for GCC 3.0.4. This is the latest version available to Linux on the Playstation 2. I've already successfully cross-compiled the binutils snapshot distributed on the PS2/Linux DVD but I can't quite manage GCC. It gets very close to the end and then bails out. Here's a verbose look at what happens.

Code:
./xgcc -B./ -B/usr/mipsEEel-linux/bin/ -isystem /usr/mipsEEel-linux/include -isystem /usr/mipsEEel-linux/sys-include -O2  -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/. -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/../include  -DL_floatdidf -c /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/libgcc2.c -o libgcc/./_floatdidf.o -v


Reading specs from ./specs
Configured with: /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/configure --prefix=/usr --bindir=/usr/mipsEEel-linux/gcc-bin/3.0.4 --includedir=/usr/lib/gcc-lib/mipsEEel-linux/3.0.4/include --datadir=/usr/share/gcc-data/mipsEEel-linux/3.0.4 --mandir=/usr/share/gcc-data/mipsEEel-linux/3.0.4/man --infodir=/usr/share/gcc-data/mipsEEel-linux/3.0.4/info --with-gxx-include-dir=/usr/lib/gcc-lib/mipsEEel-linux/3.0.4/include/g++-v3 --host=i686-pc-linux-gnu --target=mipsEEel-linux --build=i686-pc-linux-gnu --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c --enable-__cxa_atexit
Thread model: single
gcc version 3.0.4
 ./cc1 -lang-c -v -I. -I. -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/. -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config -I/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/../include -iprefix ./../../lib/gcc-lib/mipsEEel-linux/3.0.4/ -isystem ./include -isystem /usr/mipsEEel-linux/bin/include -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -Dunix -D__unix__ -Dlinux -D__linux__ -Dmips -D_mips -D__mips -D__mips__ -DR3000 -D_R3000 -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__ -D__ELF__ -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__unix__ -D__unix__ -D__linux__ -D__linux__ -D__mips__ -D__mips__ -D__mips -D__mips__ -D__R3000__ -D_R3000 -D__MIPSEL__ -D_MIPSEL -D__MIPSEL -D__MIPSEL__ -D__unix -D__linux -D__mips -D__mips -D__R3000 -D__MIPSEL -Asystem=linux -Asystem=posix -Acpu=mips -Amachine=mips -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C -D_MIPS_SZPTR=32 -D_MIPS_SZINT=32 -D__SIZE_TYPE__=unsigned int -D__SSIZE_TYPE__=int -D__PTRDIFF_TYPE__=int -D_MIPS_SZLONG=32 -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS1 -D__PIC__ -D__pic__ -D__LANGUAGE_C__ -DLANGUAGE_C -DCROSS_COMPILE -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -DL_floatdidf -isystem /usr/mipsEEel-linux/include -isystem /usr/mipsEEel-linux/sys-include -isystem ./include /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -g1 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -fPIC -o /tmp/cciKsKPz.s
ignoring nonexistent directory "/usr/mipsEEel-linux/bin/include"
GNU CPP version 3.0.4 (cpplib) (MIPSel GNU/Linux with ELF)
GNU C version 3.0.4 (mipsEEel-linux)
        compiled by GNU C version 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9).
ignoring nonexistent directory "../../lib/gcc-lib/mipsEEel-linux/3.0.4/include"
ignoring nonexistent directory "../../lib/gcc-lib/mipsEEel-linux/3.0.4/../../../../mipsEEel-linux/sys-include"
ignoring nonexistent directory "../../lib/gcc-lib/mipsEEel-linux/3.0.4/../../../../mipsEEel-linux/include"
ignoring nonexistent directory "/usr/lib/gcc-lib/mipsEEel-linux/3.0.4/include"
ignoring nonexistent directory "/usr/lib/gcc-lib/mipsEEel-linux/3.0.4/../../../../mipsEEel-linux/sys-include"
ignoring nonexistent directory "/usr/lib/gcc-lib/mipsEEel-linux/3.0.4/../../../../mipsEEel-linux/include"
ignoring duplicate directory "."
ignoring duplicate directory "/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc"
ignoring duplicate directory "include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc
 /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config
 /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/include
 include
 /usr/mipsEEel-linux/include
 /usr/mipsEEel-linux/sys-include
End of search list.
In file included from tm.h:6,
                 from /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/xm-mips.h:45,
                 from tconfig.h:3,
                 from /var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/libgcc2.c:36:
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:230:1: warning: "INT_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:234:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:254:1: warning: "INIT_SECTION_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:280:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:255:1: warning: "FINI_SECTION_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:281:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:325:1: warning: "COMMON_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:195:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:327:1: warning: "ASM_OUTPUT_ALIGNED_COMMON" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:198:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:339:1: warning: "LOCAL_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:212:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:341:1: warning: "ASM_OUTPUT_ALIGNED_LOCAL" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:215:1: warning: this is the location of the previous definition
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/mips/linux.h:580:1: warning: "IDENT_ASM_OP" redefined
/var/tmp/portage/gcc-3.0.4/work/gcc-3.0.4/gcc/config/elfos.h:101:1: warning: this is the location of the previous definition
 /usr/mipsEEel-linux/bin/as -EL -O2 -g1 -v -KPIC -o libgcc/./_floatdidf.o /tmp/cciKsKPz.s
GNU assembler version 2.9-ee-990721 (mipsEEel-linux) using BFD version 2.9-ee-990721
/tmp/cciKsKPz.s: Assembler messages:
/tmp/cciKsKPz.s:140: Error: opcode not supported on this processor `cvt.d.w'
/tmp/cciKsKPz.s:141: Error: opcode not supported on this processor `mul.d'
/tmp/cciKsKPz.s:143: Error: opcode not supported on this processor `cvt.d.w'
/tmp/cciKsKPz.s:147: Error: opcode not supported on this processor `mul.d'
/tmp/cciKsKPz.s:152: Error: opcode not supported on this processor `add.d'
/tmp/cciKsKPz.s:156: Error: opcode not supported on this processor `mov.d'
/tmp/cciKsKPz.s:166: Error: opcode not supported on this processor `add.d'
/usr/mipsEEel-linux/bin/as: bfd assertion fail /var/tmp/portage/binutils-19990721/work/binutils-2.9EE/bfd/elf32-mips.c:2919


It seems to compile several similar files just before this one. I'm not sure why this one fails. I've tried the --with-float=soft option but that doesn't help. Knowledge about this is very scarce. The PS2/Linux community seems to have gone to sleep. If no one here knows what to do, I guess I'll have to pester certain key people in the community directly!
Back to top
View user's profile Send private message
Chewi
Developer
Developer


Joined: 01 Sep 2003
Posts: 886
Location: Edinburgh, Scotland

PostPosted: Sun Apr 09, 2006 6:35 pm    Post subject: Reply with quote

Figured it out myself. For some reason, GCC wasn't selecting the right configuration profile from my target of mipsEEel-linux. mipsEEel-linux is the common name for the target so I forced the selection process by editing the config.gcc file.

Now it's falling over due to some missing header files. Nearly there!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum