Porting Ruby 1.9 to Openmoko
Cesar Eduardo Barros
cesarb at cesarb.net
Fri Aug 8 13:05:25 CEST 2008
sparky mat escreveu:
> I tried compiling Ruby 1.9.0-3
> (ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-3.tar.gz) with the
> following commands:
>
> ./configure
> --prefix=/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/usr
> --host=arm-angstrom-linux-gnueabi
> make
>
> When I examine the executables created (using 'file <executable name>')
> it shows its a x86 binary. Also, I checked the build logs and I see that
> though it tries to take the libraries from the path specified in
> --prefix, it skips them and continues (to the x86 ones in /usr/lib/ i
> guess).
>
> So in conclusion, the 'CC', 'LD' , etc. are all pointing to the ones in
> '/usr/bin' . How do I change this? Do I manually change them in the
> Makefile? Do I pass CC='<path to ARM gcc>' LD='<path to ARM ld>' to
> ./configure? If so, don't I need to pass other commands too? Which all
> and isn't there a better way?
You should at least change the PATH to include where the cross-compiler
is (if you are using MokoMakefile/OE/bitbake, check one of the
build/tmp/work/*/*/temp/run.* files for a good value for PATH). If that
isn't enough for configure to autodetect the cross-compiler, you might
have to pass CC=, LD=, and so on to configure (but I'd try without them
first, hoping configure is smart enough to try to call $(HOST)-gcc first
before trying gcc).
--
Cesar Eduardo Barros
cesarb at cesarb.net
cesar.barros at gmail.com
More information about the support
mailing list