bug-fileutils
[Top][All Lists]
Advanced

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

bug in install


From: Bryan Chua
Subject: bug in install
Date: Tue, 14 May 2002 18:28:53 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417

Install uses the strip program, which may or may not be intelligent enough to regocnize non-native binaries.

I am hoping my mailer doesn't wrap this.
This makes the install program aware of an environment variable "STRIP" for use as the strip program. This is especially useful for cross-compilation environments.

-- bryan

--- src/install.c.orig  Tue May 14 18:24:37 2002
+++ src/install.c       Tue May 14 18:23:24 2002
@@ -525,6 +525,7 @@
 {
   int status;
   pid_t pid = fork ();
+  char *stripprog = getenv ("STRIP");

   switch (pid)
     {
@@ -532,7 +533,8 @@
       error (1, errno, _("fork system call failed"));
       break;
     case 0:                    /* Child. */
-      execlp ("strip", "strip", path, NULL);
+      stripprog = (stripprog)? stripprog: "strip";
+      execlp (stripprog, stripprog, path, NULL);
       error (1, errno, _("cannot run strip"));
       break;
     default:                   /* Parent. */




reply via email to

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