Created
March 14, 2015 07:09
-
-
Save ryo1kato/2818a6ecd0164309ccb1 to your computer and use it in GitHub Desktop.
build ruby for android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ue | |
RUBY_SRC='ruby-1.9.3-p551' | |
TARGET_PREFIX='/data/local/tmp/local' | |
export NDK_TOP="/opt/android-ndk-r10d" | |
export SYSROOT="$NDK_TOP/platforms/android-21/arch-arm64" | |
#export CFLAGS="-Ofast" | |
export CC="$NDK_TOP/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc -mandroid --sysroot=$SYSROOT" | |
export XCFLAGS='-fPIC -pie' | |
export XLDFLAGS='-fPIE -pie' | |
config_flags=( | |
--host=arm-linux-eabi | |
--prefix="$TARGET_PREFIX" | |
--disable-ipv6 | |
) | |
mkdir -p android-build-ruby | |
cd android-build-ruby | |
../$RUBY_SRC/configure "${config_flags[@]}" | |
make V=1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment