> On Tue, Feb 18, 2014 at 06:55:51PM +0100, Jose E. Marchesi wrote: > > This patch fixes builds with --enable-sanitizer, which seems to be the > > default for sparc now. > > > > Build tested in a sparc64-*-linux-gnu system with linux 3.8.13 headers. > > > > 2014-02-18 Jose E. Marchesi <jose.march...@oracle.com> > > > > PR sanitizer/59758 > > * sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer): > > Define struct__old_kernel_stat_sz, struct_kernel_stat_sz and > > struct_kernel_stat64_sz for sparc targets (both 32 and 64 bits). > > (__sanitizer_ipc_perm): Adjust for sparc targets. > > (__sanitizer_shmid_ds): Likewise. > > (__sanitizer_sigaction): Likewise. > > (IOC_SIZE): Likewise. > > > > * sanitizer_common/sanitizer_platform_limits_linux.cc (time_t): > > defined as __kernel_time_t, which is needed for sparc. > > (struct___old_kernel_stat_sz): Don't check if __sparc__ is defined. > > Please talk to Konstantin about getting this into the upstream compiler-rt > repository, we don't need to wait for a merge from there, so once it > is accepted there, the same patch can be applied to gcc too. Right. Please read https://code.google.com/p/address-sanitizer/wiki/HowToContribute Yesterday I fetched and built the latest llvm/compiler-rt in sparc64. I could not manage (in a reasonable time) to get the stuff in compiler-rt/lib/sanitizer_common and compiler-rt/lib/asan built: these directories seems to be skipped when compiling on this platform. No, I am not familiar at all with the llvm/compiler-rt build system. Also I noticed that there are a lot of changes upstream since last gcc merge that may or may not compile on sparc: basically constants and data structures duplicating stuff from kernel headers.
Well, I really dont have time to hack the llvm build system and also keep the upstream sanitizer compiling on sparc until next merge, sorry. At this point I would suggest to either apply my patch to gcc's libsanitizer to fix the sparc build until next merge[1] or disable building libsanitizer on sparc targets. [1] I offer my help to make sure that whatever comes in the next merge builds on sparc64 in the gcc source tree.