debian/rules: Set CC/LD to enable cross-building
authorElliott Mitchell <ehem+debian@m5p.com>
Fri, 17 Jul 2020 02:07:31 +0000 (19:07 -0700)
committerHans van Kranenburg <hans@knorrie.org>
Sun, 28 Feb 2021 18:53:12 +0000 (19:53 +0100)
Always set $(CC) and $(LD) when building.  This has no effect on native
builds, but is needed for cross-builds to use the right compiler.

Signed-off-by: Elliott Mitchell <ehem+debian@m5p.com>
[Hans van Kranenburg]
Note: instead of using DEB_HOST_MULTIARCH, we have to use
DEB_HOST_GNU_TYPE for CC. This commit is the 'second take' of commit
900c799589
Acked-by: Hans van Kranenburg <hans@knorrie.org>
debian/rules

index a0e269c36f8c6a6572e41f4754ee0135ecd422e1..7a54747ed8b6d3ddda0584f29b313249a1e79a07 100755 (executable)
@@ -135,6 +135,8 @@ dpkg_CPPFLAGS := $(shell $(dbmo) dpkg-buildflags --get CPPFLAGS)
 dpkg_LDFLAGS  := $(shell $(dbmo) dpkg-buildflags --get LDFLAGS)
 
 make_args_common := \
+       CC=$(DEB_HOST_GNU_TYPE)-gcc \
+       LD=$(DEB_HOST_GNU_TYPE)-ld \
        XEN_COMPILE_ARCH=$(xen_arch_$(DEB_BUILD_ARCH)) \
        V=1