On Mon, May 29, 2017 at 06:54:52PM +0100, Stuart Henderson wrote:
> On 2017/05/29 20:26, Vadim Zhukov wrote:
> > The clang and gcc behave differently regarding executing tools.
> > While gcc simply runs what he said to, clang tries to be clever
> > and always find absolute path for a tool, refusing start otherwise.
> > 
> > The actual problem is starting a linker: ports infrastructure
> > expects tools are called by name, not by path, and thus could be
> > overriden via stuff in ${WRKDIR}/bin. This functionality is used,
> > e.g., to implement USE_WXNEEDED port option.
> > 
> > But clang calls "/usr/bin/ld", not "ld", and thus ${WRKDIR}/bin/ld
> > misses a chance to do its magic, and binaries are built without
> > OPENBSD_WXNEEDED, and some ports blow up (when compiled using clang).
> 
> One thing we _could_ do is pass -fuse-ld=${WRKDIR}/bin/ld when linking ..

Just -B ${WRKDIR}/bin should be enough and cover other tools like as as
needed.

Joerg

Reply via email to