From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7841 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 16:15:36 +0200 Message-ID: <0A8B4259-3D1F-42FA-BB0C-8DE6A63F89B6@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> 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=_5C383681-837B-49D4-89F8-47857B136E0C"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: ger.gmane.org 1433168171 27497 80.91.229.3 (1 Jun 2015 14:16:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 14:16:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7853-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 01 16:16:11 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 1YzQVd-0008M1-Lu for gllmg-musl@m.gmane.org; Mon, 01 Jun 2015 16:16:09 +0200 Original-Received: (qmail 7857 invoked by uid 550); 1 Jun 2015 14:16:07 -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 7839 invoked from network); 1 Jun 2015 14:16:06 -0000 X-Virus-Scanned: amavisd-new at shiz.me X-Pgp-Agent: GPGMail 2.5b6 In-Reply-To: <20150601031829.GW17573@brightrain.aerifal.cx> X-Mailer: Apple Mail (2.2070.6) Xref: news.gmane.org gmane.linux.lib.musl.general:7841 Archived-At: --Apple-Mail=_5C383681-837B-49D4-89F8-47857B136E0C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 01 Jun 2015, at 05:18, Rich Felker wrote: >=20 > Even if that's fixed, it's also a problem, I think, that yes/auto are > equated. Presumably someone using --enable-wrapper with an existing > musl-targeted toolchain would want to bypass the musl-native detection > and force the wrapper (whichever one is appropriate for their > compiler) to be built. You=E2=80=99re right, this is something that should be addressed. I=E2=80=99= ll fix that. > This is especially important to have if the > musl-native test has false positives, which I think it will if we take > the following approach I'd like to take: >=20 > Instead of testing for musl-native, test whether the toolchain is > targetting another known non-musl target, which is basically a matter > of #ifdef __GLIBC__. This ensures that the wrapper is never auto-built > for a musl-native system (which could happen before if the musl-native > test failed) and avoids compiler-specific hacks; we can simply have a > general test for known-non-native-toolchain. I=E2=80=99m not sure I=E2=80=99m a big fan of this approach. It=E2=80=99s = perfectly reasonable for targets to exist which are both not musl and don=E2=80=99t define = __GLIBC__. I think a much more reasonable approach would be to check the target = triple ($CC -dumpmachine) for *musl* - I believe any compiler which would = target musl systems would have this in its triple right now. The reason why I omitted the detection in the initial patch was because I wanted some = more time to think the approach over, I should=E2=80=99ve mentioned that in = the message. clang, gcc and cparser all support -dumpmachine, and we already presume = a gcc-ish command line interface for a lot of things, so I wouldn=E2=80=99t = see any harm in taking this approach. pcc doesn=E2=80=99t support this sadly, = however. Any thoughts? -S --Apple-Mail=_5C383681-837B-49D4-89F8-47857B136E0C 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----- iQIcBAEBCAAGBQJVbGkdAAoJEI8YjKeZk+kHkkYP/jMhCJragrBMkuUG77IY0aEa zXhoP4l0WiJlmJDaTa2rHFX031PbkKSe1gEHFIc66A6Cw1nGtR4UctAPvYrPCh+v Ado5+vnMWBDr+EQ1QiP/ozKwu4eShgzYJBe3egXfDT5KKFpP9byBGIC455WOsWgX ld10WRCKEtVq7UwcK13Wmy3uzjoztrYqfdGlM+LtcB7LCnei/xvMAXoQXNsyOkLL 8jS6pREUL/w/7fqe0cv9ttR7fS41giI3tA4lFcOwix55UcSWL4U88cdKwlYykrbR mRRLaePkK80fdRZ5aecEqjraVQQ8JbzS/Pk0W41dFDFALvLPCG220+2bBU2/iY8s 0azh9B2PQgN4yuMzUb7rMFtxANWT/WdXHNvuDVE0U3JT63O7KXZexA4pXKsPcJ+U cNvIyDydoNCRiNYLpxiOmB2NwJy38KbMsCQaxYxMYpX2lkd+nd9p2R6AFUcLbVnS lkJHc6JXbzUW2EjdFUBnSmFNZbeTzGq0p/Nhq+uoL/SLdTNsUt4lxA2PHgY33Wuh MFtWyUvXe5Gtdbr2e/pyg4T+SMXCq/epZBfYzPIOOLRysMPOw3SLzvrka4xwRMDJ RLhyoJ+MA+aVTlTYN2GU8OlC3Ds5+Zb3n2VQskXwkyPVKDC5Voa6l8NmXDiEwyYi nUqcfhSQ0s2TdJeBuQoj =MBBD -----END PGP SIGNATURE----- --Apple-Mail=_5C383681-837B-49D4-89F8-47857B136E0C--