Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 2015 13:26:45 +1030
From:      Michael Vale <m.vale@live.com.au>
To:        Adrian Chadd <adrian@freebsd.org>, "bapt@freebsd.org" <bapt@freebsd.org>,  "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>
Subject:   RE: Multi Arch ELF binary/object compiling, linking and more
Message-ID:  <COL130-W3842DE5699003C50A8ACFDC4740@phx.gbl>
In-Reply-To: <COL130-W1677EAC8CAF590A2C4D068C4740@phx.gbl>
References:  <COL130-W1677EAC8CAF590A2C4D068C4740@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry=2C there is more.  I forgot to mention that you can set X_SYSROOT at =
the command line so ports can find the appropriate system headers to build =
from as a part of your firmware.  You can also set DESTDIR to a valid jail =
and set CHROOTED to YES (more on that later) or NO=3Dand specify a subdirec=
tory within your jail to isolate your compilations from what would be a for=
eign HOST environment.  Or you can do what I did and edir Warden to create =
a mips template built from freebsd sources and push your host environment o=
ut into the build environment and have the jail contain only the firmware k=
ernel and userland + the results of any ports you compile and install into =
that jail with DESTDIR CHROOTED=3Dyes

From: m.vale@live.com.au
To: adrian@freebsd.org=3B bapt@freebsd.org=3B freebsd-mips@freebsd.org=3B f=
reebsd-arm@freebsd.org=3B freebsd-embedded@freebsd.org
Subject: Multi Arch ELF binary/object compiling=2C linking and more
Date: Thu=2C 6 Aug 2015 13:20:27 +1030

=0A=
=0A=
=0A=
You can try and read my lyrics off of this paper before I lay 'emBut you wo=
n't take the sting out these words before I say 'emCause ain't no way I'ma =
let you stop me from causing mayhemWhen I say I'ma do something I do it=2CI=
 don't give a damn what you think=2CI'm doing this for me=2C so fuck the wo=
rldFeed it beans=2C it's gassed up=2C if it thinks it's stopping mehttps://=
www.youtube.com/watch?v=3Dj5-yKhDd64s

Hey=2C
Okay here it is.  It's not complete yet=2C but I'm throwing it out there wh=
ile I have the chance.
One can specify the build machine's arch type with ARCH=3D=2C the host (and=
 in turn the build machine if one is not set) with X_BUILD_FOR=3D and also =
finally the target with TARGET=3D.  You can choose to set all three to the =
same arch as the target=2C or whatever pleases you.  Surely if you're smart=
 and doing some wicked fancy things you can benefit from setting different =
archs accordingly=2C if you're accessing these binaries and objects from a =
central storage and utilising resources over a network.
EDIT: What I forgot to mention is=2C to utilize "cross-compiling" allows on=
e to run the same binaries and objects on multiple architectures.  So one w=
ould think the build variable would have to be one of the machine compiling=
 the binaries and objects but that is not the case=2C it has other purposes=
 too.  It has been clear in the GNU and FreeBSD way of things that by retai=
ning the build variable as the one you compile the binary on and setting th=
e HOST variable defines what "other" (sic.) architecture the binaries or ob=
ject execute on when infact by setting HOST=2C you also tend to automatical=
ly adjust TARGET to suit.  The light on this matter is that you can infact =
set an intermediate HOST architecture to the TARGET that allows building ta=
sks assigned to the BUILD variable=2C 'hosting' and 'operating' on the HOST=
 architecture and native execution on the TARGET.  Don't think for one mome=
nt though that you can't set all three BUILD=2C HOST and TARGET to the TARG=
ET architecture and use that binary or object as a development utility=2C h=
ost or native on the desired platform/architecture.
The work is rather complete=2C I've managed to build asterisk=2C kismet and=
 different X11/Xorg servers and all their dependencies.
I haven't begun on slimming down the stage outfits into something suitable =
for embedded flashing and packaging.
https://www.youtube.com/watch?v=3DBE9CXWV1alg
- Michael. 		 	   		   		 	   		  =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?COL130-W3842DE5699003C50A8ACFDC4740>