From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10588 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: 32 bit musl? Date: Wed, 5 Oct 2016 20:33:42 -0400 Message-ID: <20161006003342.GN19318@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1475714045 16655 195.159.176.226 (6 Oct 2016 00:34:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Oct 2016 00:34:05 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10601-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 06 02:34:00 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1brwdH-0003Jb-VX for gllmg-musl@m.gmane.org; Thu, 06 Oct 2016 02:33:56 +0200 Original-Received: (qmail 19625 invoked by uid 550); 6 Oct 2016 00:33:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 19607 invoked from network); 6 Oct 2016 00:33:55 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10588 Archived-At: On Thu, Oct 06, 2016 at 02:24:43AM +0200, Shiz wrote: > As Rich noted, a cross-compiler is the easy way out here - GCC multilib has a number of assumptions that break under musl and likely elsewhere. > Since you seem unsure how to compile one, I’d recommend musl-cross-make[1]. > You only need to edit a single variable in config.mak and run 'make && make install' to get a working toolchain. You can actually even skip editing/making config.mak with current versions of mcm. I typically just do something like: make TARGET=i686-linux-musl OUTPUT=[whatever] -j4 install Rich > [1]: https://github.com/richfelker/musl-cross-make > > > On 06 Oct 2016, at 00:20, John Mudd wrote: > > > > I've been using musl on a 32-bit Linux to build 32-bit apps to run > > on 32 and 64-bit Linux machines. That works well. > > > > I upgraded to a 64 bit development box. I've assumed I would just > > need to use -m32 option and I could still build 32 bit apps on my > > 64 bit machine. I tried it but it tries to mix 32 & 64 bit code. I > > guess I was naive. > > > > It looks like I should build a cross compiler? I see several > > suggestions on how to do this so I'm not confident this will work > > well. Or would it be easier if I just installed a 32 bit Linux in > > a VM just for building 32 bit apps with musl? > > > > John