diff options
author | marcel <marcel@FreeBSD.org> | 2002-05-11 19:15:15 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-05-11 19:15:15 +0000 |
commit | e4f919be682bfcba2cf1e2c4068abbb87cb3b973 (patch) | |
tree | 4ef115fc469c0c0fa5dacffe71e0e844808aab11 /usr.bin | |
parent | 4da1be0803196ec82f74fc519c68443db6e84146 (diff) | |
download | FreeBSD-src-e4f919be682bfcba2cf1e2c4068abbb87cb3b973.zip FreeBSD-src-e4f919be682bfcba2cf1e2c4068abbb87cb3b973.tar.gz |
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.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 21f19d3..75f4549 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -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) { |