Skip to content

树外编译报错 #331

Description

@unicornx

采用树外编译,报错:

In file included from /home/unicornx/ws/dev-linux/rvck/arch/riscv/kernel/signal.c:18:
/home/unicornx/ws/dev-linux/rvck/arch/riscv/kernel/signal.c: In function 'setup_rt_frame':
/home/unicornx/ws/dev-linux/rvck/arch/riscv/include/asm/vdso.h:28:51: error: '__vdso_rt_sigreturn_cfi_offset' undeclared (first use in this function); did you mean 'compat__vdso_rt_sigreturn_offset'?
   28 |           (void __user *)((unsigned long)(base) + __vdso_##name##_cfi_offset) : \
      |                                                   ^~~~~~~
/home/unicornx/ws/dev-linux/rvck/arch/riscv/kernel/signal.c:438:35: note: in expansion of macro 'VDSO_SYMBOL'
  438 |         regs->ra = (unsigned long)VDSO_SYMBOL(
      |                                   ^~~~~~~~~~~
/home/unicornx/ws/dev-linux/rvck/arch/riscv/include/asm/vdso.h:28:51: note: each undeclared identifier is reported only once for each function it appears in
   28 |           (void __user *)((unsigned long)(base) + __vdso_##name##_cfi_offset) : \
      |                                                   ^~~~~~~
/home/unicornx/ws/dev-linux/rvck/arch/riscv/kernel/signal.c:438:35: note: in expansion of macro 'VDSO_SYMBOL'
  438 |         regs->ra = (unsigned long)VDSO_SYMBOL(
      |                                   ^~~~~~~~~~~

采用树内编译正常。

简单定位后发现和 CONFIG_RISCV_USER_CFI 有关,如果关闭这个配置选项再构建就正常。

切换到最新上游 master (7.2-rc1)上尝试(默认 CONFIG_RISCV_USER_CFI=y) 下树外编译正常。

这个 CONFIG_RISCV_USER_CFI 的引入是来自 #285,麻烦请 @zhuzhenxxx-collab 看一下是不是 backport 的不全?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions