List Info

Thread: Cross-compiling for PPC?




Cross-compiling for PPC?
user name
2006-12-01 20:02:52
I'm trying to cross-compile libXML2 to run on an embedded
system running
Linux on a PPC - does anybody have a pointer to a good
cross-compiling
guide for libXML2?

The target system has an NFS file system and shared
libraries, so it's
just a matter of me not knowing what to tell configure so it
knows I'm
cross-compiling.

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
Cross-compiling for PPC?
user name
2006-12-01 20:04:37
David Hagood wrote:

>I'm trying to cross-compile libXML2 to run on an
embedded system running
>Linux on a PPC - does anybody have a pointer to a good
cross-compiling
>guide for libXML2?
>
>The target system has an NFS file system and shared
libraries, so it's
>just a matter of me not knowing what to tell configure
so it knows I'm
>cross-compiling.
>  
>
This is the script I use to build for an ARM platform.  I
can't imagine 
that PPC would be significantly different....

You probably don't want to use soft-float and change CC to
whatever your 
cross-compiler is called.

export CFLAGS="-msoft-float -L$ROOTDIR/$PLATFORM/lib
-I$ROOTDIR/../include"
export LDFLAG="-lz"
export CC=arm-linux-gcc

make clean

./configure 
        --host=arm-linux 
        --target=arm-linux 
        --build=i686-pc-linux-gnu 
        --prefix=/ 
        --exec-prefix=/ 

&& make  
&& cp -a ./.libs/libxml2.so* $ROOTDIR/$PLATFORM/lib

&& cp -a include/libxml $ROOTDIR/../include
&& arm-linux-strip --strip-unneeded
$ROOTDIR/$PLATFORM/lib/libxml2*

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
Cross-compiling for PPC?
user name
2006-12-01 20:43:52
>
> This is the script I use to build for an ARM platform. 
I can't imagine
> that PPC would be significantly different....
>
> You probably don't want to use soft-float and change CC
to whatever your
> cross-compiler is called.
>
> export CFLAGS="-msoft-float
-L$ROOTDIR/$PLATFORM/lib
> -I$ROOTDIR/../include"
> export LDFLAG="-lz"
> export CC=arm-linux-gcc
>

That got me pointed in the right direction. I needed to pass
"-Xlinker
--rpath-link=<where my PPC libs are found>" to
make configure happy.

Thanks!

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )