= 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

#!/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

IA64wiki: BuildingDebianWithICC (last edited 2006-02-03 10:29:40 by IanWienand)

Gelato@UNSW is sponsored by
the University of New South Wales National ICT Australia The Gelato Federation Hewlett-Packard Company Australian Research Council
Please contact us with any questions or comments.