From owner-freebsd-stable@freebsd.org Tue Oct 13 09:19:03 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF85AA113D8; Tue, 13 Oct 2015 09:19:03 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay101.isp.belgacom.be (mailrelay101.isp.belgacom.be [195.238.20.128]) by mx1.freebsd.org (Postfix) with ESMTP id 25220F68; Tue, 13 Oct 2015 09:19:02 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=on0vsgdz1NEtXcMZlQwg/MwbIQQ3jhei9UjQb9HCs8o= c=1 sm=2 a=7Qk2ozbKAAAA:8 a=6I5d2MoRAAAA:8 a=b3cQk7Ea5mLVsm062zIA:9 a=QEXdDO2ut3YA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ATJgBoyxxW/zhosVtdgyZUXw+/dx2CdoIKfwKBPT0QAQEBAQEBAYEKQQEEAYNgAQEEIzMjEAsYAgIFIQICDyoeBgESFIgeAax2k1wBAQEBAQEBAwEBAQEBAQEXBIEiilGEWjMHgmmBRQEElhaFGYJwhQlimy44K4IRHYFWPDOCc4E6gkQBAQE Received: from 56.104-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.104.56]) by relay.skynet.be with ESMTP; 13 Oct 2015 11:17:48 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id t9D9HbX6001998; Tue, 13 Oct 2015 11:17:38 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Tue, 13 Oct 2015 11:17:37 +0200 From: Tijl Coosemans To: FreeBSD Current , FreeBSD Stable Subject: Re: A quick poll Message-ID: <20151013111737.7f3f7029@kalimero.tijl.coosemans.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 09:19:03 -0000 On Mon, 12 Oct 2015 12:47:50 -0600 Warner Losh wrote: > The topic of including /usr/local in the paths for compilers, linkers, > etc has come up again. I=E2=80=99ve started a poll to judge sentiment in = the > community about what the default policy of FreeBSD should be in this > regard. >=20 > This topic has been much debated in the past. Those against it generally > believe that it pollutes the namespace to include /usr/local/* by > default. The defaults should only include what we include in the system > to avoid accidents. Those for it say that it has become standard in > other projects and that makes it easier for people porting software to > FreeBSD as well as making it easier for users to use stuff they=E2=80=99ve > installed from ports. >=20 > I make no judgement over which one is =E2=80=9Ccorrect=E2=80=9D since I c= an understand > the argument on both sides. >=20 > So I=E2=80=99ve created this poll https://reviews.freebsd.org/V6 to gage = opinion > of the project and its users. If I did things right, the poll is open to > everybody. The poll will be used as data, but I make no promises about > what will happen with this data. The poll will sat for 2 weeks, and I=E2= =80=99ll > publish the results here. The current situation is bit messed up. The base system compiler and the Clang/LLVM ports don't search /usr/local, but lang/gcc* does. It searches /usr/local/include (actually PREFIX/include) *before* /usr/include: % cpp49 -v < /dev/null ... #include <...> search starts here: /usr/local/lib/gcc49/gcc/i386-portbld-freebsd11.0/4.9.3/include /usr/local/include /usr/local/lib/gcc49/gcc/i386-portbld-freebsd11.0/4.9.3/include-fixed /usr/include And ld from devel/binutils (used by lang/gcc*) searches /usr/local/lib *after* /usr/lib: % grep SEARCH /usr/local/i386-portbld-freebsd11.0/lib/ldscripts/elf_i386_fb= sd.x SEARCH_DIR("=3D/usr/local/i386-portbld-freebsd11.0/lib"); SEARCH_DIR("=3D/lib"); SEARCH_DIR("=3D/usr/lib"); SEARCH_DIR("=3D/usr/local/lib"); So whatever is decided, at least make all compilers/linkers consistent and let them search directories in the same order.