mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "writeonce@midipix.org" <writeonce@midipix.org>
To: musl@lists.openwall.com
Subject: Re: for the wiki: a __MUSL__ alternative
Date: Thu, 01 May 2014 09:07:08 -0400	[thread overview]
Message-ID: <536246FC.3000901@midipix.org> (raw)
In-Reply-To: <20140501125117.GU26358@brightrain.aerifal.cx>

On 05/01/2014 08:51 AM, Rich Felker wrote:
> On Thu, May 01, 2014 at 03:41:19AM -0400, writeonce@midipix.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
>
>
You are absolutely right, and my thought was to provide a _temporary_ 
solution until everyone get convinced...  but I certainly see your 
point.  It later occurred to me that this won't work with 
cross-compilation, and while there is an even more deviant trick for 
that scenario as well, this time I'm keeping it to myself;-)

zg



  reply	other threads:[~2014-05-01 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-01  7:41 writeonce
2014-05-01 12:51 ` Rich Felker
2014-05-01 13:07   ` writeonce [this message]
2014-05-02 10:44   ` Oliver Schneider
2014-05-02 15:10     ` Khem Raj
2014-05-03  0:53     ` writeonce

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=536246FC.3000901@midipix.org \
    --to=writeonce@midipix.org \
    --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).