Re: Cross-building for ARM: experience report and some questions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Apr 05, 2018 at 04:04:33PM +0100, Wookey wrote:
Hi, and thanks, Wookey!
> On 2018-04-05 16:28 +0200, tomas@tuxteam.de wrote:
> > Hi,
> >
> > I just tried to cross-build a package for Debian armhf [...]
[...]
> > Now the (for me) stumbling blocks and questions:
> >
> > - Need to set CC
> >
> > Yes, the warning was clear enough, but I was a bit surprised
> > I had to set CC like so:
> >
> > CC=arm-linux-gnueabihf-gcc dpkg-buildpackage -uc -us -b --host-arch armhf
>
> The debian packaging should do this for you. Report a bug.
I'll have to report that bug to myself then :-)
> The rules files should arrange for CC=$(DEB_HOST_GNU_TYPE)-gcc
Thanks for setting me off in the right direction!
> > For some reason I expected the --host-arch to pick the right
> > default compiler.
>
> No, it just sets the correct dpkg-architecture variables and dpkg/apt
> multiarch resolving context. The rules file still has to set the
> correct environment variables.
>
> There was some discussion about dpkg-buildpackage or debhelper setting
> $CC (and other vars), but I don't think that has happened.
I see. I think having it in debian/rules is fair enough, for me
at least..
> > - Is there something like build-depends?
> >
> > I'm spoiled by apt-get build-dep [...]
> yes: apt build-dep -a armhf <package>
>
> So long as all the dependencies have correct multiarch metadata then
> that should just work.
Woah: more magic! Thanks :-)
Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlrGPE8ACgkQBcgs9XrR2kZdUgCfSFSQjeCtgmkVqpCEo8fZOgBh
OAUAn1BPiKCPfA2lofuGE3mjq3yeBMCJ
=giji
-----END PGP SIGNATURE-----
Reply to: