|
Message-ID: <536246FC.3000901@midipix.org> Date: Thu, 01 May 2014 09:07:08 -0400 From: "writeonce@...ipix.org" <writeonce@...ipix.org> To: musl@...ts.openwall.com Subject: Re: for the wiki: a __MUSL__ alternative On 05/01/2014 08:51 AM, Rich Felker wrote: > 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 > > 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
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.