I'm trying to port a project as a native Xeon Phi application. The project depends on some third-party libraries (GLib, libxml2, libgmp), and I understand that I have to cross-compile these libraries for x86_64-k1om-linux. I'm using the article "Autotools and Intel® Xeon Phi Coprocessor" as a guide, but here's the problem I've hit. I need shared libs, but I find that libtool doesn't think that icc in -mmic cross-mode can create them. I'm exporting CC=icc and LD=icc, and placing -mmic in CFLAGS and LDFLAGS as recommended, as well as passing --host=x86_64-k1om-linux to ./configure, but I'm seeing
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-k1om-linux-gnu checking for ld used by icc... icc checking if the linker (icc) is GNU ld... no ... checking for icc option to produce PIC... -fPIC -DPIC checking if icc PIC flag -fPIC -DPIC works... yes ... checking whether the icc linker (icc -m elf_x86_64) supports shared libraries... no
I've tried hacking on the configure script some (e.g. so as to replace the auto-generated "icc -m elf_x86_64" with "icc -mmic -shared") but to no avail. II've also checked, by building a trivial shared library without using libtool, that icc (188.8.131.52 Build 20131008) can in fact do the job. Any help would be much appreciated.