Cross compiling the X server?

Alexander Gottwald alexander.gottwald at s1999.tu-chemnitz.de
Wed Nov 24 11:12:55 PST 2004


On Wed, 24 Nov 2004, Kendall Bennett wrote:

> Alexander Gottwald <Alexander.Gottwald at s1999.tu-chemnitz.de> wrote:
> 
> > compiling Xorg is quite simple
> > 
> > make World CROSSCOMPILEDIR=/usr/ppc-gnu-linux/bin
> > ...
> > If you still have questions feel free to contact me.
> 
> I do have one question. Is it possible to build the X server and have the 
> binary object files end up in a different directory like it is with most 
> if the GNU tools? I presently build my X trees for x86 on my machine and 
> I would like to be able to cross compile from the same tree but have the 
> binaries be in a different directory

Not directly. But you could do the following

mkdir build-dir
cd build-dir
lndir /path/to/xc 
make World
cd ..
mkdir build-dir2
cd build-dir2
lndir /path/to/xc
make World CROSSCOMPILEDIR=/usr/ppc-gnu-linux/bin
cd ..

or to copy the files which are in CVS use this script

==========
#!/bin/bash

source="$1"
target="$2"
dummy=

if test -z "$source" -o -z "$target"
then
        echo "usage: $0 source target"
        exit -1
fi
find "$source" -regex ".*\/CVS\/Entries" | \
while read entries
do 
         dirname=`echo $entries | sed 's=/CVS/Entries$=='`
         $dummy mkdir -p "$target/$dirname"
         sed -n 's/^\/\([^/]*\)\/.*/\1/p' <$entries | \
         while read file
         do
                $dummy cp "$dirname/$file" "$target/$dirname/$file"
         done
done
==========

call it like 
cd /path/to/xc/..
copycvs xc /path/to/xc-new

bye
	ago
-- 
 Alexander.Gottwald at s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723



More information about the xorg mailing list