Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140501125117.GU26358@brightrain.aerifal.cx>
Date: Thu, 1 May 2014 08:51:17 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: for the wiki: a __MUSL__ alternative

On Thu, May 01, 2014 at 03:41:19AM -0400, writeonce@...ipix.org wrote:
> Greetings,
> 
> Since requests for a __MUSL__ macro still come in every now and
> then, I thought it might be useful to add to the wiki the following
> text at the end of the section "why is there no __MUSL__ macro?"
> 
> If you have a situation that (temporarily) requires that you can
> identify the libc being used, consider the following trick: as part
> of your configuration script, locate libc.so, then create a symlink
> from libc.so to /some/temporary/folder/ldd, and finally execute
> /some/temporary/folder/ldd 2>&1 | grep 'musl libc';  Based on the
> outcome, you could then add -D__MUSL__ to the relevant environment
> variable.

The whole point of the wiki answer is that doing this is wrong. Adding
a "here's a way to do it anyway" rather defeats the purpose and is
just going to get us more trouble in the long term. In any case, this
only works when dynamic linking is available, and it requires the
ability to run programs for the target which breaks cross compiling
and therefore violates one of the biggest rules for built scripts.

Rich

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.