From owner-freebsd-current@freebsd.org Fri Aug 16 09:21:26 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 F21A9C6108 for ; Fri, 16 Aug 2019 09:21:26 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 468yVt1gQRz41DM; Fri, 16 Aug 2019 09:21:25 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x7G9LOff029957; Fri, 16 Aug 2019 02:21:24 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x7G9LOtm029956; Fri, 16 Aug 2019 02:21:24 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201908160921.x7G9LOtm029956@gndrsh.dnsmgr.net> Subject: Re: Stop installing /usr/bin/clang In-Reply-To: <20190816091025.GO2738@kib.kiev.ua> To: Konstantin Belousov Date: Fri, 16 Aug 2019 02:21:24 -0700 (PDT) CC: David Chisnall , freebsd-current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 468yVt1gQRz41DM X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.16 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.21)[-0.209,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.16)[0.165,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.26)[0.259,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.05)[ip: (0.15), ipnet: 69.59.192.0/19(0.08), asn: 13868(0.05), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] 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: Fri, 16 Aug 2019 09:21:27 -0000 > On Fri, Aug 16, 2019 at 09:47:41AM +0100, David Chisnall wrote: > > On 15/08/2019 17:48, Konstantin Belousov wrote: > > > Please look at https://reviews.freebsd.org/D21060 > > > I propose to stop installing /usr/bin/clang, clang++, clang-cpp. > > > > > > It probably does not matter when all your software comes from ports or > > > packages, but is actually very annoying when developing on FreeBSD. > > > In particular, you never know which `clang' is called in the user > > > environment, because it depends on the $PATH elements ordering. > > > > What is the confusion here? > Between /usr/bin/clang and /usr/local/bin/clang. Why is that a confusion? Any installed port that overloades a base system component expects to do exactly that type of thing. Why is clang special in this respect? > > The binary that is invoked as clang is from the base system. > Not necessary. > > > The binary that is invoked as clang{version number} is from ports. > This is irrelevant. > > > If the user has built clang from source and has set up > > their path to put that first, then they will get a different clang, but > > there's no way we can stop that kind of behaviour. > This is irrelevant as well. > > You did not read neither review summary nor followups. clang also > comes from devel/llvm. Users that want clang do install it, esp. when > version in base is different. Exactly what is installed from devel/llvm that was not covered below as clang-devel? And why is it any different than any other port of clang listed below? > > For reference, on my machine, I have: > > > > clang <- this one is from the base system > > clang60 <- this one if from ports > > clang70 <- this one if from ports > > clang80 <- this one if from ports > > clang-devel <- this one if from ports > > > > Nothing in my PATH order affects this. > > > > The only source of confusion that I regularly encounter comes from the > > fact that FreeBSD packages install clang80, when every other system > > installs clang-8, so I end up having to have a special case in CMake > > logic for finding specific versions of tools like clang-format on FreeBSD. > > > > That said, I don't know what the impact would be on configure scripts if > > we didn't have a clang binary. CMake seems to run ${CC} -v and parse > > the output, so it's quite happy finding that cc is clang (and the > > specific version). How do most autoconf things handle this? Apple > > shipped a gcc symlink to clang for years because, in the absence of a > > gcc binary, a load of programs detected /usr/bin/cc and decided not to > > enable any GNU extensions. We've managed to avoid having to do that, > > but how many things look for clang, gcc, and cc in the path and enable > > features based on which one they find? > > I plan to ask for exp run with the patch after some more time to gather > feedback. > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Rod Grimes rgrimes@freebsd.org