From nobody Fri Jul 16 17:16:35 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96E62127C268 for ; Fri, 16 Jul 2021 17:16:37 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GRHw53pbyz3NfL for ; Fri, 16 Jul 2021 17:16:37 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 6587E2F5A4 for ; Fri, 16 Jul 2021 17:16:37 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.1.202] (host86-191-32-244.range86-191.btcentralplus.com [86.191.32.244]) by smtp.theravensnest.org (Postfix) with ESMTPSA id 72C3E2ADB2 for ; Fri, 16 Jul 2021 18:16:36 +0100 (BST) Subject: Re: PATH: /usr/local before or after /usr ? To: freebsd-current@freebsd.org References: <20210716155004.d2qiciqkipmegs3j@FreeBSDY540> From: David Chisnall Message-ID: Date: Fri, 16 Jul 2021 18:16:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 In-Reply-To: <20210716155004.d2qiciqkipmegs3j@FreeBSDY540> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 16/07/2021 16:50, Cameron Katri via freebsd-current wrote: > On Fri, Jul 16, 2021 at 09:01:49AM -0600, Alan Somers wrote: >> FreeBSD has always placed /usr/local/X after /usr/X in the default PATH. >> AFAICT that convention began with SVN revision 37 "Initial import of 386BSD >> 0.1 othersrc/etc". Why is that? It would make sense to me that >> /usr/local/X should come first. That way programs installed from ports can >> override FreeBSD's defaults. Is there a good reason for this convention, >> or is it just inertia? > The biggest example I can think of this being a problem is having > binutils installed, it will cause any calls to elftoolchain or > llvm-binutils to go to GNU binutils which is platform specific, so cross > compiling, or LTO could be broken because of using GNU binutils which > don't support cross compiling or LTO. FWIW: In about 20 years of using FreeBSD, my $PATH has always had /usr/local/bin before /usr/bin and I have never once encountered a problem from this. If I install something from ports that's already in the base system, it's invariably because I want to use it in preference to the base-system version. David