4.0 Toolchain compiling?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
0xdeadface
Posts: 62
Joined: Tue May 31, 2005 5:11 am

4.0 Toolchain compiling?

Post by 0xdeadface »

Hi,

Okay, I got the 4.0 toolchain running but it has no ee-gcc. Whne I compile my stuff with (I figured) psp-gcc it chokes on the asm files, like 'illegal operands la $v0,_gp'

I know a few peeps use this toolchain, could one of them tell me what I am doing wrong?

Thx,
0xdf
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

ee-as has code which provides symbolic names for MIPS registers. psp-as doesn't have this code. When accessing registers, you will have to use the register number, so instead of $v0 you'll need to use $2.

If you search for a regdef.h header file (newlib has one) and include it, you can get the symbolic names through the C preprocessor.
0xdeadface
Posts: 62
Joined: Tue May 31, 2005 5:11 am

Post by 0xdeadface »

Thank you very much!

0xdf
f_bohmann
Posts: 16
Joined: Mon May 02, 2005 7:15 pm
Location: hamburg, germany

Post by f_bohmann »

mh. i am trying to compile nem's helloworld with the psp-toolchain, and i get the same error. compiling the c files with psp-gcc works fine, but when i get to the startup.s, i get the errors.

following your post i am under the impression that

.include "/usr/local/pspdev/psp/psp/include/machine/regdef.h"

in startup.s should do the trick, but i still can not get "psp-as startup.s" or "psp-gcc -c -xassembler startup.s" to compile the file.

i am new to gcc and friends, so i am a bit lost here.
weak
Posts: 114
Joined: Thu Jan 13, 2005 8:31 pm
Location: Vienna, Austria

Post by weak »

i think the name should be startup.S, with capitalized S to invoke the preprocessor.
User avatar
alonetrio
Posts: 34
Joined: Sun May 15, 2005 12:10 am
Contact:

Post by alonetrio »

hi, i am new too with gcc and alike,

i am trying to use the round() funtion

so here is my link directive (using gcc to compil):

psp-gcc startup.o mandelbrot.o -nostartfiles -o out -Wl,-Ttext -Wl,8900000 -lm -lc -lgcc

but i get error :

mandelbrot.o: In function `xmain':
mandelbrot.c:(.text+0x1f00): undefined reference to `__extendsfdf2'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a(s_round.o): In function `round':
../../../../../newlib/libm/common/s_round.c:58: undefined reference to `__adddf3'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/libgcc.a(_fixunsdfsi.o): In function `__fixunsdfsi':
../../gcc/libgcc2.c:1492: undefined reference to `__gedf2'
../../gcc/libgcc2.c:1493: undefined reference to `__subdf3'
../../gcc/libgcc2.c:1493: undefined reference to `__fixdfsi'
../../gcc/libgcc2.c:1494: undefined reference to `__fixdfsi'
collect2: ld returned 1 exit status

any idea ?

AloneTrio
cin
Posts: 7
Joined: Fri Aug 19, 2005 10:32 am

Have you solve this problem?

Post by cin »

I also meet problem like yours.

Have you solve this problem?
and how?


alonetrio wrote:hi, i am new too with gcc and alike,

i am trying to use the round() funtion

so here is my link directive (using gcc to compil):

psp-gcc startup.o mandelbrot.o -nostartfiles -o out -Wl,-Ttext -Wl,8900000 -lm -lc -lgcc

but i get error :

mandelbrot.o: In function `xmain':
mandelbrot.c:(.text+0x1f00): undefined reference to `__extendsfdf2'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a(s_round.o): In function `round':
../../../../../newlib/libm/common/s_round.c:58: undefined reference to `__adddf3'
/usr/local/pspdev/psp/lib/gcc/psp/4.0.0/libgcc.a(_fixunsdfsi.o): In function `__fixunsdfsi':
../../gcc/libgcc2.c:1492: undefined reference to `__gedf2'
../../gcc/libgcc2.c:1493: undefined reference to `__subdf3'
../../gcc/libgcc2.c:1493: undefined reference to `__fixdfsi'
../../gcc/libgcc2.c:1494: undefined reference to `__fixdfsi'
collect2: ld returned 1 exit status

any idea ?

AloneTrio
Post Reply