develooper Front page | perl.perl5.porters | Postings from August 2012

Cross compiling thoughts from FreeBSD

From:
Nicholas Clark
Date:
August 15, 2012 07:56
Subject:
Cross compiling thoughts from FreeBSD
Message ID:
20120815145616.GW9583@plum.flirble.org
I saw this go by and thought it might be of some interest here.
Specifically the part about build systems and custom tools.

----- Forwarded message from Ian Lepore <freebsd@damnhippie.dyndns.org> -----

Date: Wed, 15 Aug 2012 08:10:37 -0600
From: Ian Lepore <freebsd@damnhippie.dyndns.org>
To: Warner Losh <imp@bsdimp.com>
Cc: freebsd-arm@freebsd.org
Subject: Re: Building ARM ports (was Re: Globalscale Dreamplug and 8.3 RELEASE)
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port

On Tue, 2012-08-14 at 20:44 -0600, Warner Losh wrote:
> On Aug 14, 2012, at 6:35 PM, Adrian Chadd wrote:
> 
> > Guys/girls/etc,
> > 
> > OpenWRT manages it. They started from the ground up with having to cross-build.
> > 
> > Just because the problem is hard to tackle doesn't mean we shouldn't try.
> 
> Agreed.  I worry the qemu solution sounds simple, but really will be harder.  Prove me wrong :)
> 
> > There's like a dozen half-done attempts at this. I realise you can't
> > address _all_ the ports at once, but surely starting with a small
> > subset and working outward is doable.
> > 
> > I'll put up a bounty for anyone who actually comes up with a basic
> > framework for supporting cross-building ports, documents how it
> > does/doesn't work (eg if things like build vs run dependencies) and
> > has a basic design for how to slowly fix ports to support it.
> 
> I have the basics, and have for years.  I've posted them several times.  The trouble is that they are very very basic and need more work.  I think you'll need to define the problem a little better before progress can be made.
> 
> Warner

The system we use at work is basically Warner's (at least I think he put
the bulk of it in place years ago).  It involves defining a bunch of
environment variables that change how ports are built (I want to say
"fools" or "tricks" the ports into using cross-tools, but the negative
implications of those words may just reflect my ignorance of the
details).

The biggest problem we have is build versus run dependencies.  When
crossbuilding port foo to run on arm, that port decides it needs the
compile_a_foo port to build the code, so it goes off and cross-builds
compile_a_foo, then wants to run the resulting arm binaries on the x86
host.  The only way I know of to fix that is to tediously identify and
pre-build all the build-time requirements needed by any port you intend
to cross-build.  Ports that have their own build systems and custom
tools are essentially impossible to work with.

-- Ian


_______________________________________________
freebsd-arm@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"

----- End forwarded message -----

Nicholas Clark



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About