On 2017/07/19 11:53, Marc Espie wrote: > This adds a few necessary feature, and a future one to discuss. > > What this does is activate -S in a "smart way". > > Namely, the variable substitutions happen in order, so the COMPILER_LIBCXX > will be preferred to LIBCXX and LIBECXX. This also removes the >= part so > that it actually works. > > There's also a new option, -F missing, which I'm not using yet (commented > out), to simplify the mess that pthread is bound to become. > > The idea is to be able to ignore a library while backsubstituting, and to > not show it as extra. > > Note the may_be_missing / cant_be_extra dance. > > > The problem here is that clang uses 'c++ c++abi pthread' > as its C++ wantlib list. This will effectively swallow pthread on > clang architectures. > > The solution I'm proposing is to add pthread to LIBCXX and LIBECXX, > so that effectively, any C++ port will have pthread in its wantlib. > > It's obviously not always correct, but it only errs on the side of > caution. If libpthread gets bumped, a few more packages will notice and > update. > > The extra apparatus is just there so that this should be transparent. > > Does this look reasonable to you ?
Yes. I've thought about the pthread WANTLIB issue for a while and (short of libc++ not having the pthread linkage) this seems the only way to avoid losing pthread deps after a port is updated on a base=clang arch. > Anyway, first step is to verify that this does perform as advertized. > Which is what I want to do with this diff first. I've tested a few variations and it seems to so far. OK with me. One possible minor tweak though: > +.Fl S . > +Allow backsubstituting even if the > +.Ar missing > +library > +is actually not part of the actual > +.Ev WANTLIB > +of the package. > +Mostly used to waive the presence of > +.Ar pthread . Perhaps add something like "which is a dependency of the standard C++ library on some architectures"?
