mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: 32 bit musl?
Date: Wed, 5 Oct 2016 19:02:43 -0400	[thread overview]
Message-ID: <20161005230243.GM19318@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAGDMk9H3Gwj1NMCOhiCJjGc0zrXj-_+i12z6jBS6V=zCeepWNw@mail.gmail.com>

On Wed, Oct 05, 2016 at 06:20:55PM -0400, 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?

GCC's multilib (-m32) is built on the assumption that the same set of
headers can be used. This is generally an invalid assumption, not just
for libc but for third-party libraries whose headers might be in the
include paths too. In principle you could hack on the gcc spec files
to get it to use different include paths for different ABIs, but a
dedicated cross compiler is an easier approach.

Rich


  reply	other threads:[~2016-10-05 23:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 22:20 John Mudd
2016-10-05 23:02 ` Rich Felker [this message]
2016-10-06  0:24 ` Shiz
2016-10-06  0:33   ` Rich Felker
2016-10-06  7:21 ` Jens Staal
2016-10-06 21:32   ` Rich Felker
2016-10-09  1:55 ` John Mudd
2016-10-09  9:36   ` Laurent Bercot
2016-10-09 14:29   ` John Mudd
2016-10-09 14:44     ` Szabolcs Nagy
2016-10-09 15:10       ` Bobby Bingham
2016-10-09 16:08         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161005230243.GM19318@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).