Hi
I was hoping for some help with GNU compiler and some strange issues I've been having.
If I compile FBA using x86 GNU G++ (v4.4.1) on my Windows PC using MinGW everything works fine and all games run.
If I compile natively on the Pandora (G++ V4.3.3 for ARM) almost everything works apart from most IREM games. Weird as the code is the same as the PC build.
If I cross compile for the Caanoo using G++ V4.2.4 as per the GPH SDK, several more games don't work properly, largely with palette issues, again using identical code to that's working perfectly when build for PC. At first glance I wonder if it is related to the palette code using double data types.
As an experiment I used a fresh install of Ubuntu and installed the latest ARM cross compilers (gcc-4.6-arm-linux-gnueabi-base, g++-4.6-arm-linux-gnueabi and cpp-4.6-arm-linux-gnueabi) Using this the code build absolutely fine but Segfaults on the Caanoo before executing any user code (ie if I put a printf as the first line in main it never gets executed). I used the flags -mcpu=arm926ej-s and -march=armv5te to try and ensure compatible code was produced but this didn't help.
Does anyone know if V4.2.4 does sometimes produce buggy code and how to avoid it, or better still how to produce compatible code using a newer version such as 4.6?
Also, is there a compiler option to force all double datatypes to be treated as floats? I couldn't find anything in the docs.
Thanks
Dave
Caanoo Toolchain Issues
Started by
Dave18
, Apr 24 2012 07:35 PM
2 replies to this topic
#1
Posted 24 April 2012 - 07:35 PM
#2
Posted 24 April 2012 - 10:36 PM
For what I understood, double are somehow emulated as the CPU cannot handle 64b entities, so there might be a bug thereI wonder if it is related to the palette code using double data types.
#define double floatAlso, is there a compiler option to force all double datatypes to be treated as floats? I couldn't find anything in the docs.
also -fsigned-char backed my ass more than once (this is the defaut on x86 while not on arm)
#3
Posted 25 April 2012 - 09:32 AM
Thanks, some improvement. -fsigned-char fixes the IREM driver on both Pandora and Caanoo. Caanoo still has palette issues though on galaxian drivers.
I take it I would have to add #define double float to every source files (of which there a hundreds)? I tried adding it as a compiler option but stdlib.h started throwing error messages.
Edit - I manually changed the doubles to floats in the galaxian driver and it didn't fix the palette issues so looks like that was a red herring.
Dave
I take it I would have to add #define double float to every source files (of which there a hundreds)? I tried adding it as a compiler option but stdlib.h started throwing error messages.
Edit - I manually changed the doubles to floats in the galaxian driver and it didn't fix the palette issues so looks like that was a red herring.
Dave
Edited by Dave18, 25 April 2012 - 11:36 AM.











