[Stackless] Stackless in ARM
luca.dionisi at gmail.com
Wed Feb 23 09:57:30 CET 2011
On Wed, Feb 23, 2011 at 1:38 AM, Richard Tew <richard.m.tew at gmail.com> wrote:
> On Wed, Feb 23, 2011 at 12:54 AM, Luca Dionisi <luca.dionisi at gmail.com>
>> On Tue, Feb 22, 2011 at 3:51 PM, Luca Dionisi <luca.dionisi at gmail.com>
>> > The only way I found to force the relevant code to be included was this
>> > command:
>> > EXTRA_CFLAGS='-DSTACKLESS -D__arm32__ -DPy_STACKLESS_H' make
>> > But then I get an error during the build of
>> > ./Stackless/core/slp_transfer.c
>> Never mind. The comment in that file told me what to do.
> Hi Luca,
> Specifying "STACKLESS" should be completely pointless. This is defined in
> "stackless.h" and undefined by the same file if you do not have the required
> symbols. If by defining "Py_STACKLESS_H" you are preventing "stackless.h"
> from being included, then you are doing it wrong.
Yes, it was my intent to prevent stackless.h from undefining STACKLESS.
I think the right way is to patch the stackless.h file, isn't it?
> The real warning sign here is that you have to define "__arm32__". This
> indicates to me that your cross-compilation environment is non-standard or
I am not cross-compiling. I am doing it in the box.
> So here are your alternate options, as I see them:
> - Just go with what you have because it works.
It is working, but not completely.
It is doing a segfault somewhere, just not very easy to reproduce.
> - Fix your cross compilation tool if it is not set up correctly, or working
> correctly, so that it provides the correct symbols (i.e. "__arm32__").
> - Find out what symbols your cross compilation tool is providing (there's a
> gcc option for this) and identify if perhaps your target environment is one
> with slightly different symbols than Stackless handles. Identify what the
> correct ones are and how they map to the existing switching support you are
> using, and submit a patch for Stackless so they work too.
I found this link
that seems to say that the right define to test is __arm__ and that
the right registers to save are different.
But then, I am not an expert with ARM, Thumb, and the like.
I did not test it yet.
More information about the Stackless