diff --git a/package/pv/pv.mk b/package/pv/pv.mk index a8b2651709..00502d3b4e 100644 --- a/package/pv/pv.mk +++ b/package/pv/pv.mk @@ -9,6 +9,15 @@ PV_SOURCE = pv-$(PV_VERSION).tar.bz2 PV_SITE = http://www.ivarch.com/programs/sources PV_LICENSE = Artistic-2.0 PV_LICENSE_FILES = doc/COPYING -PV_MAKE_OPT = LD=$(TARGET_LD) # otherwise 'ld' is used + +# While 'pv' uses autoconf, it does not use automake for its +# makefiles. It uses $(LD) $(LDFLAGS) to achieve partial linking, but +# using 'ld' directly doesn't work well with some toolchain +# configuration, as the ld default emulation may not necessarily be +# the correct one. By passing the below values for LD and LDFLAGS, we +# ensure that 'gcc' is used to do these partial linking steps. +PV_MAKE_OPT = \ + LD=$(TARGET_CC) \ + LDFLAGS="-Wl,-r -nostdlib" $(eval $(autotools-package))