Workaround for some folks gcc-4/icpc-9.0 problems

Workaround for some folks gcc-4/icpc-9.0 problems

Almost by accident, I found a workaround for some of the gcc-4/icpc problems people have been having. Let's say you have gcc-4.x

installed in /usr/local/bin, but you have a gcc-3.x compiler in, say, /usr/bin. Give the flag -gcc-name=/usr/bin/g++ to icpc,

and it won't look at the 4.0 installation in /usr/local, even if that one comes first in your PATH.

This is an easy workaround for someone like me, who has a somewhat older linux (FC3) on which gcc-3 is native, but who installed gcc-4 separately. For those with systems like FC5 on which gcc-4 is native, I suppose the implication is that you could workaround by installing an old gcc-3 somewhere (/usr/local/oldstuff?) and pointing to it with -gcc-name

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi,

Thanks for the tip. What icpc does is check the version of gcc in your PATH env variable, then icpc runs g++ --print-search-dirs to find the location of the g++ headers and libraries for a given version of g++. You pointed out that you can override finding the version of gcc in your PATH with -gcc-name.

Best regards,

_|ohnO

Leave a Comment

Please sign in to add a comment. Not a member? Join today