Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S976790AbdDYNWR (ORCPT ); Tue, 25 Apr 2017 09:22:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45302 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1430823AbdDYNWH (ORCPT ); Tue, 25 Apr 2017 09:22:07 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 65AEC8E66A Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 65AEC8E66A Subject: Re: [PATCH resent] uapi libc compat: allow non-glibc to opt out of uapi definitions To: "Carlos O'Donell" , linux-kernel@vger.kernel.org, "David S. Miller" , linux-api@vger.kernel.org, musl@lists.openwall.com, Rich Felker References: <20161111120820.GA435@nyan> <20170309001435.GJ2082@port70.net> From: Florian Weimer Message-ID: <1d9ab212-6c80-f7fa-4be5-87b567ada949@redhat.com> Date: Tue, 25 Apr 2017 15:22:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <20170309001435.GJ2082@port70.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 25 Apr 2017 13:22:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 895 Lines: 21 On 03/09/2017 01:14 AM, Szabolcs Nagy wrote: > the other way (linux header included first) is > problematic because linux headers don't follow > all the standards the libc follows, they violate > namespace rules in their struct definitions, so > the libc definitions are necessarily incompatible > with them and thus different translation units can > end up refering to the same object through > incompatible types which is undefined. > (even if the abi matches and thus works across > the syscall interface, a sufficiently smart > toolchain can break such code at link time, > and since the libc itself uses its own definitons > that's what user code should use too). I don't think this is relevant in this context. LTO implementations have to deal with this already. For glibc's sake alone, it must be supported to link together code using differing feature test macros. Thanks, Florian