Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 27 Aug 2015 17:49:07 -0700
From: Andy Lutomirski <>
Subject: Re: musl-gcc -m32 is broken

On 08/27/2015 01:09 PM, Rich Felker wrote:
> On Thu, Aug 27, 2015 at 12:58:21PM -0700, Andy Lutomirski wrote:
>> On 08/26/2015 06:44 PM, Rich Felker wrote:
>>> On Wed, Aug 26, 2015 at 03:16:22PM -0700, Andy Lutomirski wrote:
>>>> Adding %{m16|m32:-m elf_i386} to the *link spec in musl-gcc.specs
>>>> fixes at least the obvious failure for me.
>>> Can you clarify? musl-gcc's target is coupled to the target arch that
>>> the corresponding musl libc was built for. Switching targets with -m32
>>> and similar options is not going to get you correspondingly switched
>>> libraries. Or am I misunderstanding what you're trying to do?
>> I build for an i386 target on an x86_64 Fedora system using
>> CFLAGS=-m32.  It built successfully and even seems to work, but
>> musl-gcc ends up omitting -m32 in the link stage, so it tries to
>> pick up the wrong libraries and fails to link.
> I think -m32 should be part of $CC, not $CFLAGS. Then it should get
> incorporated into the musl-gcc script.

I don't suppose the configure script could be taught to do this 
automatically if I type --target=i386?  (Or at least to document this 

I searched for how to handle -m32 musl builds, and I got very 
conflicting advice.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.