On 09/17/2014 04:42 PM, Jakub Jelinek wrote:
mkoffload should make similar attempts to find the offloading compiler driver. It should try (relative to mkoffload binary) probably: ../../../../../bin/x86_64-intelmic-linux-gnu-g++ (why does it try g++ and not gcc btw?), then perhaps: ./x86_64-intelmic-linux-gnu-g++ (so that one can e.g. put a symlink next to mkoffload and point it wherever needed) and perhaps as last fallback, try to execute x86_64-intelmic-linux-gnu-g++ from PATH env var.
It should be easier - the nvptx mkoffload examines COLLECT_GCC for a path, and uses that if it's available (otherwise relying on PATH). I don't know what the mic offload is doing, I haven't looked yet.
Bernd