From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/638 Path: main.gmane.org!not-for-mail From: Charlie Brady Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Cross compiling for VIA C3? Date: Wed, 1 Dec 2004 00:17:03 -0500 (EST) Message-ID: References: <20041122150713.3620.qmail@1ea4ad0a283034.315fe32.mid.smarden.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1101878235 32279 80.91.229.6 (1 Dec 2004 05:17:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2004 05:17:15 +0000 (UTC) Original-X-From: supervision-return-877-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Dec 01 06:17:08 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14] ident=qmailr) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1CZMrU-0006SC-00 for ; Wed, 01 Dec 2004 06:17:08 +0100 Original-Received: (qmail 13369 invoked by uid 76); 1 Dec 2004 05:17:28 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 13363 invoked from network); 1 Dec 2004 05:17:28 -0000 X-X-Sender: charlieb@e-smith.charlieb.ott.istop.com Original-To: supervision@list.skarnet.org In-Reply-To: <20041122150713.3620.qmail@1ea4ad0a283034.315fe32.mid.smarden.org> Xref: main.gmane.org gmane.comp.sysutils.supervision.general:638 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:638 On Mon, 22 Nov 2004, Gerrit Pape wrote: > Yes, the runit package's build process (just as the daemontools' one) > includes some tests to configure system dependencies. This includes > three runtime tests where a test program is compiled, linked, and then > run. These runtime tests obviously won't work when cross-compiling. > > More precisely it's the targets hasshsgr.h:, iopause.h:, and uint64.h:, > in the Makefile which test setgroups(), poll(), and the size of uint64, > to select *.h1 or *.h2 respectively. You can compile and link the test > programs, and then run them on the target device to check the exit code > and choose the correct header. Once you learn (or guess) the correct header files to use, you can fully script the build process. The only trick is creating the required header files at the right time. Here is my build script for a cross-compile of runit (for mipsel linux on i386): make clean echo $GCC -O -Wall > conf-cc echo $GCC -s > conf-ld make compile load choose cat iopause.h1 > iopause.h cat uint64.h1 > uint64.h make chkshsgr cat hasshsgr.h1 > hasshsgr.h make