Trying to get CUDA 7.5 to work with GCC 5.x
<p>So, if you try to use nvcc when the system GCC is version 5 and up, you get an "unsupported version" error. But - I've heard people report that they've just commented this out and that CUDA 7.5 "works for them" with GCC 5.x .</p>

<p>When I do the same, however (the check is in <code>$CUDA_DIR/host_config.h</code>), and compile something, I get the following errors:</p>

<pre><code>/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined
</code></pre>

<p>and a bunch of others, but those may be dependent on these. Now, these are MMX-related intrinsics for X86 architectures. I don't use them directly, so I'm guessing they're opted-in somehow. Perhaps this can be avoided?</p>

<p>Is there a way to overcome these errors and actually get GCC 5 to coexist with CUDA 7.5? And for code to build and run?</p>

<p><strong>Notes:</strong></p>

<ul>
<li>I've read a suggestion to use <code>-D__STRICT_ANSI__</code>. I have, and it doesn't seem to help.</li>
<li>I'm on Fedora 22 in case it matters.</li>
</ul>