Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
To: "Bach, Pascal" <pascal.bach@siemens.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] cmake.bbclass: set archiver, linker and ranlib in toolchain.cmake
Date: Fri, 17 Jul 2015 15:23:15 +0200	[thread overview]
Message-ID: <55A901C3.1030604@herbrechtsmeier.net> (raw)
In-Reply-To: <355BE46A91031048906B695426A8D8E616C12A50@DEFTHW99EH4MSX.ww902.siemens.net>

Am 17.07.2015 um 14:23 schrieb Bach, Pascal:
> Hi
>
>> -----Original Message-----
>> From: Stefan Herbrechtsmeier [mailto:stefan@herbrechtsmeier.net]
>> Sent: Freitag, 17. Juli 2015 12:56
>> To: Bach, Pascal; openembedded-core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH] cmake.bbclass: set archiver, linker and ranlib
>> in toolchain.cmake
>>
>> Am 17.07.2015 um 09:44 schrieb Pascal Bach:
>>> Setting CMAKE_AR, CMAKE_LINKER and CMAKE_RANLIB correctly in
>>> toolchain.cmake is necessary to correctly build -native packages using
>>> CMake.
>>>
>>> The reason is that CMake is not able to find the above utilities by
>>> itself because CMAKE_FIND_ROOT_PATH_MODE_PROGRAM is set to
>> ONLY so we
>>> need to tell it explicitly where to look.
>> Which version do you use? The master sets
>> CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to BOTH for native packages.
>>
> I tested it with 1.7.2. I didn't notice that change in master.
> So I retested with master and it is working there without modifications.
Good

>> If this don't work you could set the
>> CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN
>> path (without /bin).
>>
>>> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
>>> ---
>>>    meta/classes/cmake.bbclass | 8 ++++++++
>>>    1 file changed, 8 insertions(+)
>>>
>>> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>>> index 995ddf1..cae0ad2 100644
>>> --- a/meta/classes/cmake.bbclass
>>> +++ b/meta/classes/cmake.bbclass
>>> @@ -13,6 +13,9 @@ inherit autotools
>>>    # C/C++ Compiler (without cpu arch/tune arguments)
>>>    OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
>>>    OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
>>> +OECMAKE_AR ?= "`echo ${AR} | sed 's/^\([^ ]*\).*/\1/'`"
>> This is already set in master.
>>
> Just saw this.
>
>>> +OECMAKE_LINKER ?= "`echo ${LD} | sed 's/^\([^ ]*\).*/\1/'`"
>>> +OECMAKE_RANLIB ?= "`echo ${RANLIB} | sed 's/^\([^ ]*\).*/\1/'`"
>> You don't need the sed for ranlib.
>>
> I wasn't sure it is needed I just keept it to be on the safe side.
>
> The question is if the two above lines are needed at all. As I wrote above it is now working without them.
> For consistency reasons one could add them but currently I wouldn't do it.
They aren't needed because they aren't used anywhere.



      reply	other threads:[~2015-07-17 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  7:44 [PATCH] cmake.bbclass: set archiver, linker and ranlib in toolchain.cmake Pascal Bach
2015-07-17 10:56 ` Stefan Herbrechtsmeier
2015-07-17 12:23   ` Bach, Pascal
2015-07-17 13:23     ` Stefan Herbrechtsmeier [this message]

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=55A901C3.1030604@herbrechtsmeier.net \
    --to=stefan@herbrechtsmeier.net \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=pascal.bach@siemens.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox