mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Cullen <David.Cullen@koe-americas.com>
To: Michal Marek <mmarek@suse.cz>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [RFC PATCHv2] QEMU Fix /usr/bin/xargs: etags: Argument list too long
Date: Wed, 8 Aug 2012 17:23:49 +0000	[thread overview]
Message-ID: <5022A0A5.6090809@koe-americas.com> (raw)

Patch applies to

    commit 42a579a0f960081cd16fc945036e4780c3ad3202

When running "make ARCH=arm TAGS" in a cross chroot using
qemu-arm-static, the following message is emitted:

    [user@host:/home/work/linux]: make ARCH=arm TAGS
      GEN     TAGS
    /usr/bin/xargs: etags: Argument list too long

This can be fixed by by passing "-s $((120 * 1024))" to xargs in
scripts/tags.sh when QEMU matches .*qemu-.*-static$.

This limits the xargs command line to 120KiB characters to provide
headroom for people running inside a cross chroot using
qemu-.*-static.

Signed-off-by: David Cullen <david.cullen@koe-americas.com>
---
 scripts/tags.sh |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index cff8faa..02947c5 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -5,12 +5,19 @@
 # mode may be any of: tags, TAGS, cscope
 #
 # Uses the following environment variables:
-# ARCH, SUBARCH, SRCARCH, srctree, src, obj
+# ARCH, SUBARCH, SRCARCH, srctree, src, obj, QEMU

 if [ "$KBUILD_VERBOSE" = "1" ]; then
        set -x
 fi

+# If the user is running in a cross chroot using qemu-.*-static,
+# limit xargs to 120KiB of characters per command line.
+XARGS_MAX_CHARS=
+if [ -n "$QEMU" ] && [[ "$QEMU" =~ .*qemu-.*-static$ ]] ; then
+       XARGS_MAX_CHARS="-s $(( 120 * 1024 ))"
+fi
+
 # This is a duplicate of RCS_FIND_IGNORE without escaped '()'
 ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \
           -name CVS  -o -name .pc       -o -name .hg  -o \
@@ -121,7 +128,7 @@ dogtags()

 exuberant()
 {
-       all_sources | xargs $1 -a                               \
+       all_sources | xargs $XARGS_MAX_CHARS $1 -a              \
        -I __initdata,__exitdata,__acquires,__releases          \
        -I __read_mostly,____cacheline_aligned                  \
        -I ____cacheline_aligned_in_smp                         \
--
1.7.9.5

                 reply	other threads:[~2012-08-08 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=5022A0A5.6090809@koe-americas.com \
    --to=david.cullen@koe-americas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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

all inboxes | Powered by JetHome®