Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2014 07:20:57 +0000
From:      Ben Morrow <ben@morrow.me.uk>
To:        lidl@pix.net, freebsd-mips@freebsd.org
Subject:   Re: strip corrupting static libraries on MIPS64 (ERL)
Message-ID:  <20141103072055.GA81320@anubis.morrow.me.uk>
In-Reply-To: <5456AEBE.90201@pix.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoth Kurt Lidl <lidl@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().  */




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141103072055.GA81320>