Add support for stripping non-native object files by using an
environment variable that specifies the name of the strip(1) program to use. The envvar is "STRIPBIN". The more natural choice would be "STRIP", but that one is taken already.
This commit is contained in:
parent
4da1be0803
commit
e4f919be68
@ -701,6 +701,7 @@ void
|
||||
strip(to_name)
|
||||
const char *to_name;
|
||||
{
|
||||
const char *stripbin;
|
||||
int serrno, status;
|
||||
|
||||
switch (fork()) {
|
||||
@ -710,7 +711,10 @@ strip(to_name)
|
||||
errno = serrno;
|
||||
err(EX_TEMPFAIL, "fork");
|
||||
case 0:
|
||||
execlp("strip", "strip", to_name, (char *)NULL);
|
||||
stripbin = getenv("STRIPBIN");
|
||||
if (stripbin == NULL)
|
||||
stripbin = "strip";
|
||||
execlp(stripbin, stripbin, to_name, (char *)NULL);
|
||||
err(EX_OSERR, "exec(strip)");
|
||||
default:
|
||||
if (wait(&status) == -1 || status) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user