pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc cross compiling



Luca Sironi <luca%sironi.tk@localhost> writes:

> 2012/2/25 Reinoud Zandijk <reinoud%netbsd.org@localhost>:
>> I've added a pkgsrc cross compiling howto in the pkgsrc/doc dir that i used
>> for i386->sparc and amd64->arm.
>
> Is it possible to set up some machines running other operating systems
> as distcc helper?

I think there are two things going on:

  A) using distcc to invoke a cross compiler, but doing the build native

  B) cross-compiling packages on one machine for another

A requires distcc plumbing (about which I am not yet clear) and B is
much harder.

> I've got some linux and os x machines that can quite help me to build
> packages for netbsd.

I don't see why distcc can't be used cross os or cross arch

> 2) create a crosscompiler to compile from any architecture to NetBSD/sparc,
> go to the NetBSD src dir and run :
>         ./build.sh -a sparc -m sparc -T /usr/gcc-cross-sparc/ tools
>
> work on other platforms, provided that i do take netbsd src folder ?

That should work.   That will give you a toolchain, but not the headers.

The next step is to tell distcc where the toolchain is and that it
should use it.  As I understand it, distcc does not have support for
calling different compilers on different machines.   So you probably
have to have the same cross toolchain built on all distcc remote nodes,
and to use that same name for the build machine, even if it isn't
cross.  (This seems like a significant shortcoming in distcc; I expected
it to have some mapping scheme that cc on host A was foo-bar-cc-4.1 on
host B.)

Note that pkgsrc has built-in distcc support.  As far as I know, it
doesn't address the cross name issue, but I haven't studied it enough
yet.


Attachment: pgpR3zYQeCHCU.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index