MIT6.828_OS icon indicating copy to clipboard operation
MIT6.828_OS copied to clipboard

一個用新toolchain的error

Open CheckHarry opened this issue 2 years ago • 0 comments

因為這repo應該是最容易搜到的6.828repo. 所以在這裡填一個坑.

使用新的 toolchain 有可能在lab5之後遇上multiple definition 的error. 這是由於 gcc 把 default 的 -fcommon 改成了 -fno-common.

解決方法:在 makefile 中的 CFLAGS 加上 -fcommon

詳見:https://www.linuxquestions.org/questions/programming-9/multiple-definition-errors-when-linking-on-arch-using-gcc-10-1-0-a-4175675444/

CheckHarry avatar Feb 13 '22 05:02 CheckHarry