mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Rich Felker <dalias@aerifal.cx>, musl@lists.openwall.com
Subject: installation on bi-arch system
Date: Sun, 17 Jun 2012 19:24:01 +0200	[thread overview]
Message-ID: <9015794.u7FZ5h2CIA@linuix> (raw)

Hi,

Trying to install musl-0.9.1 as a 32-bit library on a bi-arch x86_64
glibc system. The usual way to configure packages for this configuration
is
  ./configure CC="gcc -m32"
or
  CC="gcc -m32" ./configure
See <http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html>.
But this does not work with musl's configure script:

$ CC="gcc -m32" ./configure --prefix=/arch/x86-linux/inst-musl --exec-prefix=/arch/x86-linux/inst-musl CC="gcc -m32"
checking for C compiler... gcc -m32
checking whether compiler is gcc... no
checking target system type... unknown
./configure: unable to detect target arch; try ./configure --target=...

As a workaround, I have to create a wrapper script that invokes "gcc -m32 ..."
and pass that as CC. This should not be needed.

Additionally, the musl-gcc script that gets created by "make install" looks
like this:

#!/bin/sh
exec gcc "$@" -specs "/arch/x86-linux/inst-musl/lib/musl-gcc.specs"

When invoked with option "-c", it produces 64-bit .o files. To produce
32-bit .o files, it should read like this:

#!/bin/sh
exec gcc-32 "$@" -specs "/arch/x86-linux/inst-musl/lib/musl-gcc.specs"

or like this:

#!/bin/sh
exec gcc -m32 "$@" -specs "/arch/x86-linux/inst-musl/lib/musl-gcc.specs"

Bruno



             reply	other threads:[~2012-06-17 17:24 UTC|newest]

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

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=9015794.u7FZ5h2CIA@linuix \
    --to=bruno@clisp.org \
    --cc=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).