Mac -> Linux cross compilation problem with clang

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac -> Linux cross compilation problem with clang

Xavier Ducrohet
On Mac, using clang we are running into a small problem.

The linker is called with 

-Wl,-install_name,libsanangeles.so

but -install_name is mac-specific, while our target is linux. It looks like Gradle should detect that the target is linux (with .so output file) and use -soname instead.

Reply | Threaded
Open this post in threaded view
|

Re: Mac -> Linux cross compilation problem with clang

Adam Murdoch

On 16 Jul 2014, at 9:00 am, Xavier Ducrohet <[hidden email]> wrote:

On Mac, using clang we are running into a small problem.

The linker is called with 

-Wl,-install_name,libsanangeles.so

but -install_name is mac-specific, while our target is linux. It looks like Gradle should detect that the target is linux (with .so output file) and use -soname instead.

It should.

Just out of curiosity, which tool chain and SDK (headers, libs) are you using to cross compile for linux from OS X?


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
CTO Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com



Reply | Threaded
Open this post in threaded view
|

Re: Mac -> Linux cross compilation problem with clang

Raymond Chiu
We are using the clang/gcc toolchain from the NDK.  Actually, we have a patch that we would like to contribute is to fix this problem (https://github.com/rschiu/gradle/compare/use-target-os-for-linker), but we are waiting for the corporate CLA.



On Mon, Jul 28, 2014 at 8:12 PM, Adam Murdoch <[hidden email]> wrote:

On 16 Jul 2014, at 9:00 am, Xavier Ducrohet <[hidden email]> wrote:

On Mac, using clang we are running into a small problem.

The linker is called with 

-Wl,-install_name,libsanangeles.so

but -install_name is mac-specific, while our target is linux. It looks like Gradle should detect that the target is linux (with .so output file) and use -soname instead.

It should.

Just out of curiosity, which tool chain and SDK (headers, libs) are you using to cross compile for linux from OS X?


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
CTO Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com