Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] systemd: use AC_CHECK_TOOL instead of AC_PATH_TOOL when checking objcopy, strings, gperf
Date: Wed, 17 Apr 2013 11:02:15 +0200	[thread overview]
Message-ID: <20130417090215.GB26007@jama> (raw)
In-Reply-To: <72299C10-2B6D-4295-80B1-C509C186B326@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6006 bytes --]

On Tue, Apr 16, 2013 at 05:59:53PM -0700, Khem Raj wrote:
> 
> On Apr 16, 2013, at 2:28 PM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> 
> > On Tue, 2013-04-16 at 14:30 +0200, Martin Jansa wrote:
> >> * with external toolchain I have different HOST_PREFIX and HOST_SYS
> >>  AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
> >>  then it tries objcopy without prefix which is found on host, but
> >>  that objcopy does not work for arm libs
> >> * with internal toolchain gperf is not prefixed with HOST_PREFIX, but
> >>  fallback to "gperf" only finds the one in native sysroot first
> >> * based on http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037985.html
> >>  Khem suggested to export strings and gperf from bitbake.conf instead
> >> 
> >> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >> ---
> >> meta/conf/bitbake.conf                             |  2 ++
> >> ...se-AC_CHECK_TOOL-for-objcopy-strings-and-.patch | 41 ++++++++++++++++++++++
> >> meta/recipes-core/systemd/systemd_199.bb           |  1 +
> >> 3 files changed, 44 insertions(+)
> >> create mode 100644 meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
> >> 
> >> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> >> index cd5d61e..a84ae38 100644
> >> --- a/meta/conf/bitbake.conf
> >> +++ b/meta/conf/bitbake.conf
> >> @@ -455,6 +455,8 @@ export RANLIB = "${HOST_PREFIX}ranlib"
> >> export STRIP = "${HOST_PREFIX}strip"
> >> export OBJCOPY = "${HOST_PREFIX}objcopy"
> >> export OBJDUMP = "${HOST_PREFIX}objdump"
> >> +export STRINGS = "${HOST_PREFIX}strings"
> >> +export GPERF = "${HOST_PREFIX}gperf"
> >> export NM = "${HOST_PREFIX}nm"
> >> PYTHON = "${@sys.executable}"
> > 
> > At this point in the release cycle I'm not adding new global exports to
> > ever piece of software in the system. I appreciate in theory nothing bad
> > should happen however the reality is sometimes different :/. I'm taking
> > a *lot* of risks in including as many changes as I have, I don't want to
> > add this one too.
> > 
> > I'm also not sure its a good idea in general to build up more exports in
> > bitbake.conf if we haven't yet needed them.
> > 
> 
> We can not be certain we did not need them autoconfed packages will default to one on host
> so it might be that many recipes have been wrongly using non-cross version of tools and succeeding
> the build. Problem is there in though. 
> 
> I think on master this patch should be considered as such
> 
> > I'll take a version of this which does this in the systemd recipe.
> 
> For dylan this seems ok

I have patch moving exports to bitbake.conf in my local tree, I'll send
it for master after dylan is released.

> >> diff --git a/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch b/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
> >> new file mode 100644
> >> index 0000000..d847bbc
> >> --- /dev/null
> >> +++ b/meta/recipes-core/systemd/systemd/0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch
> >> @@ -0,0 +1,41 @@
> >> +From d6f92bcbbae9a577adb9588c7b2783a5d0bf343d Mon Sep 17 00:00:00 2001
> >> +From: Martin Jansa <Martin.Jansa@gmail.com>
> >> +Date: Tue, 16 Apr 2013 14:20:41 +0200
> >> +Subject: [PATCH] configure: use AC_CHECK_TOOL for objcopy, strings and gperf
> >> +
> >> +* using AC_PATH_TOOL does not allow to override it from shell environment
> >> +  which is useful when cross-compiling
> >> +* with external toolchain I have different HOST_PREFIX and HOST_SYS
> >> +  AC_PATH_TOOL is using HOST_SYS as prefix and fails to find objcopy
> >> +  which is available only as ${TARGET_PREFIX}objcopy then it tries
> >> +  objcopy without prefix which is found on host, but that objcopy
> >> +  does not work for !host (e.g. arm when building on x86) libs
> >> +
> >> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >> +Upstream-Status: Submitted
> >> +http://lists.freedesktop.org/archives/systemd-devel/2013-April/010468.html
> >> +
> >> +---
> >> + configure.ac | 6 +++---
> >> + 1 file changed, 3 insertions(+), 3 deletions(-)
> >> +
> >> +diff --git a/configure.ac b/configure.ac
> >> +index 33b0ca9..519f1a9 100644
> >> +--- a/configure.ac
> >> ++++ b/configure.ac
> >> +@@ -86,9 +86,9 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
> >> +    AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
> >> +    enable_introspection=no])
> >> + 
> >> +-AC_PATH_TOOL(OBJCOPY, objcopy)
> >> +-AC_PATH_TOOL(STRINGS, strings)
> >> +-AC_PATH_TOOL(GPERF, gperf)
> >> ++AC_CHECK_TOOL(OBJCOPY, objcopy)
> >> ++AC_CHECK_TOOL(STRINGS, strings)
> >> ++AC_CHECK_TOOL(GPERF, gperf)
> >> + if test -z "$GPERF" ; then
> >> +         AC_MSG_ERROR([*** gperf not found])
> >> + fi
> >> +-- 
> >> +1.8.1.5
> >> +
> >> diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
> >> index d22df12..e8ad8f5 100644
> >> --- a/meta/recipes-core/systemd/systemd_199.bb
> >> +++ b/meta/recipes-core/systemd/systemd_199.bb
> >> @@ -27,6 +27,7 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
> >>            file://0002-readahead-chunk-on-spinning-media.patch \
> >>            file://0003-readahead-cleanups.patch \
> >>            file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \
> >> +           file://0001-configure-use-AC_CHECK_TOOL-for-objcopy-strings-and-.patch \
> >>            file://199-firmware.patch \
> >>            file://init \
> >>           "
> > 
> > 
> > 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  reply	other threads:[~2013-04-17  9:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 12:30 [PATCH] systemd: use AC_CHECK_TOOL instead of AC_PATH_TOOL when checking objcopy, strings, gperf Martin Jansa
2013-04-16 21:28 ` Richard Purdie
2013-04-16 22:01   ` [PATCHv2] " Martin Jansa
2013-04-16 22:10     ` Martin Jansa
2013-04-16 22:10   ` [PATCHv3] " Martin Jansa
2013-04-17  0:59   ` [PATCH] " Khem Raj
2013-04-17  9:02     ` Martin Jansa [this message]
2013-04-18 19:00       ` Martin Jansa
2013-04-18 23:13         ` Martin Jansa

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=20130417090215.GB26007@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.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