Building Gems in Buildroot

I am trying to build a gem - cbor-ruby - inside Buildroot. The cross
compiler is for a PowerPC platform. I am a newbie to Ruby and Rake,
and currently stuck in getting it to cross compile.

The Rakefile is fairly identical to Carsten's Rakefile, except I have
changed the minGW xcompiler to the buildroot variant...

I am looking for some pointers to coax the rakefile to use the
crosscompiler and generate PPC code, not x86_64 code like it does:

linking shared-object cbor/cbor.so
cd -
** Invoke tmp/x86_64-linux/stage/lib/cbor (first_time)
** Execute tmp/x86_64-linux/stage/lib/cbor
mkdir -p tmp/x86_64-linux/stage/lib/cbor
** Invoke tmp/x86_64-linux/stage/ext/cbor/extconf.rb (first_time)
** Invoke tmp/x86_64-linux/stage/ext/cbor (first_time)
** Execute tmp/x86_64-linux/stage/ext/cbor
mkdir -p tmp/x86_64-linux/stage/ext/cbor
** Invoke ext/cbor/extconf.rb (not_needed)
** Execute tmp/x86_64-linux/stage/ext/cbor/extconf.rb
cp ext/cbor/extconf.rb tmp/x86_64-linux/stage/ext/cbor/extconf.rb
** Execute copy:cbor:x86_64-linux:2.7.1
install -c tmp/x86_64-linux/cbor/2.7.1/cbor.so lib/cbor/cbor.so
cp tmp/x86_64-linux/cbor/2.7.1/cbor.so tmp/x86_64-linux/stage/lib/cbor/cbor.so
** Execute compile:cbor:x86_64-linux
** Execute compile:x86_64-linux
** Execute compile
** Invoke cross (first_time)
** Execute cross
+ file tmp/x86_64-linux/cbor/2.7.1/cbor.so
tmp/x86_64-linux/cbor/2.7.1/cbor.so: ELF 64-bit LSB shared object,
x86-64, version 1 (SYSV), dynamically linked,
BuildID[sha1]=00e97dee675c6ec5742b3368dc9c8ad734bcd4de, with
debug_info, not stripped
+ rake build

Rakefile (2.34 KB)

build.sh (567 Bytes)

ยทยทยท

#

Has anyone tried this before?
--
Maurice Smulders