Index: Lib/distutils/unixccompiler.py =================================================================== --- Lib/distutils/unixccompiler.py (revision 77209) +++ Lib/distutils/unixccompiler.py (working copy) @@ -290,7 +290,7 @@ return ["+s", "-L" + dir] elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - elif compiler[:3] == "gcc" or compiler[:3] == "g++": + elif "gcc" in compiler or "g++" in compiler: # gcc on non-GNU systems does not need -Wl, but can # use it anyway. Since distutils has always passed in # -Wl whenever gcc was used in the past it is probably