Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-28 Thread Brad King
On 02/28/2017 08:22 AM, Brad King wrote: >> 2) Make sure, in case lib32 is a symlink, to follow the symlink. > > I was thinking the same thing. The lib => lib32 search path conversion > should just be skipped if lib32 is a symlink back to lib. For reference, I opened an issue for this part of

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-28 Thread Jörg Krause
On Tue, 2017-02-28 at 08:22 -0500, Brad King wrote: > On 02/28/2017 05:25 AM, Jörg Krause wrote: > > Buildroot does not have any problems with searching for libraries > > in > > lib32. It does have a problem with having a host rpath used for > > linking > > with libraries. > > From your

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-28 Thread Brad King
On 02/27/2017 08:11 PM, Ray Donnelly wrote: >> CMake passes the host rpath to the linker > > CMake does this because it isn't *asking* the linker, it's making > assumptions instead (and adding some predefined values like > `/usr/lib32`). If we just ask the linker instead then everything > should

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-28 Thread Brad King
On 02/28/2017 05:25 AM, Jörg Krause wrote: > Buildroot does not have any problems with searching for libraries in > lib32. It does have a problem with having a host rpath used for linking > with libraries. From your description we are not adding a host rpath. It's coming from /sysroot/usr/lib32

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-28 Thread Jörg Krause
On Mon, 2017-02-27 at 16:33 -0500, Brad King wrote: > On 02/27/2017 03:50 PM, Jörg Krause wrote: > > The problem is... > > Thanks.  I've opened an issue for this here: > >  https://gitlab.kitware.com/cmake/cmake/issues/16682 Great! > > > These are set on by default in

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Ray Donnelly
On Mon, Feb 27, 2017 at 9:39 PM, Brad King wrote: > On 02/27/2017 03:54 PM, Ray Donnelly wrote: >> This is why my PR asks the linker that the compiler will use for the >> actual list of implicit link dirs. I'm sorry I've not had time to >> write up a clear explanation yet.

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Brad King
On 02/27/2017 03:54 PM, Ray Donnelly wrote: > This is why my PR asks the linker that the compiler will use for the > actual list of implicit link dirs. I'm sorry I've not had time to > write up a clear explanation yet. IIUC your case is the opposite of that under discussion in the rest of this

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Brad King
On 02/27/2017 03:50 PM, Jörg Krause wrote: > The problem is... Thanks. I've opened an issue for this here: https://gitlab.kitware.com/cmake/cmake/issues/16682 >> These are set on by default in `Modules/Platform/UnixPaths.cmake` but >> disabled on Debian by `Modules/Platform/Linux.cmake`

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Ray Donnelly
On Mon, Feb 27, 2017 at 8:50 PM, Jörg Krause wrote: > Hi Brad, > > On Mon, 2017-02-27 at 11:43 -0500, Brad King wrote: >> On 02/07/2017 04:40 AM, Ray Donnelly wrote: >> > > > I have a PR that asks the linker (via the compiler) what its >> > > > implicit >> > > >

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Jörg Krause
Hi Brad, On Mon, 2017-02-27 at 11:43 -0500, Brad King wrote: > On 02/07/2017 04:40 AM, Ray Donnelly wrote: > > > > I have a PR that asks the linker (via the compiler) what its > > > > implicit > > > > search directories are instead. > > > > > > > > It is the right way to do it IMHO, but I need

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-27 Thread Brad King
On 02/07/2017 04:40 AM, Ray Donnelly wrote: >>> I have a PR that asks the linker (via the compiler) what its implicit >>> search directories are instead. >>> >>> It is the right way to do it IMHO, but I need to find time to finish >>> it unfortunately. >> >> Do you have a link to the PR? > > The

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-07 Thread Ray Donnelly
The PR Is closed pending me writing a test-case, but I just now updated to the my latest version and rebased on top of master: https://gitlab.kitware.com/mingwandroid/cmake/commit/b937ff949d8fdaab7d8b812d503f67f8cef69532 Cheers. On Tue, Feb 7, 2017 at 8:37 AM,

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-07 Thread joerg . krause
Hi Ray, Am 2017-02-07 02:46, schrieb Ray Donnelly: I have a PR that asks the linker (via the compiler) what its implicit search directories are instead. It is the right way to do it IMHO, but I need to find time to finish it unfortunately. Do you have a link to the PR? On Feb 6, 2017 11:16

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-06 Thread Ray Donnelly
I have a PR that asks the linker (via the compiler) what its implicit search directories are instead. It is the right way to do it IMHO, but I need to find time to finish it unfortunately. On Feb 6, 2017 11:16 PM, "Jörg Krause" wrote: > On Mon, 2017-02-06 at 22:22

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-06 Thread Jörg Krause
On Mon, 2017-02-06 at 22:22 +0100, Jörg Krause wrote: > Hi, > > On Sun, 2017-02-05 at 23:03 +0100, Jörg Krause wrote: > > Hi, > > > > when using CHECK_{SYMBOL,FUNCTION}_EXISTS in a cross-compilation > > environment, CMake passes the host rpath to the linker: > > > > """ CMakeOutput.log > > > >

Re: [CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-06 Thread Jörg Krause
Hi, On Sun, 2017-02-05 at 23:03 +0100, Jörg Krause wrote: > Hi, > > when using CHECK_{SYMBOL,FUNCTION}_EXISTS in a cross-compilation > environment, CMake passes the host rpath to the linker: > > """ CMakeOutput.log > > /home/joerg/host/usr/bin/i586-linux-gcc   >

[CMake] RPATH cross-compile issue with CHECK_*_EXISTS

2017-02-05 Thread Jörg Krause
Hi, when using CHECK_{SYMBOL,FUNCTION}_EXISTS in a cross-compilation environment, CMake passes the host rpath to the linker: """ CMakeOutput.log /home/joerg/host/usr/bin/i586-linux-gcc   --sysroot=/home/joerg/host/usr/i586-buildroot-linux-musl/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE