Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 1 Jun 2015 16:15:36 +0200
From: Shiz <hi@...z.me>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 2/2] build: overhaul wrapper script system for multiple wrapper support

> On 01 Jun 2015, at 05:18, Rich Felker <dalias@...c.org> wrote:
> 
> 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’re right, this is something that should be addressed. I’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:
> 
> 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’m not sure I’m a big fan of this approach. It’s perfectly reasonable for
targets to exist which are both not musl and don’t 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’ve 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’t see any
harm in taking this approach. pcc doesn’t support this sadly, however.

Any thoughts?

-S

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.