Path: chuka.playstation.co.uk!news From: James Tait Newsgroups: scee.yaroze.programming.gnu_compiler Subject: That dreaded Linux query again.... Date: Fri, 25 Sep 1998 03:01:10 +0100 Organization: Wyrd Dreams - Internet Realities Lines: 224 Message-ID: <360AF965.4D35F33B@wyrddreams.demon.co.uk> NNTP-Posting-Host: wyrddreams.demon.co.uk Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------B3019ECC4347971EC9AAA31F" X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.27 i586) --------------B3019ECC4347971EC9AAA31F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greetings all, I've just had some info from Toby Hutton that led me to a page (http://www.netyaroze-europe.com/~byz00002/unix/) from the Japanese site that contains (if you can decypher it) some instructions for creating GCC development tools for Linux. OK, great, I downloaded binutils 2.8.1, gcc2.8.0, gdb-4.16 plus all the patches and the hssutils from the page. I applied the patches. I built myself a lovely new set of GNU utilities and a shiny new set of compilers for Linux. I configured as a cross-compiler and did the same for the psx target. I try to compile something: wyrddreams{JTait}592: psx-gcc main.c /tmp/cca24145.s: Assembler messages: /tmp/cca24145.s:1: Warning: Missing string /tmp/cca24145.s:1: Error: Rest of line ignored. First ignored character is `1'. psx-gcc: Internal compiler error: program as got fatal signal 11 It dumped core on me. I decided to go for the manual approach (which, I have to confess I'm not at all clued up about, but I had a guess all the same): wyrddreams{JTait}601: psx-gcc -v -S main.c Reading specs from /usr/lib/gcc-lib/psx/2.8.0/specs gcc version 2.8.0 /usr/lib/gcc-lib/psx/2.8.0/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000 -D__PSX__ -D__mips__ -D__MIPSEL__ -D__R3000__ -D___mips__ -D_MIPSEL -D_R3000 -D__PSX__ -D__mips -D__MIPSEL -D__R3000 -D___mips -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int main.c /tmp/cca24197.i GNU CPP version 2.8.0 [AL 1.1, MM 40] SCE PlayStation #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc-lib/psx/2.8.0/include /usr/psx/include End of search list. /usr/lib/gcc-lib/psx/2.8.0/cc1 /tmp/cca24197.i -quiet -dumpbase main.c -version -o main.s GNU C version 2.8.0 (psx) compiled by GNU C version 2.8.0. wyrddreams{JTait}602: psx-as -o main.o main.s wyrddreams{JTait}603: psx-ld -o main main.o psx-ld: warning: cannot find entry symbol _start; defaulting to 80100000 main.o: In function `main': main.c(.text+0xc): undefined reference to `__main' main.c(.text+0xc): relocation truncated to fit: JMPADDR __main main.c(.text+0x18): undefined reference to `printf' main.c(.text+0x18): relocation truncated to fit: JMPADDR printf wyrddreams{JTait}604: psx-ld -o main /usr/local/psx/lib/libps.a main.o psx-ld: warning: cannot find entry symbol _start; defaulting to 80100000 main.o: In function `main': main.c(.text+0xc): undefined reference to `__main' main.c(.text+0xc): relocation truncated to fit: JMPADDR __main main.c(.text+0x18): undefined reference to `printf' main.c(.text+0x18): relocation truncated to fit: JMPADDR printf wyrddreams{JTait}605: ls Makefile* main.c* main.o main.s pad.c* pad.h* As far as I can ascertain I've followed the instructions (I mean me not speaking shift-jis it's hard to tell), I even tried it the GCC-specified way, but I just can't get the programs to compile. I'll admit I'm clueless when it comes to GCC anyway, but I prefer to work under Linux rather than having DOS installed purely for DJGCC and a couple of funky utils so if I get problems like this I can post it to a newsgroup (no PPP under DOS, you see.). I'd appreciate any help anyone can throw my way. -- Take care, JT \\|// (O-O) --------------------------------oOO--(_)--OOo--------------------------------- "I can take you out with just a flick of my wrist" - Garbage (Supervixen) e-mail: jt061@nova.mdx.ac.uk Internet URL: http://www.mdx.ac.uk/~jt061/ Home: 01623 635037 Mobile: 0956 652763 --------------B3019ECC4347971EC9AAA31F Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Greetings all,
  I've just had some info from Toby Hutton that led me to a page (http://www.netyaroze-europe.com/~byz00002/unix/) from the Japanese site that contains (if you can decypher it) some instructions for creating GCC development tools for Linux.  OK, great, I downloaded binutils 2.8.1, gcc2.8.0, gdb-4.16 plus all the patches and the hssutils from the page.  I applied the patches.  I built myself a lovely new set of GNU utilities and a shiny new set of compilers for Linux.  I configured as a cross-compiler and did the same for the psx target.  I try to compile something:
 
wyrddreams{JTait}592: psx-gcc main.c
/tmp/cca24145.s: Assembler messages:
/tmp/cca24145.s:1: Warning: Missing string
/tmp/cca24145.s:1: Error: Rest of line ignored. First ignored character is `1'.
psx-gcc: Internal compiler error: program as got fatal signal 11

  It dumped core on me.  I decided to go for the manual approach (which, I have to confess I'm not at all clued up about, but I had a guess all the same):
 

wyrddreams{JTait}601: psx-gcc -v -S main.c
Reading specs from /usr/lib/gcc-lib/psx/2.8.0/specs
gcc version 2.8.0
 /usr/lib/gcc-lib/psx/2.8.0/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -Dmips -DMIPSEL -DR3000 -D_mips -D_MIPSEL -D_R3000 -D__PSX__ -D__mips__ -D__MIPSEL__ -D__R3000__ -D___mips__ -D_MIPSEL -D_R3000 -D__PSX__ -D__mips -D__MIPSEL -D__R3000 -D___mips -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int main.c /tmp/cca24197.i
GNU CPP version 2.8.0 [AL 1.1, MM 40] SCE PlayStation
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/psx/2.8.0/include
 /usr/psx/include
End of search list.
 /usr/lib/gcc-lib/psx/2.8.0/cc1 /tmp/cca24197.i -quiet -dumpbase main.c -version -o main.s
GNU C version 2.8.0 (psx) compiled by GNU C version 2.8.0.
wyrddreams{JTait}602: psx-as -o main.o main.s
wyrddreams{JTait}603: psx-ld -o main main.o
psx-ld: warning: cannot find entry symbol _start; defaulting to 80100000
main.o: In function `main':
main.c(.text+0xc): undefined reference to `__main'
main.c(.text+0xc): relocation truncated to fit: JMPADDR __main
main.c(.text+0x18): undefined reference to `printf'
main.c(.text+0x18): relocation truncated to fit: JMPADDR printf
wyrddreams{JTait}604: psx-ld -o main /usr/local/psx/lib/libps.a main.o
psx-ld: warning: cannot find entry symbol _start; defaulting to 80100000
main.o: In function `main':
main.c(.text+0xc): undefined reference to `__main'
main.c(.text+0xc): relocation truncated to fit: JMPADDR __main
main.c(.text+0x18): undefined reference to `printf'
main.c(.text+0x18): relocation truncated to fit: JMPADDR printf
wyrddreams{JTait}605: ls
Makefile*  main.c*    main.o     main.s     pad.c*     pad.h*

  As far as I can ascertain I've followed the instructions (I mean me not speaking shift-jis it's hard to tell), I even tried it the GCC-specified way, but I just can't get the programs to compile.  I'll admit I'm clueless when it comes to GCC anyway, but I prefer to work under Linux rather than having DOS installed purely for DJGCC and a couple of funky utils so if I get problems like this I can post it to a newsgroup (no PPP under DOS, you see.).  I'd appreciate any help anyone can throw my way.

--
Take care,

JT
                                    \\|//
                                    (O-O)
--------------------------------oOO--(_)--OOo---------------------------------
  "I can take you out with just a flick of my wrist" - Garbage (Supervixen)
e-mail: jt061@nova.mdx.ac.uk      Internet URL:  http://www.mdx.ac.uk/~jt061/
         Home: 01623 635037                     Mobile: 0956 652763
  --------------B3019ECC4347971EC9AAA31F--