[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure o
From: |
Richard Henderson |
Subject: |
Re: [Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure on riscv32 hosts |
Date: |
Mon, 10 Dec 2018 11:04:21 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/7/18 6:46 PM, Alistair Francis wrote:
> When cross compilling for riscv32 hosts using GCC 8.2 this error is seen:
> error: '__NR__llseek' undeclared (first use in this function); did you
> mean '_llseek'?
>
> To avoid the error let's ensure that __NR__llseek is defined.
>
> Signed-off-by: Alistair Francis <address@hidden>
> ---
> linux-user/riscv/target_syscall.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/linux-user/riscv/target_syscall.h
> b/linux-user/riscv/target_syscall.h
> index ee81d8bc88..af73f71839 100644
> --- a/linux-user/riscv/target_syscall.h
> +++ b/linux-user/riscv/target_syscall.h
> @@ -47,6 +47,11 @@ struct target_pt_regs {
> #endif
> #define UNAME_MINIMUM_RELEASE "4.15.0"
>
> +/* This is sometimes needed to compile riscv32 Linux user mode */
> +#if !defined(__NR__llseek) && !defined(__NR_lseek)
> +#define __NR__llseek __NR3264_lseek
> +#endif
I'm not quite sure how this could be. Upstream I see
#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
...
#define __NR_lseek __NR3264_lseek
...
#else
...
#define __NR_llseek __NR3264_lseek
so this define should already exist.
Do you have the wrong headers installed for the cross-build?
r~
- [Qemu-riscv] [RFC v3 00/24] Add RISC-V TCG backend support, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 01/24] elf.h: Add the RISCV ELF magic numbers, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 02/24] linux-user: Add host dependency for RISC-V 32-bit, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 03/24] linux-user: Add host dependency for RISC-V 64-bit, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure on riscv32 hosts, Alistair Francis, 2018/12/07
- Re: [Qemu-riscv] [RFC v3 04/24] linux-user: riscv: Fix compile failure on riscv32 hosts,
Richard Henderson <=
- [Qemu-riscv] [RFC v3 05/24] exec: Add RISC-V GCC poison macro, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 06/24] riscv: Add the tcg-target header file, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 07/24] riscv: Add the tcg target registers, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 08/24] riscv: tcg-target: Add support for the constraints, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 09/24] riscv: tcg-target: Add the immediate encoders, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 10/24] riscv: tcg-target: Add the instruction emitters, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 11/24] riscv: tcg-target: Add the relocation functions, Alistair Francis, 2018/12/07
- [Qemu-riscv] [RFC v3 12/24] riscv: tcg-target: Add the mov and movi instruction, Alistair Francis, 2018/12/07