Created attachment 203658 [details] patch Setting GSSAPILDFLAGS for USES=gssapi causes -L/usr/lib to be added to LDFLAGS. This breaks compilation of some ports, like www/squid on GCC architectures when new GCC from ports needs to be used. The new GCC tries to link to libstdc++ and fails. Not setting it explicitely causes /usr/local/lib/gcc8/libstdc++.so to be taken instead and /usr/lib is searched for libraries anyway, just with lower priority. Tested on powerpc64 and amd64 on www/squid.
This probably requires exp-run.
The patch doesn't look good, it should probably set GSSAPILDFLAGS to an empty value
Created attachment 205968 [details] v2 Ok, here's the new patch. Just as a side note, I build the whole ports tree for powerpc64 at https://talos.anongoth.pl/build.html?mastername=powerpc64-default&build=2019-07-21_11h14m38s with this patch and it pretty much works.
Exp-run looks fine
A commit references this bug: Author: pkubaj Date: Fri Nov 29 22:11:34 UTC 2019 New revision: 518677 URL: https://svnweb.freebsd.org/changeset/ports/518677 Log: Mk/Uses/gssapi.mk: don't set GSSAPILDFLAGS for USES=gssapi Setting GSSAPILDFLAGS for USES=gssapi causes -L/usr/lib to be added to LDFLAGS. This breaks compilation of some ports, like www/squid on GCC architectures when new GCC from ports needs to be used. The new GCC tries to link to libstdc++ and fails. Not setting it explicitely causes /usr/local/lib/gcc8/libstdc++.so to be taken instead and /usr/lib is searched for libraries anyway, just with lower priority. Tested on powerpc64 and amd64 on www/squid. PR: 237275 Approved by: mentors (implicit approval), hrs (maintainer timeout) Changes: head/Mk/Uses/gssapi.mk