Cross-compiling on Linux for iOS -


i trying cross-compile ruby ios devices. have rather lengthy script downloads latest source code ruby, unzips it, , compiles it.

the script follows:

#!/bin/bash rm -rf ~/built/ruby ar=~/toolchain/armv7-apple-darwin11-ar as=~/toolchain/armv7-apple-darwin11-as cc=~/toolchain/armv7-apple-darwin11-clang cxx=~/toolchain/armv7-apple-darwin11-clang++ ld=~/toolchain/armv7-apple-darwin11-ld nm=~/toolchain/armv7-apple-darwin11-nm objdump=~/toolchain/armv7-apple-darwin11-objdump ranlib=~/toolchain/armv7-apple-darwin11-ranlib strip=~/toolchain/armv7-apple-darwin11-strip sdk=/home/citrusui/sdks/iphoneos9.3.sdk cflags="-arch armv7 -arch arm64 -isysroot $sdk" ldflags="-wl,-segalign,4000" destdir=~/built/ruby/var/stash  apt install autoconf bison clang jq xutils-dev curl https://api.github.com/repos/ruby/ruby/tags -o ruby.json url=`jq -r 'map(select(.name != "yarv_migration_base"))[0].tarball_url' ruby.json` tag=`jq -r 'map(select(.name != "yarv_migration_base"))[0].name' ruby.json` echo "downloading $url"... if [ -f ruby_$tag.tar.gz ] && [ -d ruby-ruby* ]; echo "already downloaded." cd ruby-ruby* autoconf ./configure --host=armv7-apple-darwin11 -target=armv7-apple-darwin11 cc="$cc" cxx="$cxx" cxxflags="$cflags" cflags="$cflags" strip=$strip ranlib=$ranlib nm=$nm ar=$ar as=$as ld=$ld objdump=$objdump ldflags="$ldflags" destdir="$destdir"  make install -j4 cd ~/built/ruby lndir var/stash exit 0 fi curl -l $url -o ruby_$tag.tar.gz tar -xvzf ruby_$tag.tar.gz cd ruby-ruby* autoconf ./configure --host=armv7-apple-darwin11 -target=armv7-apple-darwin11 cc="$cc" cxx="$cxx" cxxflags="$cflags" cflags="$cflags" strip=$strip ranlib=$ranlib nm=$nm ar=$ar as=$as ld=$ld objdump=$objdump ldflags="$ldflags" destdir="$destdir"  make install -j4 cd ~/built/ruby lndir var/stash 

now, have downloaded ios 9.3 sdk xcode , dropped ~/sdks/ folder. however, compiling process still results in elf format binaries.

i have toolchain (in ~/toolchain/) downloaded here. assume allow llvm/clang produce arm(64) binaries, don't know how tell clang process toolchain. specifying $toolchain in ./configure doesn't help, either.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -