mit-pdos / xv6-riscv

Xv6 for RISC-V
Other
6.98k stars 2.58k forks source link

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

Closed betnevs closed 2 years ago

betnevs commented 2 years ago

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.

sora-blue commented 2 years ago

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.

dinarior commented 2 years ago

https://github.com/mit-pdos/xv6-riscv/pull/126

Breaks compilation for all gcc versions prior to 12.

sora-blue commented 2 years ago

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

TejaswaRizyal commented 2 years ago

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.

kaashoek commented 2 years ago

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).