mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: installation on bi-arch system
Date: Sun, 17 Jun 2012 20:00:29 -0400	[thread overview]
Message-ID: <20120618000029.GY163@brightrain.aerifal.cx> (raw)
In-Reply-To: <20120617160613.7f599078@newbook>

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


      reply	other threads:[~2012-06-18  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 17:24 Bruno Haible
2012-06-17 23:06 ` Isaac Dunham
2012-06-18  0:00   ` Rich Felker [this message]

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=20120618000029.GY163@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --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).