This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Cross compiling libffi for powerpc32?


Hi,

Yes - I was finally able to compile it. Here is what I used:

./configure --prefix=/store/users/lab/Ltib-mpc8548cds-20071214/rootfs/usr/ --target=powerpc-linux-gnuspe --host=powerpc-linux-gnuspe --build=i686-pc-linux-gnu

Also, after the configure, something was wrong with the header files, so I had to manually make symbolic links of ffitarget.h and ffi.h to /usr/include on target rootfs.

And, the question I asked - whether powerpc32 is supported turned out to be answerable with a yes.

It's just that the documentation keeps referring to powerpc64, and fails to mention that the code for powerpc64 is actually 32/64 capable and I think it is selecting the correct mode in compile-time.

Amit

Amit Margalit | SW Team Leader
Siverge Networks Ltd

5 Maskit st. Herzelia Pituah 46733 Israel
Tel:    +972-9-9526612
Fax:    +972-9-9560993
Mobile: +972-52-6390012
Web:   www.siverge.com
E-mail: Amit.Margalit@siverge.com
                                        
                               Leading Networking One Chip Forward
> -----Original Message-----
> From: Anthony Green [mailto:green@redhat.com]
> Sent: ה 22 ינואר 2009 16:12
> To: Amit Margalit
> Cc: libffi-discuss@sourceware.org
> Subject: Re: Cross compiling libffi for powerpc32?
> 
> Amit Margalit wrote:
> > Hello,
> >
> > I am trying to cross-compile libffi-3.0.8, and meeting strong resistance ;-)
> >
> > My target is powerpc-unknown-linux-gnuspe. It is a MPC8543_E, with Embedded Linux (used Ltib from
> Freescale to generate it).
> >
> > Some questions:
> > 1. Is powerpc32 supported?
> > 2. How should I configure to cross-compile?
> >
> > Here's my configure line:
> > ./configure --prefix=/store/users/lab/Ltib-mpc8548cds-20071214/rootfs/usr/ --target=powerpc-
> linux-gnuspe --host=i686-pc-linux-gnu
> 
> Did you try:
> 
> "--host=powerpc-linux-gnuspe" instead of "--target=powerpc-linux-gnuspe
> --host=i686-pc-linux-gnu"?
> 
> For GNU libraries, "host" is actually supposed to refer to the system
> that will host the resulting binary.  So, for instance, host==target
> when building target libraries in the GNU toolchain.
> 
> AG
> 
> 
> 
> >
> > My environment is set this way:
> > setenv LD powerpc-linux-gnuspe-ld
> > setenv NM powerpc-linux-gnuspe-nm
> > setenv AR powerpc-linux-gnuspe-ar
> > setenv AS powerpc-linux-gnuspe-as
> > setenv CC powerpc-linux-gnuspe-gcc
> > setenv CPP powerpc-linux-gnuspe-cpp
> > setenv CXX powerpc-linux-gnuspe-g++
> > setenv HOST powerpc-linux-gnuspe
> > setenv STRIP powerpc-linux-gnuspe-strip
> > setenv RANLIB powerpc-linux-gnuspe-ranlib
> > setenv OBJCOPY powerpc-linux-gnuspe-objcopy
> >
> > setenv OPT -Os
> > setenv LDFLAGS -fPIC
> > setenv CROSS_COMPILE yes
> > setenv PATH ${PATH}:/opt/freescale/usr/local/gcc-4.1.78-eglibc-2.5.78-dp-1/powerpc-linux-
> gnuspe/bin
> > setenv ARCH powerpc
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Amit Margalit | SW Team Leader
> > Siverge Networks Ltd
> >
> > 5 Maskit st. Herzelia Pituah 46733 Israel
> > Tel:    +972-9-9526612
> > Fax:    +972-9-9560993
> > Mobile: +972-52-6390012
> > Web:   www.siverge.com
> > E-mail: Amit.Margalit@siverge.com
> >
> >                                Leading Networking One Chip Forward
> >
> > #####################################################################################
> > This e-mail message has been scanned for Viruses and Content and cleared
> > by MailMarshal it@siverge.com
> > #####################################################################################

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal it@siverge.com
#####################################################################################


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]