Browse Source

build: default to armv7+vfpv3 for android

Also add Android build instructions to the README.

PR-URL: https://github.com/iojs/io.js/pull/1307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v1.8.0-commit
Giovanny Andres Gongora Granada 10 years ago
committed by Ben Noordhuis
parent
commit
65d4d25f52
  1. 1
      .gitignore
  2. 11
      README.md
  3. 10
      android-configure
  4. 7
      configure

1
.gitignore

@ -54,6 +54,7 @@ deps/icu*.zip
deps/icu*.tgz deps/icu*.tgz
deps/icu-tmp deps/icu-tmp
./node_modules ./node_modules
android-toolchain/
.svn/ .svn/
# generated by gyp on Windows # generated by gyp on Windows

11
README.md

@ -140,6 +140,17 @@ To run the tests:
> vcbuild test > vcbuild test
``` ```
### Android / Android based devices, aka. Firefox OS
Be sure you have downloaded and extracted [Android NDK]
(https://developer.android.com/tools/sdk/ndk/index.html)
before in a folder. Then run:
```
$ ./android-configure /path/to/your/android-ndk
$ make
```
### `Intl` (ECMA-402) support: ### `Intl` (ECMA-402) support:
[Intl](https://github.com/joyent/node/wiki/Intl) support is not [Intl](https://github.com/joyent/node/wiki/Intl) support is not

10
android-configure

@ -3,15 +3,15 @@
export TOOLCHAIN=$PWD/android-toolchain export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \ $1/build/tools/make-standalone-toolchain.sh \
--toolchain=arm-linux-androideabi-4.7 \ --toolchain=arm-linux-androideabi-4.9 \
--arch=arm \ --arch=arm \
--install-dir=$TOOLCHAIN \ --install-dir=$TOOLCHAIN \
--platform=android-9 --platform=android-9
export PATH=$TOOLCHAIN/bin:$PATH export PATH=$TOOLCHAIN/bin:$PATH
export AR=arm-linux-androideabi-ar export AR=$TOOLCHAIN/bin/arm-linux-androideabi-ar
export CC=arm-linux-androideabi-gcc export CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++ export CXX=$TOOLCHAIN/bin/arm-linux-androideabi-g++
export LINK=arm-linux-androideabi-g++ export LINK=$TOOLCHAIN/bin/arm-linux-androideabi-g++
./configure \ ./configure \
--dest-cpu=arm \ --dest-cpu=arm \

7
configure

@ -431,7 +431,8 @@ def is_arch_armv7():
return ('__ARM_ARCH_7__' in cc_macros_cache or return ('__ARM_ARCH_7__' in cc_macros_cache or
'__ARM_ARCH_7A__' in cc_macros_cache or '__ARM_ARCH_7A__' in cc_macros_cache or
'__ARM_ARCH_7R__' in cc_macros_cache or '__ARM_ARCH_7R__' in cc_macros_cache or
'__ARM_ARCH_7M__' in cc_macros_cache) '__ARM_ARCH_7M__' in cc_macros_cache or
'__ARM_ARCH_7S__' in cc_macros_cache)
def is_arch_armv6(): def is_arch_armv6():
@ -508,6 +509,10 @@ def configure_arm(o):
o['variables']['arm_thumb'] = 0 # -marm o['variables']['arm_thumb'] = 0 # -marm
o['variables']['arm_float_abi'] = arm_float_abi o['variables']['arm_float_abi'] = arm_float_abi
if options.dest_os == 'android':
o['variables']['arm_fpu'] = 'vfpv3'
o['variables']['arm_version'] = '7'
# Print warning when snapshot is enabled and building on armv6 # Print warning when snapshot is enabled and building on armv6
if is_arch_armv6() and options.with_snapshot: if is_arch_armv6() and options.with_snapshot:
warn('when building on ARMv6, don\'t use --with-snapshot') warn('when building on ARMv6, don\'t use --with-snapshot')

Loading…
Cancel
Save