Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2019 21:36:05 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: funny pathname lookups from the compiler
Message-ID:  <45A65685-12A1-4A30-A5F0-89AF108D972F@FreeBSD.org>
In-Reply-To: <CAGudoHE1HVqKVjXCVLEBbSeXVvrSLLHFwJL%2BGhTHuE5BA0cjjA@mail.gmail.com>
References:  <CAGudoHE1HVqKVjXCVLEBbSeXVvrSLLHFwJL%2BGhTHuE5BA0cjjA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <mjguzik@gmail.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45A65685-12A1-4A30-A5F0-89AF108D972F>