[oe] [PATCH] Make coreutils 6.x+ install utility to honor STRIP env variable
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Thu Mar 5 10:21:43 UTC 2009
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. */
More information about the Openembedded-devel
mailing list