On Wed, 6 Jul 2016, Joerg Sonnenberger wrote:
On Wed, Jul 06, 2016 at 03:14:07PM +0100, Stephen Borrill wrote:Error at link time in multimedia/libvpx /usr/bin/ld: vpx_scale/generic/.libs/vpx_scale.c.o: unrecognized relocation (0x2b) in section `.text' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake[1]: *** [Makefile:397: libvpx.a] Error 1 gmake: *** [Makefile:17: .DEFAULT] Error 2 *** Error code 2Assuming this is on i386, it is trying to use the pretty new GOT32X relocation. Since there is a hack in place to force newer binutils's GAS, the assembler creates it, but the (system) linker doesn't support.
I tried various ways to force it to use a different linker, but (mainly) failed. Putting links in .gcc/bin or .tools/bin to /usr/pkg/gnu/bin/ld doesn't help as it still uses /usr/bin/ld
I think the problem is that gcc is built with --with-ld=/usr/bin/ld and so PATH is ignored. The solution is probably one of the following:
1) Create a devel/binutils/override-ld.mk in a similar vein to devel/binutils/override-as.mk that overrides gcc specs to force a different ld that can be used.
2) If on NetBSD < 6 (and other OSes too, I suspect), enforce the link between binutils and pkgsrc gcc so that the linker from binutils is always used.
Thoughts? -- Stephen