mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
arm: build fixes
Get p9p to build cleanly for ARM - based on suggestions from rsc and eekee, plus a final tweak from me. Tested (a bit) on sheevaplug (ubuntu jaunty), Nokia N800 (maemo 4) and Nokia N900 (maemo 5). R=rsc CC=plan9port.codebot http://codereview.appspot.com/4524056
This commit is contained in:
parent
c1f950fc32
commit
9cf92718e9
5 changed files with 25 additions and 20 deletions
4
src/libmp/arm/mkfile
Normal file
4
src/libmp/arm/mkfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
all:
|
||||||
|
|
||||||
|
%:V:
|
||||||
|
# nothing to see here
|
4
src/libsec/arm/mkfile
Normal file
4
src/libsec/arm/mkfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
all:
|
||||||
|
|
||||||
|
%:V:
|
||||||
|
# nothing to see here
|
|
@ -9,10 +9,10 @@ makecontext(ucontext_t *uc, void (*fn)(void), int argc, ...)
|
||||||
sp = (int*)uc->uc_stack.ss_sp+uc->uc_stack.ss_size/4;
|
sp = (int*)uc->uc_stack.ss_sp+uc->uc_stack.ss_size/4;
|
||||||
va_start(arg, argc);
|
va_start(arg, argc);
|
||||||
for(i=0; i<4 && i<argc; i++)
|
for(i=0; i<4 && i<argc; i++)
|
||||||
uc->uc_mcontext.gregs[i] = va_arg(arg, uint);
|
(&uc->uc_mcontext.arm_r0)[i] = va_arg(arg, uint);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
uc->uc_mcontext.gregs[13] = (uint)sp;
|
uc->uc_mcontext.arm_sp = (uint)sp;
|
||||||
uc->uc_mcontext.gregs[14] = (uint)fn;
|
uc->uc_mcontext.arm_lr = (uint)fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -4,9 +4,6 @@ test -f $PLAN9/config && . $PLAN9/config
|
||||||
|
|
||||||
tag="$OBJTYPE-$SYSNAME-${SYSVERSION:-`uname -r`}-${CC9:-cc}"
|
tag="$OBJTYPE-$SYSNAME-${SYSVERSION:-`uname -r`}-${CC9:-cc}"
|
||||||
case "$tag" in
|
case "$tag" in
|
||||||
arm-Linux-*)
|
|
||||||
echo ${SYSNAME}-${OBJTYPE}-asm.o $SYSNAME.o
|
|
||||||
;;
|
|
||||||
*-Linux-2.6.*)
|
*-Linux-2.6.*)
|
||||||
echo pthread.o
|
echo pthread.o
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -73,10 +73,10 @@ but surely the latter would be defined(__sparc__).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
int mygetmcontext(mcontext_t*);
|
int mygetmcontext(ulong*);
|
||||||
void mysetmcontext(const mcontext_t*);
|
void mysetmcontext(const ulong*);
|
||||||
#define setcontext(u) mysetmcontext(&(u)->uc_mcontext)
|
#define setcontext(u) mysetmcontext(&(u)->uc_mcontext.arm_r0)
|
||||||
#define getcontext(u) mygetmcontext(&(u)->uc_mcontext)
|
#define getcontext(u) mygetmcontext(&(u)->uc_mcontext.arm_r0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue