A quick poll

Tijl Coosemans tijl at FreeBSD.org
Tue Oct 13 09:19:04 UTC 2015


On Mon, 12 Oct 2015 12:47:50 -0600 Warner Losh <imp at bsdimp.com> wrote:
> The topic of including /usr/local in the paths for compilers, linkers,
> etc has come up again. I’ve started a poll to judge sentiment in the
> community about what the default policy of FreeBSD should be in this
> regard.
> 
> 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’ve
> installed from ports.
> 
> I make no judgement over which one is “correct” since I can understand
> the argument on both sides.
> 
> So I’ve 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’ll
> 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_fbsd.x
SEARCH_DIR("=/usr/local/i386-portbld-freebsd11.0/lib");
SEARCH_DIR("=/lib");
SEARCH_DIR("=/usr/lib");
SEARCH_DIR("=/usr/local/lib");


So whatever is decided, at least make all compilers/linkers consistent
and let them search directories in the same order.


More information about the freebsd-current mailing list