From owner-freebsd-current@FreeBSD.ORG Tue Oct 11 16:00:43 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C2DF106566C for ; Tue, 11 Oct 2011 16:00:43 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id E153F8FC19 for ; Tue, 11 Oct 2011 16:00:42 +0000 (UTC) Received: by iaby12 with SMTP id y12so5127408iab.13 for ; Tue, 11 Oct 2011 09:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=FkEzA5/DQzSfq0Uhol0uRhYpBG+eBl0OSgFwOzZVWbk=; b=j3N3CQ8cvchHo/dp1OxQFfYMyReQ/cD3Uypy4477Hb5PJ2AaM6me14aBnXIyzAWUJI 8KgI4TL+iTt+nPynj4gTn2UuFfeGW7Ha0PD+sMRu1yx1poJ6PTLwanuTZFcnkxlbKdc9 GlgCld/CiEA0aCcX2sNw72NrMazWL5/ZSaEtg= MIME-Version: 1.0 Received: by 10.231.45.9 with SMTP id c9mr10483928ibf.73.1318348842195; Tue, 11 Oct 2011 09:00:42 -0700 (PDT) Received: by 10.231.36.69 with HTTP; Tue, 11 Oct 2011 09:00:42 -0700 (PDT) In-Reply-To: <4E944BA5.4080506@lerctr.org> References: <4E942FF1.9000805@FreeBSD.org> <4E9449F2.2000801@FreeBSD.org> <4E944BA5.4080506@lerctr.org> Date: Tue, 11 Oct 2011 09:00:42 -0700 Message-ID: From: Kevin Oberman To: Larry Rosenman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: =?ISO-8859-1?Q?Ren=E9_Ladan?= , freebsd-current@freebsd.org, Dimitry Andric Subject: Re: System headers with clang? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2011 16:00:43 -0000 On Tue, Oct 11, 2011 at 6:59 AM, Larry Rosenman wrote: > On 10/11/2011 8:51 AM, Dimitry Andric wrote: >> >> On 2011-10-11 15:31, Larry Rosenman wrote: >>> >>> On Tue, 11 Oct 2011, Dimitry Andric wrote: >> >> ... >>>> >>>> I've attached a fix for the lsof port, which also makes it build on >>>> 10.0-CURRENT (this was easy to fix here, as lsof uses its own >>>> hand-rolled configuration script). =A0Let me know if it works for you. >>>> >>> Unless the headers are fixed, Vic Abell (lsof Author) will NOT support >>> it. >>> >>> We need to get clang/system headers to allow warning free compilation >>> just like GCC does. >> >> The system headers compile without warning, if you use them as intended >> (e.g. from the kernel), which lsof obviously doesn't do. =A0There is no >> easy workaround here, except by modifying lsof. >> >> For example, the warning about KASSERT is because lsof's headers don't >> include the required headers for this macro. =A0And gcc is apparently no= t >> smart enough to generate warnings for this. :) >> >> In any case, isn't lsof's dlsof.h header full of special cases already? >> What does it matter to add another one? >> >> Besides, even if you fix it in the system headers now, at compile time >> you cannot be sure if the user has the correct version of them installed >> anyway, so you would still have to work around the problem. > > We will NOT support clang as the compiler for lsof unless the system head= ers > work the same way as gcc's do. > > Period. Are asking that clang become bug compatible with gcc or that gcc be fixed to present the same errors as clang does? As a casual observer I really don't expect either to happen soon. (I suspect gcc being fixed SLIGHTLY more likely.) By it's very nature lsof does a lot of the sort of kernel interaction that is normally considered to be unacceptable and requires lots of kludges and hacks to do them. I am simply baffled as to why this issue is so different other then that it is dependent on the compiler used and not the differences between kernels and kernel interfaces. On the other hand, I have not done real kernel programming in years...not since I was writing kernel code in assembly for VMS about 20 years ago, so maybe I am missing some subtleties about this. --=20 R. Kevin Oberman, Network Engineer E-mail: kob6558@gmail.com