From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2698 Path: news.gmane.org!not-for-mail From: idunham@lavabit.com Newsgroups: gmane.linux.lib.musl.general Subject: Re: Using musl in a cross-compiling environment Date: Tue, 29 Jan 2013 19:43:58 -0800 (PST) Message-ID: <6850.50.0.224.127.1359517438.squirrel@lavabit.com> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1359517449 27941 80.91.229.3 (30 Jan 2013 03:44:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jan 2013 03:44:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2699-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 30 04:44:29 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U0Ob7-0004Qz-Hl for gllmg-musl@plane.gmane.org; Wed, 30 Jan 2013 04:44:29 +0100 Original-Received: (qmail 24352 invoked by uid 550); 30 Jan 2013 03:44:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24342 invoked from network); 30 Jan 2013 03:44:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=bF682zdoLu4sii2aIF6DnaCoOGevFWpyx49Iuc6n0utTO2AHx2TgFa6GHhnyhaYciDxcHtuPNPsq1gQbFqVfkLCHYE0wKWa2xdCRF+v8xmPj2VtzBrw2KDV6Sf5zIpo3d3x2nOtcX/7IEkKR+qi2QnhMh8qaDsussB/AD2TYnzc=; h=Message-ID:In-Reply-To:References:Date:Subject:From:To:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: User-Agent: SquirrelMail/1.4.13 Xref: news.gmane.org gmane.linux.lib.musl.general:2698 Archived-At: > Hi, > We're investigating moving some of our future projects over to using > musl. All of our development is done in a cross-compiling environment > (hosted on x86_64, targeting various ARM platforms). We've done some > preliminary testing, and it has all gone well. However when we come to > start cross compiling third party packages, we generally run into > various minor issues. Mostly it is around getting configure to work > properly, pick up the correct compiler, and pass through the > appropriate flags. How do you guys normally cope with this? I know of > the musl-gcc command, but unfortunately when you're cross compiling > you generally need to have all of your commands with a similar prefix > (ie: arm-none-linux-gnueabi-gcc, arm-none-linux-gnueabi-strip etc...) > I thought of creating a bin directory with a bunch of scripts, which > have the same name as the original commands, and simply put the > '-spec' line in there, similar to musl-gcc. Only gcc needs the -spec line; ld gets parameters from gcc, cpp is no longer used anywhere, and nothing else cares at all. So basically, you should be able to go: export REALGCC=arm-none-linux-gnueabi CC=musl-gcc although, you might want a patched version of musl-gcc that defaults to that compiler. Option 2 is using the musl-cross toolchain instead.