GP32 Link Error.. Hmm. Anyone Seen This?


skeezix

Internal Development
Joined
Mar 11, 2003
Messages
8,070
Website
www.codejedi.com
My setup using gcc 2.9.x works perfectly well of course; for fun, I nabbed Mirko's gcc 3.4.x build .. could use some of the features for sure. Changing from the gcc 2.9.x to gcc 3.4.x was painless (hack Makefile), and everything compiles perfectly fine (so it seams); however, the link stage fails:

ld: ERROR: c:\winapp\devkit\arm-elf\lib\libgpmem.a(gpmem_asm.o) uses
hardware FP, whereas castaway.elf uses software FP

Naturally, those libs work with gcc 2.9, and since they're made by GP, they obviously don't use hardware floating point; I thought perhaps this issue was caused by using old libs with newer compiler, but folks say they're using gcc 3 with the older GP SDK, so thats not it.

Any idears?

jeff
 
My setup using gcc 2.9.x works perfectly well of course; for fun, I nabbed Mirko's gcc 3.4.x build .. could use some of the features for sure. Changing from the gcc 2.9.x to gcc 3.4.x was painless (hack Makefile), and everything compiles perfectly fine (so it seams); however, the link stage fails:

ld: ERROR: c:\winapp\devkit\arm-elf\lib\libgpmem.a(gpmem_asm.o) uses
hardware FP, whereas castaway.elf uses software FP

Naturally, those libs work with gcc 2.9, and since they're made by GP, they obviously don't use hardware floating point; I thought perhaps this issue was caused by using old libs with newer compiler, but folks say they're using gcc 3 with the older GP SDK, so thats not it.

Any idears?

jeff

There are two versions of the gpsdk floating around. One marked as needing hardware fp, the other (correctly I'm advised) marked as not. You also get similar stuff with thumb interworking if that is on in libs and off elsewhere. I recommend you have that switched off as well.

Anyway looks like you want the other version of the gpsdk. Unfortunately I can't provide a link:-( I'll upload it to my site tonight, if no-one posts where to get it today.

Thanks,

Mark

---
Update -> I think I wrote that reply too early in the morning. There are two sdk versions around. You appear to have the correct one (not marked explicitely as software fp). So it should just be a case of removing -msoft-float in the castaway build flags.

Mark
 
Last edited by a moderator:
I think my brain is AWOL after bein ill; I can't think of the gcc switch for forcing software FP; I know some arch's in gcc can take -msoft-float, but not sure if thats global to gcc or just for some builds (like the old 68000 builds.) There used to also be a -f option for it. (For whatever reason, my gcc-2.9.x build defaults to soft FP I guess, but the gcc-3 in Mirko's doesn't, or uses different switches than my old Makefile.)

I suppose I should nab mirko's SDK and see what his Makefiles look like ;)

jeff
 
Mirkos main makefile:
Code:
all:	
	make -C common
	make -C sound
	make -C font
	make -C zlib
	make -C grafik
	make -C sbox
	make -C chatboard

And some examples of the individual ones:

common:
Code:
CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar

INCLUDES = -I../include

CFLAGS = $(INCLUDES) -O2 -s -mtune=arm9tdmi
 
OBJS =  gp_arm.o  gp_irq.o  gp_cpuspeed.o  gp_grafik.o  gp_buttons.o  gp_memory.o  gp_timer.o

all:	$(OBJS)
	$(AR) rcs gp_common.a $(OBJS)
	cp gp_common.a ../../lib/
	rm *.o *.a

clean:
	rm -f *.o *~

grafik:
Code:
CC = arm-elf-gcc
LD = arm-elf-gcc
AS = arm-elf-as
AR = arm-elf-ar

INCLUDES = -I../include

CFLAGS = $(INCLUDES) -O3 -s -mtune=arm9tdmi
 
OBJS =  gp_sprite.o gp_line.o gp_tiled.o

all:	$(OBJS)
	$(AR) rcs gp_sprite.a $(OBJS)
	cp gp_sprite.a ../../lib/
	rm *.o *.a

clean:
	rm -f *.o *~

So no mention of msoffloat, or anything else float related that I can see
 
Skeezix,

As I said before, I really reccommend using devkitARM, available at http://www.devkit.tk.

You need to get devkitARM r8 from here: http://sourceforge.net/project/showfiles.p...ckage_id=124207

You also need to install MSYS for make, and some basic unix tools.
Get that here: http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download

After that, you'll need the gamepark libs, available here:
http://homepage.ntlworld.com/wintermute2002/gamepark_sdk.zip

Then, if you need 16bit gfx libs, get them from Spiv's site, here:
http://www.cs.helsinki.fi/u/jikorhon/conde...k_gfx16libs.zip

I can't think of anything else than that, as those are the files I always use. I usually stick PClink in the devkitARM/bin folder, and also B2FXEC.

Hope this helps...
 
yeah, I can look into all that.. I'm mostly just trying not to alter my setup too much; ie: Drop in a new compiler/linker would be ideal; rebuilding the works.. would take awhile :) (ie: I've got a pile of hacks and junk on my setup and a half dozen libraries in use..)

A fresh setup might be the way to go, but it'd take a few days of futing around to get back in order :)

We'll see :) So close... :)

jeff
 
Back
Top