mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Markus Wichmann <nullplan@gmx.net>
To: musl@lists.openwall.com
Cc: Thorsten Glaser <tg@mirbsd.de>
Subject: Re: [musl] musl-gcc: unusable on mipsel, mips64el: mipsel-linux-gnu-gcc: unrecognised command-line option '-EL'
Date: Sun, 4 Feb 2024 21:04:54 +0100	[thread overview]
Message-ID: <Zb_t5jr18pCoSpJ6@voyager> (raw)
In-Reply-To: <Pine.BSM.4.64L.2402040112580.23552@herc.mirbsd.org>

Am Sun, Feb 04, 2024 at 02:14:11AM +0000 schrieb Thorsten Glaser:
> Rich Felker dixit:
>
> >OK, it's not musl that's unusable
>
> That referred to the Debian package musl-tools originally.
>
> >, but the gcc wrapper. This is not
> >the recommended way to use musl except as minimal evaluation setup or
> >for compiling very simple programs
>
> Huh? Where does it say that, and how else is one supposed to do this?
> I have been building and testing mksh with the diet, klcc and musl-gcc
> wrappers on all Debian architectures they are available for years, and
> this is the first time I remember running into problems with it.
>

musl-gcc (and similar wrappers for other libcs) is in principle limited
by the fact that the target libraries it links in are still built
against the system libc. Most of the time there is no issue, since the
target libraries only contain simple code that either does not depend on
libc or (typically) only depends on a protable interface. E.g. on ARM
the 64-bit division code used to call raise(SIGFPE) if it saw the
divisor was zero. This typically works because raise() is implemented as
a function in all libcs and SIGFPE is kernel interface.

But sometimes there are issues anyway, and not just because of ABI
mismatch. Some of GCC's target libraries hook deeply into glibc
implementation internals once they know to be running on a glibc
platform, with libstdc++ being probably the worst offender.

A true cross-compiler avoids that by making the compiler choose a
musl-compatible ABI and letting it know that it is specifically not
building against glibc.

Ciao,
Markus

  reply	other threads:[~2024-02-04 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03  8:20 [musl] musl: " Thorsten Glaser
2024-02-03  8:37 ` Thorsten Glaser
2024-02-03 19:32 ` Rich Felker
2024-02-04  2:14   ` [musl] musl-gcc: " Thorsten Glaser
2024-02-04 20:04     ` Markus Wichmann [this message]
2024-02-05 10:16       ` Thorsten Glaser

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=Zb_t5jr18pCoSpJ6@voyager \
    --to=nullplan@gmx.net \
    --cc=musl@lists.openwall.com \
    --cc=tg@mirbsd.de \
    /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).