From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7844 Path: news.gmane.org!not-for-mail From: Shiz Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/2] build: overhaul wrapper script system for multiple wrapper support Date: Mon, 1 Jun 2015 17:39:46 +0200 Message-ID: <09CD8E2A-6438-48AC-9D60-F661471EE00F@shiz.me> References: <1432918126-27741-1-git-send-email-hi@shiz.me> <1432918512-27823-1-git-send-email-hi@shiz.me> <20150601031829.GW17573@brightrain.aerifal.cx> <0A8B4259-3D1F-42FA-BB0C-8DE6A63F89B6@shiz.me> <20150601144744.GX17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_764B49AE-4A7C-4106-8687-CCCAAFB83A03"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: ger.gmane.org 1433173217 20098 80.91.229.3 (1 Jun 2015 15:40:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 15:40:17 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7856-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 01 17:40:17 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YzRox-0003nf-7I for gllmg-musl@m.gmane.org; Mon, 01 Jun 2015 17:40:11 +0200 Original-Received: (qmail 17680 invoked by uid 550); 1 Jun 2015 15:40:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17662 invoked from network); 1 Jun 2015 15:40:09 -0000 X-Virus-Scanned: amavisd-new at shiz.me X-Pgp-Agent: GPGMail 2.5b6 In-Reply-To: <20150601144744.GX17573@brightrain.aerifal.cx> X-Mailer: Apple Mail (2.2070.6) Xref: news.gmane.org gmane.linux.lib.musl.general:7844 Archived-At: --Apple-Mail=_764B49AE-4A7C-4106-8687-CCCAAFB83A03 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 01 Jun 2015, at 16:47, Rich Felker wrote: >=20 > There are two reasons I prefer the approach I described: >=20 > 1. It's better not to auto-enable wrappers unless we're pretty > confident they work. The wrappers are not magically universal; they're > a way to use musl with a preexisting non-musl-targeted toolchain that > meets a fairly large set of internal assumptions, and they won't > necessarily work with arbitrary toolchains. In particular I'm pretty > sure musl-gcc does not work with Rob's toolchains from Aboriginal > Linux that are using their own wrapper (named gcc) around an internal > gcc elsewhere, and presumably (being uclibc based) these would even be > detected as "ok for wrapper=E2=80=9D. I=E2=80=99d like to note that a __GLIBC__ check would not help here = either presumably, as uclibc defines __GLIBC__ as well. :) > 2, A false positive for enabling the wrapper (installing it on a > musl-native system) is worse than a false-negative (omitting it) since > native systems/cross-compilers are intended as the first-class usage > case and wrappers are more of a demo/minor usage case. I can't safe > for sure, but I suspect there might be minor breakage (versus a > full-featured native toolchain) in using the wrappers on top of an > already-native toolchain, and I don't want to =E0=BE=80mislead users = to do this > by installing a script that looks like it's meant to be used. >=20 > I don't believe the dumpmachine approach is at all robust for gcc > versions less than gcc 6 where musl support is upstream, and it's > worse than the current dynamic linker check. There are no musl-cross > patches at all for gcc versions prior to 4.0.3, whereas gcc3 works > well and some dists (e.g. Sabotage) are even using it to bootstrap. Understood, I wasn=E2=80=99t aware of this. On Gentoo=E2=80=99s musl = profile, the gcc CHOST is reconfigured to $arch-gentoo-linux-musl, so -dumpmachine works as expected on every gcc it builds: # gcc -dumpmachine x86_64-gentoo-linux-musl I assumed other musl distros would do something similar. So I see your use case for testing in C code itself as opposed to = testing compiler features. That being said, I=E2=80=99m still not at all a fan = of __GLIBC__, for reasons mentioned in the previous post. While a false-positive is = worse than a false-negative, I feel just solely testing for this provides a = large opportunity for false-negatives, and even some false positives as you = yourself mentioned in point one. It=E2=80=99s a tough thing to check thoroughly and accurately, but I do = not think checking __GLIBC__ is at all the solution either. -S --Apple-Mail=_764B49AE-4A7C-4106-8687-CCCAAFB83A03 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJVbHzQAAoJEI8YjKeZk+kHi3sP/0YMcM1mviVJN5WoRGoTWVZM pP6T7P2HUNzP3JNSs5FzXzMZDXRNUbBDUmkdkej5eBbi9rwfoDP9EJVpYmak66QC rAQTXsO+d9ILEILUqyIbwjm3bOANilwMbBEmbBFnlt9KDXn2HQqImdcIjcsMyJ/B e2nOr8NSSNy9sYvHBsy9DBB+e/DJBJ5OvsosU0THhIuV+zl/nVEWEBDIljdEvYkQ oSozjQ4lWts2GcHEm50YbkQJAm2aur2wg09ZJBXeWqTM5gTs5OgAw/4ojoTw+9PZ BLWARZXdbMbNB9m0BhuNNIyPtxWWTo2j1AtJ/B/hyJR5UjQWSky6Lm5qMeseusUL /2DUj1qvO6vJIdGmBJKsmRb2NJ/i9xENLZTgEy1FMrwwsZ8kYtY9mLaSZAPjV2ve 3fzYcRTmkcq2g8knpEABdmSPQ5k9pN+QQv0ZkgY8U+j0LG0/xBmN0fwMVKQB/g2G IYVsjsex+e2yU6+hnWEymUm2FeMTRfBTGKB03rMJZboYBy88r1LcqlnF9WC53Ikw joRlE4RvPqIHz/HOAZNx6CqIQ6qQlobrVZ5y+UjtYo46lpWC+iER8jqs0KPzDCcE +wcyOaXaeGiGqCZm6iFdIwC5liwise/OqbxFsXwRu7S9U0GBsc/CyGnVScPvbgdQ 3muXdXsLB8KK2Z18ASRQ =1Kd8 -----END PGP SIGNATURE----- --Apple-Mail=_764B49AE-4A7C-4106-8687-CCCAAFB83A03--