Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Oct 2015 11:17:37 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        FreeBSD Current <current@freebsd.org>, FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: A quick poll
Message-ID:  <20151013111737.7f3f7029@kalimero.tijl.coosemans.org>
In-Reply-To: <E0269659-E2F9-4796-826E-9CDEB18FF35A@bsdimp.com>
References:  <E0269659-E2F9-4796-826E-9CDEB18FF35A@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Oct 2015 12:47:50 -0600 Warner Losh <imp@bsdimp.com> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151013111737.7f3f7029>