From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14288 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "A. Wilcox" Newsgroups: gmane.linux.lib.musl.general Subject: Re: Detecting musl at compile and/or configure time Date: Sat, 29 Jun 2019 08:27:50 -0500 Organization: =?UTF-8?Q?Ad=c3=a9lie_Linux?= Message-ID: <20425c39-b411-b9bb-1e83-bf26dbcd7d4d@adelielinux.org> References: <1561802993.8028.ezmlm@lists.openwall.com> <8c2d963e-1fcf-df2e-2a52-614f0250b594@gmch.uk> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kyOz4LL2UCkLF1FOQmlgwah8HBD3ZryyK" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66576"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: musl@lists.openwall.com Original-X-From: musl-return-14304-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 29 15:28:15 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hhDOn-000H9y-1V for gllmg-musl@m.gmane.org; Sat, 29 Jun 2019 15:28:13 +0200 Original-Received: (qmail 28324 invoked by uid 550); 29 Jun 2019 13:28:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 28268 invoked from network); 29 Jun 2019 13:28:09 -0000 Openpgp: preference=signencrypt In-Reply-To: <8c2d963e-1fcf-df2e-2a52-614f0250b594@gmch.uk> Xref: news.gmane.org gmane.linux.lib.musl.general:14288 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kyOz4LL2UCkLF1FOQmlgwah8HBD3ZryyK Content-Type: multipart/mixed; boundary="dz6eoaQJGNTSBJfWSjPm6RSlHQeywbnej"; protected-headers="v1" From: "A. Wilcox" To: musl@lists.openwall.com Message-ID: <20425c39-b411-b9bb-1e83-bf26dbcd7d4d@adelielinux.org> Subject: Re: [musl] Detecting musl at compile and/or configure time References: <1561802993.8028.ezmlm@lists.openwall.com> <8c2d963e-1fcf-df2e-2a52-614f0250b594@gmch.uk> In-Reply-To: <8c2d963e-1fcf-df2e-2a52-614f0250b594@gmch.uk> --dz6eoaQJGNTSBJfWSjPm6RSlHQeywbnej Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/29/19 06:48, Chris Hall wrote: >=20 > Is there a supported way of detecting that one is building against the > musl libc ? >=20 > At compile time I can, of course, detect glibc because it sets __GLIBC_= _ > etc.=C2=A0 For macOS I can see _DARWIN_FEATURE_xxx macros.=C2=A0 The BS= Ds mostly > give themselves away.=C2=A0 But for musl I have not found anything :-( >=20 > Chris The musl libc specifically does not have a FTM (feature test macro) because it aims to be an exact implementation of C11 / POSIX and therefore it has no "quirks" to detect. If there are bugs in musl libc, the authors prefer if you report them and have them fixed, instead of making your software look for __MUSL__ and then assume all musl versions will always have that bug. See here for more information: https://wiki.musl-libc.org/faq.html#Q:-Why-is-there-no-%3Ccode%3E__MUSL__= %3C/code%3E-macro? https://www.openwall.com/lists/musl/2013/03/29/13 Is there a reason you wish to detect musl at configure/compile time? Perhaps if we knew the reason, we could help you make your code more portable and/or not require such detection. Best to you and yours, --arw --=20 A. Wilcox (awilfox) Project Lead, Ad=C3=A9lie Linux https://www.adelielinux.org --dz6eoaQJGNTSBJfWSjPm6RSlHQeywbnej-- --kyOz4LL2UCkLF1FOQmlgwah8HBD3ZryyK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjNyWOYPU1SaTSMHHyynLUZIrnRQFAl0XZ1kACgkQyynLUZIr nRTRsQ/5AZsC4kqWeLRK0dg7qor7/RFD9hMjE4OYnzKJGlzdfY3+sQ36FCcTpHxF UtSyNP6TlgIwoVF2oz838ROLVz8RNaljjAHgSpTjRjREgROn9tXy9GN3hxKKr1Ka /WVoDUrYhPVsgTBZmoVDFVqrl9EsJ8pFaR00FItw9ym5WN822n2s0Ns6l6wiAkTB jC9QfLgaZc83n9RiG1XDuXE4Cgwy6j4hNGxYKnzzc+VcrmGLnfvdJbq8yT5JRdwN BBVKS+uOZY9L3S9tYy725QR+iND44gnFcCpsE+fye/KqFl/7JB3NW3peZe7pcnSi 0icZKxwLj2xucWC09SXbcPrDh4T4rJKCm8m323KJN6FfzkKuEWY0SeK4wQgnE+bC 7hrEiiPzFJSAhJr98w41MeCetLEDxUGaK0suONF52FLHKmfxq6jGn5J/FdImOnZY MVZOMshFpY0cthI0o3oU0dsC5fLDTToY9sPMtdI7k7015ExZDCz0waVLqVdMGdNf pFAv+SHi4Ls5XgpJCP3FF36/i9lTCdr56LhydL03jkMmqjobmO07jZq+PicY7J5A egiazlOjsWJaRI7vEmTsDDM/NxucGM93U9AIU8tRQz6Tv1zE9cfMDkkhbjPWM2cC a7h9vwZAGJ5ewHSZPLi/XmgwpdsUxVxM2+yssXHjvWmUEQxUIj0= =mKcI -----END PGP SIGNATURE----- --kyOz4LL2UCkLF1FOQmlgwah8HBD3ZryyK--