bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [WISH] install using cross strip command


From: Jim Meyering
Subject: Re: [WISH] install using cross strip command
Date: Thu, 13 Sep 2007 22:31:02 +0200

Hiroki Kaminaga <address@hidden> wrote:
> I would like to have --strip option of install command adapt to cross
> toolchain, for example:
>
> $ STRIP=mips-unknown-linux-strip install -s $app $dir
>
> current coreutils-6.8/src/install.c seems to hard code strip command:
>
>      565       execlp ("strip", "strip", name, NULL);
>
>
> something like:
>
> char *strip_cmd;
> strip_cmd = getenv("STRIP");
> if (!strip_cmd)
>   strip_cmd = "strip";
>
> and
>
>   execlp (strip_cmd, strip_cmd, name, NULL);
>
> would do?

Thanks for the suggestion.
However, it's best to avoid adding tool/envvar dependencies, if possible.
In fact, there's an item suggesting this in the TODO file:

    strip: add an option to specify the program used to strip binaries.
      suggestion from Karl Berry

Note that it says 'an option'.

But since so much time has gone by with no further requests, I wonder
if it's worthwhile.

I suppose that most people have access to a binary named "install"
and can invoke install like this:

    PATH=/path-to-mips-unknown-linux-binaries/bin:$PATH install -s

Would that work for you?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]