= Building Debian packages with ICC =
So you want that Gentoo feel in your Debian system?
Replace GCC
Getting the right CC variables passed down to everything to use icc rather than gcc is almost impossible. Move /usr/bin/gcc to something like /usr/bin/gcc-redirected and use a script similar to below
(I (PeterChubb) have found that debuild -e CC=icc also works for simple packages)
#!/bin/bash
GCC_BINARY=/usr/bin/gcc-redirected
ICC_PATH=/opt/intel_cc_80/bin
if [ -z $USEICC ]; then
$GCC_BINARY "$@"
exit $?
fi
for arg in $@
do
case $arg in
-dumpmachine)
$GCC_BINARY "$@"
exit $!
esac
done
#!/bin/bash
PATH=$ICC_PATH:$PATH
icc "$@"
ICC_RET=$?
if [ $ICC_RET -ne 0 ]; then
echo "WARNING: rebuilding with real $GCC_BINARY"
$GCC_BINARY "$@"
exit $?
fi
exit $ICC_RET
Note : this script is hardly efficient ... if it can't build with ICC it drops back and tries gcc. Do a similar thing for g++ if you want
Use debian builder
for i in `/usr/share/doc/debian-builder/examples/getRequired gnome-terminal` ; do /usr/bin/debian-builder -debuild="-rootcmd=fakeroot --set-envvar=USEICC=1" --verbose $i ; done
More to come
As I see how this works I'll update this page
