On 06/18/2014 04:13 PM, Ilya Verbin wrote:
On 17 Jun 21:22, Bernd Schmidt wrote:
On 06/17/2014 08:20 PM, Ilya Verbin wrote:
I don't get this part of the plan.  Where a host compiler will look for 
mkoffloads?

E.g., first I configure/make/install the target gcc and corresponding mkoffload 
with the following options:
--enable-accelerator=intelmic --enable-as-accelerator-for=x86_64-unknown-linux 
--prefix=/install_gcc/accel_intelmic

Next I configure/make/install the host gcc with:
--enable-accelerator=intelmic --prefix=/install_gcc/host

Try using the same prefix for both.

I tried to do:
1. --enable-accelerator=intelmic 
--enable-as-accelerator-for=x86_64-intelmic-linux-gnu --prefix=/install_gcc/both
2. --enable-accelerator=intelmic --prefix=/install_gcc/both

In this case only bin/x86_64-intelmic-linux-gnu-accel-intelmic-gcc from accel 
compiler is saved.
All other binaries in bin, lib, lib64, libexec are replaced by host's ones.
Is there a way to have 2 working compilers and libs in the same prefix?

Sure, as long as the target triplet is different.

What I think you need to do is
For the first compiler: --enable-as-accelerator-for=x86_64-pc-linux-gnu --target=x86_64-intelmic-linux-gnu --prefix=/somewhere
Build and install, then:
For the second: configure --enable-offload-targets=x86_64-intelmic-linux-gnu x86_64-pc-linux-gnu --prefix=/somewhere

No --enable-accelerator options at all. This should work, if it doesn't let me know what you find in /somewhere after installation for both compilers.


Bernd

Reply via email to