Hi! So, with the patch (probably undesirable) I've posted, I've managed to configure/make/make install DESTDIR=... the offload compiler and configure/make/make install DESTDIR=... the host compiler.
Generally gcc is a relocatable package, so appart from perhaps needing to add LD_LIBRARY_PATH it doesn't matter if the gcc installed tree as whole lives somewhere else than prefix (DESTDIR=/usr/src/gcc-git/objinst is what I've been using), one can still use the compiler normally. But apparently that is not the case with offloading: /usr/src/gcc-git/objinst/usr/local/bin/gcc -fopenmp -o target-1 target-1.c collect2: error trying to exec '/usr/local/bin/x86_64-intelmic-linux-gnu-g++': execvp: No such file or directory lto-wrapper: fatal error: /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload terminated with signal 11 [Segmentation fault], core dumped compilation terminated. /usr/bin/ld: lto-wrapper failed collect2: error: ld returned 1 exit status >From -v dump, that sounds like a bug in mkoffload, which has been found properly relatively to the gcc driver or whatever. /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload @/tmp/ccS6Q83l collect2: error trying to exec '/usr/local/bin/x86_64-intelmic-linux-gnu-g++': execvp: No such file or directory lto-wrapper: fatal error: /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload terminated with signal 11 [Segmentation fault], core dumped compilation terminated. /usr/bin/ld: lto-wrapper failed collect2: error: ld returned 1 exit status So, I'd say that mkoffload should be using similar stuff like the gcc.c driver uses to find cc1 relative to the location of the gcc binary. Also, unrelated to that, I've mentioned to Kirill on IRC privately that it would be nice if the libgomp offloading plugin API/ABI used some clearly libgomp & offloading related prefix for all the: get_type get_num_devices offload_register device_init device_get_table device_alloc device_free device_dev2host device_host2dev device_run symbols that are part of the plugin interface (GOMP_OFFLOAD_*, or whatever else). Jakub