From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1166 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: installation on bi-arch system Date: Sun, 17 Jun 2012 20:00:29 -0400 Message-ID: <20120618000029.GY163@brightrain.aerifal.cx> References: <9015794.u7FZ5h2CIA@linuix> <20120617160613.7f599078@newbook> 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: dough.gmane.org 1339977887 7133 80.91.229.3 (18 Jun 2012 00:04:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2012 00:04:47 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1167-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 18 02:04:46 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SgPSV-0000fU-3G for gllmg-musl@plane.gmane.org; Mon, 18 Jun 2012 02:04:43 +0200 Original-Received: (qmail 12078 invoked by uid 550); 18 Jun 2012 00:04:43 -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 12070 invoked from network); 18 Jun 2012 00:04:42 -0000 Content-Disposition: inline In-Reply-To: <20120617160613.7f599078@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1166 Archived-At: On Sun, Jun 17, 2012 at 04:06:13PM -0700, Isaac Dunham wrote: > 2. I had always thought it was CC=gcc CFLAGS=-m32 ... I think Bruno's command line was more correct. -m32 is essential to the identity of the compiler and should be in CC. > 3. ./configure uses > $ type "$CC" > to detect whether using $CC will work. Are you sure? type should only be used when CC is not set and configure is searching for a default compiler.. > Even if $CC did get accepted, gcc -m32 -dumpmachine (how musl detects > $ARCH) may not give i?86-linux-*, thus failing the configure. What does it give? > > As a workaround, I have to create a wrapper script that invokes "gcc > > -m32 ..." and pass that as CC. This should not be needed. > See 2. Also note the --target= option (--target=i386 in this case). > --target=i386 should properly set CFLAGS to include -march=i486 -m32 > (unless otherwise specified in CFLAGS). Yes, that may be a good idea, although we'll need to test for accepting -m32. Some gcc versions probably don't support it. > > or like this: > > > > #!/bin/sh > > exec gcc -m32 "$@" -specs > > "/arch/x86-linux/inst-musl/lib/musl-gcc.specs" I think having anything before the "$@" will break some oddball gcc options that need to be first. Can it be after "$@"? Rich