strip corrupting static libraries on MIPS64 (ERL)

Ben Morrow ben at morrow.me.uk
Mon Nov 3 07:28:25 UTC 2014


Quoth Kurt Lidl <lidl at pix.net>:
> I know there's an issue with the 'strip' command destroying
> static library files on the mips64 architecture.
> 
> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191587)
> 
> It appears, based on what's on my ERL (EdgeRouter Lite), that
> the 'strip' binary there is from binutils.
> 
> Has anybody tried compiling and using the 'elftoolchain'
> version of strip for this machine?

elftoolchain does not support mips yet. I've been using this as a
(rather crude) workaround; TBH I'm not sure I see much point in
stripping static libraries anyway, given that any executable linked from
them is going to be stripped.

Ben

--- a/contrib/binutils/binutils/objcopy.c
+++ b/contrib/binutils/binutils/objcopy.c
@@ -2754,6 +2754,9 @@ strip_main (int argc, char *argv[])
          continue;
        }
 
+      if (fnmatch("*.a", argv[i], 0) == 0)
+       continue;
+
       if (preserve_dates)
        /* No need to check the return value of stat().
           It has already been checked in get_file_size().  */



More information about the freebsd-mips mailing list