[Stackless] cross compile stackless from x86 to mipsel
wmark at hurrikane.de
Tue Feb 8 14:06:40 CET 2011
2011/2/7 Luca Dionisi <luca.dionisi at gmail.com>:
> I am trying, without success at the moment, to cross compile stackless
> (version 2.6.2) from a x86 host (linux) to a mips architecture.
> I am using a OpenWRT buildroot as cross-compiler tools.
> What I get is a MIPS executable (and libs) that runs on my router (a
> Omnima ADM5120) but when I execute stackless.run() with some tasklet
> then it immediately does a segmentation fault.
> What could possibly have gone wrong?
As somewhere already mentioned, it is most probably wrong or missing
ARM code which caused the segfault. I've ported some packages to ARM,
maybe one of these hints will help you:
0. Before making assumptions about what macros should have been
enabled on your architecture, better have them displayed:
# echo | gcc -E -dD -
1. Try compiling without -Os or -O2 and the such.
2. Find where any arch-dependent code is used.
4. Append one or modify any present #define. If you don't know asm,
try using a GCC built-ins , or better yet, use libatomic_ops .
(I wish every project would use the latter as fallback for any not
already covered arch.)
5. If you still get segfaults, try saving less (or more) registers -
refer to your arch's handbook. Here's an example of mine . The code
should remind you of Stackless ;-)
More information about the Stackless