[Stackless] Compiling Stackless on Mac OS X

Richard Tew richard.m.tew at gmail.com
Wed Jul 5 09:02:08 CEST 2006


On 7/4/06, Max Noel <maxfnoel at gmail.com> wrote:
> ./Stackless/platf/switch_ppc_macosx.h: In function 'slp_transfer':
> ./Stackless/platf/switch_ppc_macosx.h:44: error: PIC register 'r31'
> clobbered in 'asm'
> make: *** [Stackless/core/slp_transfer.o] Error 1
>
> My box is a dual G5 Power Mac running OS X 10.4.7, and I'm compiling
> with the Apple-supplied GCC 4.0.1. "Regular" CPython 2.4.3 compiles
> and works fine.
>
> Has anyone had any success in compiling/running Stackless on OS X? If
> so, what did I do wrong? If not, how can I help in getting it to work?

You did nothing wrong that I am aware of.  I do not use Mac OS, but here is
what I would try to start off with.

In the file switch_ppc_macosx.h, change the following define:

#define REGS_TO_SAVE "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
       "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r31", \
       "cr2", "cr3", "cr4"

To:

#define REGS_TO_SAVE "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
       "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29",  \
       "cr2", "cr3", "cr4"

That is, just remove the "r31" entry.  Then try again and let me know what
happens :)

Richard.

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list