zoukankan      html  css  js  c++  java
  • 【记录一个问题】libtask无法在android下编译通过

    源码来自:https://github.com/msteinert/libtask

    首先是asm.S无法编译通过。
    其次,编译context.c出现这些错误:

    .//context.c:124:19: error: no member named 'gregs' in 'struct sigcontext'; did you mean 'regs'?
                    uc->uc_mcontext.gregs[i] = va_arg(arg, uint);
                                    ^~~~~
                                    regs
    /Users/ahfu/code/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/include/asm/sigcontext.h:25:8: note: 'regs' declared here
     __u64 regs[31];
           ^
    .//context.c:127:18: error: no member named 'gregs' in 'struct sigcontext'; did you mean 'regs'?
            uc->uc_mcontext.gregs[13] = (uint)sp;
                            ^~~~~
                            regs
    /Users/ahfu/code/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/include/asm/sigcontext.h:25:8: note: 'regs' declared here
     __u64 regs[31];
           ^
    .//context.c:128:18: error: no member named 'gregs' in 'struct sigcontext'; did you mean 'regs'?
            uc->uc_mcontext.gregs[14] = (uint)fn;
                            ^~~~~
                            regs
    /Users/ahfu/code/android/android-ndk-r14b/platforms/android-21/arch-arm64/usr/include/asm/sigcontext.h:25:8: note: 'regs' declared here
     __u64 regs[31];
           ^
    3 errors generated.
    

    =====================================
    2019-08-01:
    原因大致确定:
    context.c需要的寄存器结构,是arm 64下面的;
    asm.S的语法是arm 32下面的。

  • 相关阅读:
    codeforces A. Chess Placing
    codeforces E. Cyclic Components
    poj1930(小数化分数)
    hdu4497 (正数分解定理+排列组合)
    cf 466 div.2 A. Points on the line
    hdu1576(扩展欧几里得求逆元板子)
    逆元(转载)
    stiring 数..........
    逆元
    矩阵 构造 模板
  • 原文地址:https://www.cnblogs.com/ahfuzhang/p/11279733.html
Copyright © 2011-2022 走看看