http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59018
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Kostya Serebryany from comment #1) > At least one of these patches does not build with clang: > > /home/kcc/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc: > 807:21: error: ignored asm label 'r8' on automatic variable [-Werror] > void *r8 __asm__ ("r8") = newtls; > ^ > /home/kcc/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc: > 808:21: error: ignored asm label 'r10' on automatic variable [-Werror] > int *r10 __asm__ ("r10") = child_tidptr; > ^ > > is this some kind of gcc-specific syntax? > (forgive my ignorance here) Can you try register void *r8 __asm__ ("r8") = newtls; register int *r10 __asm__ ("r10") = child_tidptr; as suggested by Jakub? > Two general questions: > > 1. Before doing the merge I test the patch like this: > rm -rf */{*/,}libsanitizer && make -j 50 && make -C gcc check-g{cc,++} > RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} asan.exp' > > What should I add to this line to also test x32? I am using: RUNTESTFLAGS='--target_board=unix\{-mx32,-m32,-m64\} asan.exp' But you need to enable x32 first on your OS, which requires 1. x32 enabled kernel, Linux kernel >= 3.4.0. 2. x32 glibc. > > 2. Is there any chance to test x32 off the clang tree, so that we keep the > upstream tree x32-clean all the time? There was x32 port of llvm/clang last year. But only parts of the x32 patches have been merged with llvm.