On 12/1/23 22:47, Sam James wrote:

Jeff Law <jeffreya...@gmail.com> writes:

On 12/1/23 18:13, Sam James wrote:
钟居哲 <juzhe.zh...@rivai.ai> writes:

Hi, This patch cause error on building newlib/glibc/musl on RISC-V port:

/work/home/jzzhong/work/toolchain/riscv/build/dev-rv64gcv_zvfh_zfh-lp64d-medany-newlib-spike-debug/../../newlib/libgloss/riscv/sys_access.c:8:40:
error: passing argument 3 of 'syscall_errno' makes integer from pointer without 
a cast [-Wint-conversion]
      8 |   return syscall_errno (SYS_access, 2, file, mode, 0, 0, 0, 0);
        |                                        ^~~~
        |                                        |
        |                                        const char *
This looks like an issue in newlib. We expect broken code to be
broken
by the recent changes. Can you investigate it on the newlib side?
A ton of stuff in newlib/libgloss is broken due to the compiler
changes.   But that's not a big surprise -- much of the
newlib/libgloss code is c89 and clearly wrong for c99 and newer.

Yeah, it's probably a reasonable candidate for -fpermissive to start
with until it's cleaned up.
Perhaps. Particularly if it can be confined to libgloss as that's where the bulk of the problems are. It'd be even better if we could constrain it per-port, but I suspect putting all that in place would be more work than just fixing this stuff.




(Also, sorry, I didn't mean my comment to appear glib. I just meant to
say "yes, this looks expected".)
No worries, I didn't take it that way at all. I fully agree this looks expected and while annoying it's not a big deal IMHO. We fix and move on.

jeff

Reply via email to