On Fri, Mar 06, 2015 at 04:55:07PM +0300, Ilya Verbin wrote: > Hi, > > I've found a bug in intelmic-mkoffload, it works only when the path to gcc is > absolute or relative, but doesn't work when it's specified in the PATH env > var. > Here is the fix, I've got a piece of code from gcc/config/nvptx/mkoffload.c. > Regtested on x86_64-linux and i686-linux. Ok for trunk? > > > gcc/ > * config/i386/intelmic-mkoffload.c: Include intelmic-offload.h instead > of libgomp-plugin.h. > (find_target_compiler): Support a case when the path to gcc is specified > in the PATH env var, so COLLECT_GCC doesn't contain a path. > (generate_host_descr_file): Use GOMP_DEVICE_INTEL_MIC from > intelmic-offload.h instead of OFFLOAD_TARGET_TYPE_INTEL_MIC from > libgomp-plugin.h. > (main): Use GCC_INSTALL_NAME as target_driver_name. > * config/i386/t-intelmic (CFLAGS-mkoffload.o): Add GCC_INSTALL_NAME > define. > (mkoffload.o): Remove obsolete include path and defines. > (mkoffload$(exeext)): Use $(LINKER) instead of $(COMPILER).
Ok, thanks. Jakub