From owner-freebsd-current@freebsd.org Tue Aug 20 19:36:07 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE7B2D9E29 for ; Tue, 20 Aug 2019 19:36:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46CgyH4PF6z3Jql; Tue, 20 Aug 2019 19:36:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 5EC8D1C2F5; Tue, 20 Aug 2019 19:36:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [192.168.178.61] (unknown [194.76.129.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 461671B8; Tue, 20 Aug 2019 21:36:06 +0200 (CEST) From: Dimitry Andric Message-Id: <45A65685-12A1-4A30-A5F0-89AF108D972F@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_42AFA089-FEB2-4A6E-B9BB-D4BF0DD879E9"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: funny pathname lookups from the compiler Date: Tue, 20 Aug 2019 21:36:05 +0200 In-Reply-To: Cc: FreeBSD Current To: Mateusz Guzik References: X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 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, 20 Aug 2019 19:36:07 -0000 --Apple-Mail=_42AFA089-FEB2-4A6E-B9BB-D4BF0DD879E9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 20 Aug 2019, at 20:24, Mateusz Guzik wrote: > > Interested parties can collect this on their own: > > dtrace -n 'vfs:namei:lookup:entry /execname == "ld.lld" || execname == > "cc"/ { @[stringof(arg1)] = count(); }' > > and cc hello.c or similar elsewhere. > > Full list is here: > http://dpaste.com/2YM1R41 > > Highlights of fishy entries for me: > /proc/self/fd 1 > /etc/SuSE-release 3 > /etc/alpine-release 3 > /etc/arch-release 3 > /etc/debian_version 3 > /etc/exherbo-release 3 > /etc/gentoo-release 3 > /etc/lsb-release 3 > /etc/malloc.conf 3 > /etc/redhat-release 3 > > I don't know this code but I strongly suspect most of this can be easily > ifdef-ed out. The first one perhaps can be disabled with a switch to > configure. > > None of this is a significant problem of course, but it does look like a > waste. Yes, it is an annoying detail of the Distro class in contrib/llvm/tools/clang/lib/Driver/Distro.cpp, where it is trying to look up the "distro", since Linux makes that so very very easy. :-) I would recommend filing an upstream bug report at https://bugs.llvm.org/, and/or submit a patch at https://reviews.llvm.org/. -Dimitry --Apple-Mail=_42AFA089-FEB2-4A6E-B9BB-D4BF0DD879E9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXVxLpQAKCRCwXqMKLiCW o8NeAKCeeK3VjSxBDEFiQ58ZK1Wm/trXuQCfWPrj5OvIV3yD4sEFEijauYLrV/o= =uMVI -----END PGP SIGNATURE----- --Apple-Mail=_42AFA089-FEB2-4A6E-B9BB-D4BF0DD879E9--