Problem in crossbuilding a mac application (powerpc from snow leopard)

Hello,
while using Snow Leopard (10.6.2) i get this strange linking error when
compiling for powerpc mac target

ld: bl out of range (52453704 max is +/-16M) from __start at 0x000115D4 in
__text of /usr/lib/crt1.o to ___darwin_gcc3_preregister_frame_info at
0x03217800 in __common of /usr/lib/crt1.o in __start from /usr/lib/crt1.o

i’m pretty sure this is something related to SDL because it’s the only
library that is used in my application and i suspect SDLMain.m because it’s
the one that usually deals with ctr1 and __start

do you have any idea about this? powerpc compiled fine under 10.5
Vittorio–

Samuel Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html

  • “I’m willing to admit that I may not always be right, but I am never
    wrong.”

So in my own simple tests for for PowerPC on Snow Leopard, I didn’t
encounter this. Can you reproduce this problem in new project created
from the template?

Two things stand out in your description to me:

___darwin_gcc3_preregister_frame_info

This makes me think gcc3 is being used instead of gcc 4. This looks
suspicious to me as we now expect/require gcc4.

library that is used in my application and i suspect SDLMain.m because it’s
the one that usually deals with ctr1 and __start

Did you upgrade/replace your SDLMain.m with the one in the latest SDL
release? There were some changes we had to make to it to make it
64-bit/Obj-C 2.0 clean. (Yeah, I forgot to explicitly document people
should do this.)

-Eric

So in my own simple tests for for PowerPC on Snow Leopard, I didn’t
encounter this. Can you reproduce this problem in new project created
from the template?

Two things stand out in your description to me:

___darwin_gcc3_preregister_frame_info

This makes me think gcc3 is being used instead of gcc 4. This looks
suspicious to me as we now expect/require gcc4.

That also puzzled me, however i am not using the standard templates,
actually i’m not even using gcc at all.
I’m using freepascal (2.4.0rc1) and CMake (2.6.4) as toolchain, but in the
past version of osx they didn’t trigger this problem.

library that is used in my application and i suspect SDLMain.m because
it’s
the one that usually deals with ctr1 and __start

Did you upgrade/replace your SDLMain.m with the one in the latest SDL
release? There were some changes we had to make to it to make it
64-bit/Obj-C 2.0 clean. (Yeah, I forgot to explicitly document people
should do this.)

Well i used the ones in the 1.2.14 dmg, but then updated to the ones
included in the template.
Unfortunately it doesn’t seem to fix this problem.

VittorioOn Fri, Dec 18, 2009 at 8:41 AM, E. Wing wrote:

-Eric


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html

  • “The better I get to know men, the more I find myself loving dogs.”