<div dir="ltr">I understand that you are looking for a workaround in llvm, but it's not really an llvm issue. There is a patch available for this issue:<div><br></div><div><a href="http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00479.html">http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00479.html</a><br>
</div><div><br></div><div>This means that you would have to update your kernel headers.</div><div><br></div><div>Someone else has posted another hack for libsanitizer here:</div><div><br></div><div><a href="http://comments.gmane.org/gmane.comp.gcc.devel/133181">http://comments.gmane.org/gmane.comp.gcc.devel/133181</a><br>
</div><div><br></div><div><pre style="line-height:36px;text-align:justify">#define new renamed_new
#include <sys/vt.h>
#undef new</pre><pre style="line-height:36px;text-align:justify"><br></pre><pre style="line-height:36px;text-align:justify">thx</pre><pre style="line-height:36px;text-align:justify">Vikas.</pre><pre style="line-height:36px;text-align:justify">
========</pre></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 10:25 AM, Burlen Loring <span dir="ltr"><<a href="mailto:burlen.loring@gmail.com" target="_blank">burlen.loring@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to build llvm 3.4 on one of our Cray systems, note: 3.2 builds fine. The following error occurs, it looks like a system header, intended for C only judging by the fact that there's a variable named "new", is being used in one of llvm's C++ source files. Can anyone suggest a workaround? I do not have root on this system nor is it likely that I can convince anyone to update system packages.<br>

<br>
Burlen<br>
<br>
make[5]: Entering directory `/global/common/hopper2/<u></u>graphics/llvm/builds/llvm-3.4.<u></u>src/projects/compiler-rt'<br>
  ARCHIVE:   clang_linux/full-x86_64/x86_<u></u>64: /global/common/hopper2/<u></u>graphics/llvm/builds/3.4-<u></u>static-build/tools/clang/<u></u>runtime/compiler-rt/clang_<u></u>linux/full-x86_64/x86_64/<u></u>libcompiler_rt.a<br>

  FINAL-ARCHIVE: clang_linux/full-x86_64: /global/common/hopper2/<u></u>graphics/llvm/builds/3.4-<u></u>static-build/tools/clang/<u></u>runtime/compiler-rt/clang_<u></u>linux/full-x86_64/libcompiler_<u></u>rt.a<br>
  ARCHIVE:   clang_linux/profile-x86_64/<u></u>x86_64: /global/common/hopper2/<u></u>graphics/llvm/builds/3.4-<u></u>static-build/tools/clang/<u></u>runtime/compiler-rt/clang_<u></u>linux/profile-x86_64/x86_64/<u></u>libcompiler_rt.a<br>

  FINAL-ARCHIVE: clang_linux/profile-x86_64: /global/common/hopper2/<u></u>graphics/llvm/builds/3.4-<u></u>static-build/tools/clang/<u></u>runtime/compiler-rt/clang_<u></u>linux/profile-x86_64/<u></u>libcompiler_rt.a<br>

  COMPILE:   clang_linux/san-x86_64/x86_64: /global/common/hopper2/<u></u>graphics/llvm/builds/llvm-3.4.<u></u>src/projects/compiler-rt/lib/<u></u>sanitizer_common/sanitizer_<u></u>platform_limits_posix.cc<br>
In file included from /global/common/hopper2/<u></u>graphics/llvm/builds/llvm-3.4.<u></u>src/projects/compiler-rt/lib/<u></u>sanitizer_common/sanitizer_<u></u>platform_limits_posix.cc:54:<br>
In file included from /usr/include/sys/vt.h:1:<br>
/usr/include/linux/vt.h:74:15: error: expected member name or ';' after declaration specifiers<br>
        unsigned int new;               /* New console (if changing) */<br>
        ~~~~~~~~~~~~ ^<br>
1 error generated.<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>