[Stackless] Compiling Stackless on Mac OS X
Jeff Senn
senn at maya.com
Wed Jul 5 14:50:20 CEST 2006
Yes Richard's suggestion should work. There is one other small change that I
have in my version (on OS-X that works wonderfully every day!) which gets rid
of the warning:
Index: Stackless/platf/switch_ppc_macosx.h
===================================================================
--- Stackless/platf/switch_ppc_macosx.h (revision 47239)
+++ Stackless/platf/switch_ppc_macosx.h (working copy)
@@ -32,15 +32,22 @@
#define STACK_MAGIC 3
+#if 0
#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"
+#else
+#define REGS_TO_SAVE "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
+ "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", \
+ "cr2", "cr3", "cr4"
+#endif
static int
slp_switch(void)
{
static int x = 0;
- register int *stackref, stsizediff;
+ register intptr_t *stackref;
+ register int stsizediff;
__asm__ volatile (
"; asm block 1\n"
: /* no outputs */
Richard Tew wrote:
> 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
>
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list