aboutsummaryrefslogtreecommitdiff
path: root/package/pv/pv.mk
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-10-06 18:30:33 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2013-10-06 20:40:25 +0200
commit1980bf056e16c604c1f33ce9771d725da096cfe7 (patch)
treee263fe851c949759ad084099a26932b7b59227c6 /package/pv/pv.mk
parentd57d4a8ede2949f5a02d90528392bf34a2ec8a81 (diff)
downloadbuildroot-1980bf056e16c604c1f33ce9771d725da096cfe7.tar.gz
buildroot-1980bf056e16c604c1f33ce9771d725da096cfe7.tar.bz2
pv: fix build issue with some toolchains
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 custom values for LD and LDFLAGS, we ensure that 'gcc' is used to do these partial linking steps. Fixes the following build failures (x86-64 and mips64) : http://autobuild.buildroot.org/results/9ac/9aca276a220ad1460e5b32bd042dd4c93649baf3/build-end.log http://autobuild.buildroot.org/results/910/91044c01dcc3c4150aa6e74f5964fff27b9dac79/build-end.log Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pv/pv.mk')
-rw-r--r--package/pv/pv.mk11
1 files changed, 10 insertions, 1 deletions
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))