Commit f6e260d3 authored by David Leonard's avatar David Leonard Committed by Tim Gardner

UBUNTU: [Debian] fix linux_tools when cross-compiling

Fixed invocation of dh_shlibdeps when cross-compiling with
do_linux_tools=true.
Without being told where to find the crossdev libs, dh_shlibdeps
will emit these warnings and fail the linux-tools package:

  Debug: binary-acm7xxx
  ...
  dh_shlibdeps -plinux-headers-4.4.0-15-generic
  arm-linux-gnueabihf-objdump: .../asn1_compiler: File format not recognized
  arm-linux-gnueabihf-objdump: .../extract-cert: File format not recognized
  ...

For example:

archtriple=arm-linux-gnueabihf
         flavour=generic
         dpkg-architecture -t $archtriple -c fakeroot \
                debian/rules \
                binary-$flavour binary-perarch \
                AUTOBUILD=true \
                abi_suffix= \
                do_linux_tools=true \
                do_tools=true \
                do_tools_usbip=false \
                do_tools_cpupower=false \
                do_tools_perf=true \
                do_tools_x86=false
Signed-off-by: default avatarDavid Leonard <david.leonard@opengear.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 60920f1e
......@@ -15,6 +15,8 @@ ifneq ($(gcc),)
kmake += CC=$(CROSS_COMPILE)$(gcc)
endif
shlibdeps_opts = $(if $(CROSS_COMPILE),-- -l$(CROSS_COMPILE:%-=/usr/%)/lib)
$(stampdir)/stamp-prepare-%: config-prepare-check-%
@echo Debug: $@
@touch $@
......@@ -463,7 +465,7 @@ binary-%: install-%
dh_compress -p$(pkgimg)
dh_fixperms -p$(pkgimg) -X/boot/
dh_installdeb -p$(pkgimg)
dh_shlibdeps -p$(pkgimg)
dh_shlibdeps -p$(pkgimg) $(shlibdeps_opts)
$(lockme) dh_gencontrol -p$(pkgimg) -- -Vlinux:rprovides='$(rprovides)'
dh_md5sums -p$(pkgimg)
dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
......@@ -475,7 +477,7 @@ ifeq ($(do_extras_package),true)
dh_compress -p$(pkgimg_ex); \
dh_fixperms -p$(pkgimg_ex) -X/boot/; \
dh_installdeb -p$(pkgimg_ex); \
dh_shlibdeps -p$(pkgimg_ex); \
dh_shlibdeps -p$(pkgimg_ex) $(shlibdeps_opts); \
$(lockme) dh_gencontrol -p$(pkgimg_ex); \
dh_md5sums -p$(pkgimg_ex); \
dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
......@@ -486,7 +488,7 @@ endif
dh_installdocs -p$(pkghdr)
dh_compress -p$(pkghdr)
dh_fixperms -p$(pkghdr)
dh_shlibdeps -p$(pkghdr)
dh_shlibdeps -p$(pkghdr) $(shlibdeps_opts)
dh_installdeb -p$(pkghdr)
$(lockme) dh_gencontrol -p$(pkghdr)
dh_md5sums -p$(pkghdr)
......@@ -499,7 +501,7 @@ ifneq ($(skipsub),true)
dh_installdocs -p$$pkg; \
dh_compress -p$$pkg; \
dh_fixperms -p$$pkg -X/boot/; \
dh_shlibdeps -p$$pkg; \
dh_shlibdeps -p$$pkg $(shlibdeps_opts); \
dh_installdeb -p$$pkg; \
$(lockme) dh_gencontrol -p$$pkg; \
dh_md5sums -p$$pkg; \
......@@ -544,7 +546,7 @@ ifeq ($(do_linux_tools),true)
dh_installdocs -p$(pkgtools)
dh_compress -p$(pkgtools)
dh_fixperms -p$(pkgtools)
dh_shlibdeps -p$(pkgtools)
dh_shlibdeps -p$(pkgtools) $(shlibdeps_opts)
dh_installdeb -p$(pkgtools)
$(lockme) dh_gencontrol -p$(pkgtools)
dh_md5sums -p$(pkgtools)
......@@ -555,7 +557,7 @@ ifeq ($(do_cloud_tools),true)
dh_installdocs -p$(pkgcloud)
dh_compress -p$(pkgcloud)
dh_fixperms -p$(pkgcloud)
dh_shlibdeps -p$(pkgcloud)
dh_shlibdeps -p$(pkgcloud) $(shlibdeps_opts)
dh_installdeb -p$(pkgcloud)
$(lockme) dh_gencontrol -p$(pkgcloud)
dh_md5sums -p$(pkgcloud)
......@@ -680,7 +682,7 @@ ifeq ($(do_linux_tools),true)
dh_installdocs -p$(toolspkg)
dh_compress -p$(toolspkg)
dh_fixperms -p$(toolspkg)
dh_shlibdeps -p$(toolspkg)
dh_shlibdeps -p$(toolspkg) $(shlibdeps_opts)
dh_installdeb -p$(toolspkg)
$(lockme) dh_gencontrol -p$(toolspkg)
dh_md5sums -p$(toolspkg)
......@@ -692,7 +694,7 @@ ifeq ($(do_cloud_tools),true)
dh_installdocs -p$(cloudpkg)
dh_compress -p$(cloudpkg)
dh_fixperms -p$(cloudpkg)
dh_shlibdeps -p$(cloudpkg)
dh_shlibdeps -p$(cloudpkg) $(shlibdeps_opts)
dh_installdeb -p$(cloudpkg)
$(lockme) dh_gencontrol -p$(cloudpkg)
dh_md5sums -p$(cloudpkg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment