I have shifed ../rtl/tsan_platform_linux.h down in the list because :
The file asm/stat is included in sanitizer_linux.cc file only for mips.
In file included from ./gotsan.cc:9678: /usr/include/mips64el-linux-gnuabi64/asm/stat.h:113:16: error: expected ';' at end of declaration list unsigned int st_atime; ^ /usr/include/mips64el-linux-gnuabi64/bits/stat.h:166:26: note: expanded from macro 'st_atime' # define st_atime st_atim.tv_sec /* Backward compatibility. */
I have also tested this patch on x86_64.
This is not right. Go tsan does not run on mips64.
C++ tsan needs to be tested on linux/amd64, freebsd/amd64 and linux/mips64.
Go tsan needs to be tested on linux/amd64, darwin/amd64, windows/amd64 and freebsd/amd64.
I ran the check-tsan test suite on my mips64 board and GotsanRuntimeCheck is working fine.
How can I add support for tsan go runtime for mips64 and test it ?
You first need to add mips64 support to Go compiler, assemebler, linker and runtime :)
The test is very simplified and does not involve any Go code, but does not test most of the system as well. We probably can leave the test if it works. I just hope that it won't break.
But please add a comment in lib/tsan/rtl/tsan_platform.h saying that Go/mips64 is not a working configuration and it is there merely to satisfy rtl/go/buildgo.sh.