From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] Make coreutils 6.x+ install utility to honor STRIP env variable
Date: Thu, 5 Mar 2009 11:21:43 +0100 [thread overview]
Message-ID: <20090305102143.GB13650@mx.loc> (raw)
In-Reply-To: <20090304235032.GA29159@gmail.com>
On Wed, Mar 04, 2009 at 03:50:32PM -0800, Khem Raj wrote:
>Hi
>
>As reported in bug 5052 and also on irc, install calls strip directly. We should make it use STRIP
>env variable which is set to <cross-strip> in OE env.
>
>This is a patch which does that
>
>OK for .dev ?
>
>Thx
>-Khem
>
>
>Index: coreutils-6.0/src/install.c
>===================================================================
>--- coreutils-6.0.orig/src/install.c 2009-03-04 15:37:45.000000000 -0800
>+++ coreutils-6.0/src/install.c 2009-03-04 15:38:57.000000000 -0800
>@@ -526,7 +526,14 @@
> strip (char const *name)
> {
> int status;
>- pid_t pid = fork ();
>+ pid_t pid;
>+ char *strip_name;
>+
>+ strip_name = getenv ("STRIP");
>+ if (strip_name == NULL)
>+ strip_name = "strip";
>+
>+ pid = fork ();
>
> switch (pid)
> {
>@@ -534,7 +541,7 @@
> error (EXIT_FAILURE, errno, _("fork system call failed"));
> break;
> case 0: /* Child. */
>- execlp ("strip", "strip", name, NULL);
>+ execlp (strip_name, "strip", name, NULL);
perhaps it would be nicer to use the basename of strip_name instead of
hardcoding "strip" ?
> error (EXIT_FAILURE, errno, _("cannot run strip"));
indicating the actual binary that failed may be nice, too.
My install(1) uses STRIPCMD and STRIPARGS, I suggest you add a way
to pass additional arguments to that strip, too.
Just a thought..
> break;
> default: /* Parent. */
prev parent reply other threads:[~2009-03-05 10:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 23:50 [PATCH] Make coreutils 6.x+ install utility to honor STRIP env variable Khem Raj
2009-03-05 0:59 ` Michael 'Mickey' Lauer
2009-03-05 10:21 ` Bernhard Reutner-Fischer [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=20090305102143.GB13650@mx.loc \
--to=rep.dot.nop@gmail.com \
--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.