From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8379 Path: news.gmane.org!not-for-mail From: Andy Lutomirski Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl-gcc -m32 is broken Date: Thu, 27 Aug 2015 12:58:21 -0700 Message-ID: <55DF6BDD.6000104@amacapital.net> References: <20150827014407.GT32742@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1440705523 21121 80.91.229.3 (27 Aug 2015 19:58:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Aug 2015 19:58:43 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8391-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 27 21:58:42 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZV3Jp-0006dE-Ff for gllmg-musl@m.gmane.org; Thu, 27 Aug 2015 21:58:41 +0200 Original-Received: (qmail 24281 invoked by uid 550); 27 Aug 2015 19:58:39 -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 24213 invoked from network); 27 Aug 2015 19:58:35 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=gL7U2DQZzoQYXtP5InNRHiwFP/6mYB0EgPSINoGhYWU=; b=C2Y2+dSKbHjnrAwfN+5qKb1uOe6oYcdz857xqL8HZdKBEJgbX2GgNzZ3nVm82IvSE6 rnVLF0nogeMtArO9ysZVOD0tMof0Ob7v5a0QKOkfXQk+F83hHf4Dt8frmiAt7KUGrljw 9F6cbeDJAi6r/8cXhW+0ki4GkTPb1MHy26ORaziGSzQDh7Jxny5kq5U0vGBh2e398i8r 1R93u+7MXEtf6/HKRt5IthuCKuAuyHwLrgR00aj1lBhjb+tShWRGh0GYzgoAWMuUllW3 QHhKvOaTpKpGMJUQ3zAmoBND4zffeKVW6qErgfq0yRTzfu4BvQmczhwpZu3BlEwoLA6P 92HA== X-Gm-Message-State: ALoCoQkB8aTUrwawkWW39s0LZy2FoRZW8PimfqXnQJlhG+F92Izg1a5iMrm9Ere5M6VCpmKRoz/v X-Received: by 10.68.117.11 with SMTP id ka11mr9249774pbb.77.1440705502754; Thu, 27 Aug 2015 12:58:22 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <20150827014407.GT32742@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:8379 Archived-At: 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. ISTM either musl-gcc should accept and honor -m32 (and work!) or musl-gcc should hardcode the target architecture (i.e. musl-gcc should target i386 even without -m32). --Andy