uclinux-2008R1-RC8(bf561)到VDSP5的移植(51):fork.c编译失败

 
出现一个莫明奇妙的编译错误:
../../kernel/fork.c
At end of source: : internal error: Uncaught exception Assertion failed raised
          at ../../../bril/optimiser/dominators.c:910 (in pass
          cleanup_scalar_stores_nonopt during compilation of _copy_process).
          Please submit a bug report with this message, the command line used,
          type of machine and the output of the compiler when you add -ED -v
          to the command line. Please also send us the pre-processed file that
          is generated by the -ED option (the file generated is named
          <original_filename>.i)
 
1 catastrophic error detected in the compilation of "../../kernel/fork.c".
Compilation aborted.
cc3089: fatal error: Compilation failed
Tool failed with exit/exception code: 1.
Build was unsuccessful.
注释掉所有代码,一步步往上添加,问题出在copy_process函数,进一步查找终于发现问题在于这个函数中的这个语句:
     if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
              !cpu_online(task_cpu(p))))
         set_task_cpu(p, smp_processor_id());
当不加这行时没有错误。当加上这个语句时,出现上述错误。
回顾一下unlikely的定义:
#define unlikely(x)    expected_false(!!(x))
确实是做优化用的,既然此处编译不过,就去了它,改为:
     if (/*unlikely(*/!cpu_isset(task_cpu(p), p->cpus_allowed) ||
              !cpu_online(task_cpu(p))/*)*/)
         set_task_cpu(p, smp_processor_id());
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值