Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zb_t5jr18pCoSpJ6@voyager>
Date: Sun, 4 Feb 2024 21:04:54 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Cc: Thorsten Glaser <tg@...bsd.de>
Subject: Re: musl-gcc: unusable on mipsel, mips64el:
 mipsel-linux-gnu-gcc: unrecognised command-line option '-EL'

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.