From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9324 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Compile error with --target=i386 Date: Tue, 16 Feb 2016 11:54:09 -0500 Message-ID: <20160216165409.GV9349@brightrain.aerifal.cx> References: <56C2E94C.7000705@gkmsoft.ru> <56C2FA8C.4020908@gkmsoft.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1455641735 12808 80.91.229.3 (16 Feb 2016 16:55:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Feb 2016 16:55:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9337-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 16 17:55:34 2016 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 1aViuT-0005oA-Pa for gllmg-musl@m.gmane.org; Tue, 16 Feb 2016 17:55:33 +0100 Original-Received: (qmail 23948 invoked by uid 550); 16 Feb 2016 16:55:30 -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 23925 invoked from network); 16 Feb 2016 16:55:29 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9324 Archived-At: On Tue, Feb 16, 2016 at 01:39:16PM +0300, Alexander Monakov wrote: > On Tue, 16 Feb 2016, Petr Petrov wrote: > > Bingo! It works! Thank you very much! > > > > Never-mind, I tried to use CFLAGS: > > > > CFLAGS=-m32 > > ./confgiure --target=i386 > > make > > > > but it didn't work. > > As a general rule, ABI-altering options should go to $CC/$CXX, not $CFLAGS, > because the latter need not be applied when assembling and linking (so if -m32 > is not present on gcc command line when doing the link step, it won't pass > -m elf_i386 to ld, and library search paths will be wrong too). In the case of musl, CFLAGS is always passed even at the linking stage; I think the problem is just at configure time, where the user-provided CFLAGS are not used in all the configure-time tests. Maybe this is contrary to the normal UI for configure scripts and should be changed? Rich