[rust-dev] adding a new cross-compile target
valerii.hiora at gmail.com
Sun Jul 20 12:59:47 PDT 2014
> make: *** No rule to make target
> `powerpc64-bgq-linux/rt/arch/powerpc64/morestack.o', needed by
> `powerpc64-bgq-linux/rt/libsmorestack.a'. Stop.
> I don't know how to go about debugging this. Any ideas?
There is no way to "debug" this - you have to implement a couple of
functions which are required by Rust runtime and are
architecture-dependent. They live in src/rt/arch/$ARCH_NAME$
Functions (files) are:
morestack (morestack.S) - it is a vestige from segmented stack time.
Back then it allocated a new stack segment once were wasn't enough space
in the current one. Nowadays it just calls rust_stack_exhausted function.
record_sp_limit (record_sp.S) - should store stack limit for current
task (usually it uses platform specific thread local storage).
get_sp_limit (record_sp.S) - should return stack limit for current
task (reads from the same platform-specific thread local storage)
rust_swap_registers (_context.S) - I'm not sure about this one, but I
assume it allows correct register restoration in case of green task
rust_bootstrap_green_task (_context.S) - again, not sure, but I assume
it initializes green task.
Note, that all stack-related functions (morestack, record_sp_limit,
get_sp_limit) should be actually compatible with LLVM segmented stack
prologue (in your case consult
$LLVM/lib/target/PowerPC/PPCFrameLowering.cpp, emitPrologue and
emitEpilogue methods, may be a couple of others).
For a reference implementations (and much more additional comments)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 473 bytes
Desc: OpenPGP digital signature
More information about the Rust-dev