From: Simon Busch <morphis@gravedo.de>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] cmake.bbclass: set the rpath for binaries build with cmake to ${libdir}
Date: Wed, 04 May 2011 19:00:24 +0200 [thread overview]
Message-ID: <4DC18628.40508@gravedo.de> (raw)
In-Reply-To: <1304528054.15795.417.camel@phil-desktop>
On 04.05.2011 18:54, Phil Blundell wrote:
> On Wed, 2011-05-04 at 18:19 +0200, Simon Busch wrote:
>> On 04.05.2011 18:09, Phil Blundell wrote:
>>> On Wed, 2011-05-04 at 17:50 +0200, Simon Busch wrote:
>>>> +# We need to set the rpath to the correct directory as cmake does not provide any
>>>> +# directory as rpath by default
>>>> + echo "set( CMAKE_INSTALL_RPATH ${libdir} )" >> ${WORKDIR}/toolchain.cmake
>>>
>>> Shouldn't this be inside some kind of guard for native? You don't want
>>> rpath in target binaries, do you?
>>
>> Thanks for the hint!
>>
>> You mean something like:
>>
>> if not bb.data.inherits_class('native', d)
>> and not bb.data.inherits_class('cross', d):
>
> I think you have the sense backwards but yes, that's the general idea.
> Though I must admit I don't quite understand why the rpath setting from
> BUILD_LDFLAGS is not turning up in cmake's final link. It might be
> worth investigating why that isn't working for you in case this patch is
> just papering over some deeper problem.
I alreay searched through the cmake documentation and it says that the
rpath is set with the content of the CMAKE_INSTALL_RPATH variable. The
default value of CMAKE_INSTALL_RPATH is ""[1]. As currently nothing sets
it to another value the rpath is never set during the build for the
resulting binaries. I send another patch which does the solution
mentioned above the right way.
regards,
Simon
[1]: http://www.cmake.org/Wiki/CMake_RPATH_handling
next prev parent reply other threads:[~2011-05-04 17:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 15:50 [PATCH] cmake.bbclass: set the rpath for binaries build with cmake to ${libdir} Simon Busch
2011-05-04 16:09 ` Phil Blundell
2011-05-04 16:19 ` Simon Busch
2011-05-04 16:54 ` Phil Blundell
2011-05-04 17:00 ` Simon Busch [this message]
2011-05-05 9:50 ` Phil Blundell
2011-05-05 11:21 ` Simon Busch
2011-05-05 11:34 ` Phil Blundell
2011-05-05 11:44 ` Simon Busch
2011-05-04 16:55 ` [PATCH] cmake.bbclass: set the rpath for native binaries build with cmake Simon Busch
2011-05-04 20:46 ` Simon Busch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DC18628.40508@gravedo.de \
--to=morphis@gravedo.de \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.