Article delegate-en/4456 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A4453@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Delegate cross-compillation
20 May 2009 08:06:51 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


In message <_A4453@delegate-en.ML_> on 05/19/09(03:41:25)
you Master NoSFeRaTU <peihqbdyi-j73qrjk4emlr.ml@ml.delegate.org> wrote:
 |Is there exist any way to cross-compile delegate for different
 |platform? I'm trying to compile delegate by maltavista toolchains on
 |x86-64 host for mips-router based on maltavista 2.4.17 linux kernel.
 |But I have problems like:
 |mipsel-uclibc-gcc -DMKMKMK -DDEFCC=\"mipsel-uclibc-gcc\" -I../gen
 |-I../include  -L../lib mkmkmk.c -o mkmkmk.exe
 |"./mkmkmk.exe" -mkmkmk "mipsel-uclibc-gcc" -I../gen -I../include
 |-L../lib maker/mkmake.c -o mkmake.exe
 |/bin/sh: ./mkmkmk.exe: cannot execute binary file
 |make: *** [mkmake.exe] Error 126
 |
 |Of cource I cannot run this file, because it was compiled for
 |different architecture. When I try to play with Makefile for
 |compilling such files which require execution with normal gcc then I
 |stopped here:

I'm doing several cross-compilation for testing and distribution of
binaries for ARM CPU (ARM-Linux/gcc and WindowsCE/VC++).
The following is an example of shell script to do cross-compilation
targetting to Zaurus.

#!/bin/sh
#################### cross compilation of DeleGate ########################
## This is an example of cross compilation of Zaurus binary on MacOSX
## XCC = cross compiler
## DGV = the version of DeleGate
## ADMIN = the administrator of the binary

XCC="/Developer/Zaurus-X-gcc/opt/Embedix/tools/arm-linux/bin"
DGV=delegate9.9.3
ADMIN=me@mydomain

DGZ=$DGV.tar.gz
set -x

if [ ! -d dg-host ]; then
	mkdir dg-host
	gzip -d < $DGZ | tar xf -
	(cd $DGV; tar cf - .) | (cd dg-host; tar xf -)
fi
(
 cd dg-host
 make CC=gcc ADMIN=$ADMIN CFLAGS= CFLAGSPLUS=
 cd src; make ../mkcpp
)

XDG=`pwd`/dg-host/src/delegated
XEMBED=`pwd`/dg-host/src/embed
if [ ! -f $XDG ]; then exit; fi
if [ ! -f $XEMBED ]; then exit; fi

if [ ! -d dg-guest ]; then
	mkdir dg-guest
	gzip -d < $DGZ | tar xf -
	(cd $DGV; tar cf - .) | (cd dg-guest; tar xf -)
fi
(
 cd dg-guest
 cp ../dg-host/mk*.exe .
 cp ../dg-host/filters/mkstab* filters
 cp ../dg-host/src/embed* src
 cp ../dg-host/src/.cksum.embed.c src
 cp ../dg-host/mkcpp .
 export PATH="$XCC:$PATH"
 make CC=gcc ADMIN=$ADMIN XDG=$XDG XEMBED=$XEMBED
)
###########################################################################

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V