On 07/10/2014 08:24 PM, Ilya Verbin wrote:
On 07 Jul 17:03, Bernd Schmidt wrote:
Is libgomp the only problematic one? (Does the accel compiler even
need one?) It seems to be installed in /usr/lib rather than in a
gcc-specific directory, which is a little surprising to me. It may
be necessary to give the accel compiler a different sysroot to avoid
library clashes.

In the MIC case, not only libgomp is the problematic one.  Since, in general,
all libraries can be compiled for the MIC target, which can have an instruction
set that differs from the host's.

When mkoffload runs the accel compiler, it sets the LIBRARY_PATH env var,
telling where to find the libraries.  So, the question is how to specify this
installation directory for the accel's libraries during the configuration?
I tried the --libdir option for configure, but it affects only 'lib', but 
doesn't
affect 'lib64', because the path to 64 bit libs is determined in configure by
executing `$CC -print-multi-os-directory`, which returns "../lib64".

Probably I should somehow modify the spec string, so that under
ifdef ACCEL_COMPILER the multilib_os_dir will contain "../lib64/gcc/triplet",
instead of "../lib64"?

I suspect you'll need to specify a --with-sysroot when building the mic toolchain. That'll contain all the pieces required for that toolchain, separate from whatever is installed for the host.


Bernd

Reply via email to