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());

你可能感兴趣的:(exception,command,File,report,compiler,compilation)