How to override python's distutils gcc linker with icc?
<p>I was able to successfully build cython on Ubuntu 14.04 from source as explained in this SE question/answer <a href="https://stackoverflow.com/questions/37904377/can-cython-be-compiled-with-icc">Compiling cython From source with icc</a> and I downloaded the source code from here - <a href="https://pypi.python.org/pypi/Cython/" rel="nofollow noreferrer">Cython source code download</a>. </p>

<p>The command to compile cython is</p>

<p><strong>CC=icc LINKCC=icc python3.4 setup.py build</strong></p>

<p>I am enclosing the build log. It is <strong>STILL</strong> using gcc for linking. Here is a sample of build log.</p>

<p>It appears CC=icc LINKCC=icc does <strong>NOT</strong> seem to change the linker to icc. It is still using x86_64-linux-gnu-gcc. When I set the environmental variable LDFLAGS = -lirc the environmental variable is being passed to gcc and not to icc. 
Also when I put print statements in <a href="https://github.com/cython/cython/blob/master/Cython/Build/BuildExecutable.py" rel="nofollow noreferrer">BuildExecutable.py</a> they are not getting called.</p>

<pre><code>icc -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c /home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o
icc: command line warning #10006: ignoring unknown option '-fwrapv'
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/Cython
creating build/lib.linux-x86_64-3.4/Cython/Plex
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -lirc -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/home/aswin/libPython/Cython-0.24/Cython/Plex/Scanners.o -o build/lib.linux-x86_64-3.4/Cython/Plex/Scanners.cpython-34m.so
</code></pre>

<p><strong>How do I fix it ?</strong> </p>