mit-pdos/xv6-riscv

PR[#126] case error: '-Wno-error=infinite-recursion': no option '-Winfinite-recursion'

betnevs opened this issue · 5 comments

add -Wno-error=infinite-recursion in Makefile cause error: '-Wno-error=infinite-recursion': no option '-Winfinite-recursion', remoeve -Wno-error=infinite-recursion then everything works well.

It also happened to me. I think the problem lies in the version of GCC.
According to this post, the flag is implemented in GCC 12,
while gcc here maybe a little out of date.
For me, it is riscv-gcc-10.2.0

PS: According to [issue #125 ], the problem occurs in GCC 11. So the commit switched to GCC 11.

#126

Breaks compilation for all gcc versions prior to 12.

@faisalmuhabi Perhaps earlier version of GCC won't treat it as a compile-time error.

I had this issue, for the short term, I have fixed this by reverting my makefile to before the latest commit and it works perfectly. If somebody else needs to use this urgently (like I need to because I had a coursework based on this, and this coursework was assigned before the commit), they can do the same.

Sorry for breaking xv6 when compiling with gcc version < 12. I believe I fixed the source code (reverting the Makefile change and changing sh.c) so that it compiles correctly now with gcc 12 and earlier versions (i tried gcc 10 and 12).