From owner-freebsd-mips@FreeBSD.ORG Mon Nov 3 07:28:25 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F5DFAC0 for ; Mon, 3 Nov 2014 07:28:25 +0000 (UTC) Received: from isis.morrow.me.uk (isis.morrow.me.uk [204.109.63.142]) by mx1.freebsd.org (Postfix) with ESMTP id E0978376 for ; Mon, 3 Nov 2014 07:28:24 +0000 (UTC) Received: from anubis.morrow.me.uk (unknown [93.89.81.46]) (Authenticated sender: mauzo) by isis.morrow.me.uk (Postfix) with ESMTPSA id E41DA4508A; Mon, 3 Nov 2014 07:21:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 isis.morrow.me.uk E41DA4508A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=morrow.me.uk; s=dkim201101; t=1414999262; bh=QUGaiwW+z8S+cj0JOCE8P+J9pVzF+bkryXpw/2u2Q3o=; h=Date:From:To:Subject:In-Reply-To; b=eesLa43lbfhxWE9vNufr3L2Y4bKiLKWWr7NGJpFURIqKf2C0N6f5pAFh9zouVzjna oEPo1eqfkgFFyzSIwyt36q1SFC3czmLwP9keJZklIORro2Ofxym2Vaq0kKYyTA+TiF ZJGPLE/E2zz2sz3BlkVHNAK1fpK8TF0GjM5MfQ1o= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.98.4 at isis.morrow.me.uk Received: by anubis.morrow.me.uk (Postfix, from userid 5001) id 4E316151E2; Mon, 3 Nov 2014 07:20:57 +0000 (GMT) Date: Mon, 3 Nov 2014 07:20:57 +0000 From: Ben Morrow 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5456AEBE.90201@pix.net> X-Newsgroups: gmane.os.freebsd.devel.mips User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 07:28:25 -0000 Quoth Kurt Lidl : > 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(). */