diff options
Diffstat (limited to 'xcomp/erl-xcomp-arm-android.conf')
-rw-r--r-- | xcomp/erl-xcomp-arm-android.conf | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/xcomp/erl-xcomp-arm-android.conf b/xcomp/erl-xcomp-arm-android.conf index 44ff7537d3..6d25d48f0a 100644 --- a/xcomp/erl-xcomp-arm-android.conf +++ b/xcomp/erl-xcomp-arm-android.conf @@ -2,7 +2,7 @@ ## ## %CopyrightBegin% ## -## Copyright Ericsson AB 2009-2010. All Rights Reserved. +## Copyright Ericsson AB 2009-2019. All Rights Reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ ## ## %CopyrightEnd% ## -## File: erl-xcomp.conf.template -## Author: +## File: erl-xcomp-arm-android.conf +## Author: Dmitry Kolesnikov ## ## ----------------------------------------------------------------------------- ## When cross compiling Erlang/OTP using `otp_build', copy this file and set @@ -60,14 +60,21 @@ erl_xcomp_host=arm-linux-androideabi # * `erl_xcomp_configure_flags' - Extra configure flags to pass to the # `configure' script. -erl_xcomp_configure_flags="--disable-hipe --without-termcap" +# Set --enable-builtin-zlib to avoid a inflateGetDictionary missing symbol +erl_xcomp_configure_flags="--disable-hipe --without-termcap --without-wx \ + --enable-builtin-zlib" ## -- Cross Compiler and Other Tools ------------------------------------------- ## ## -NDK_SYSROOT=$NDK_ROOT/platforms/$NDK_PLAT/arch-arm +# Previously with older Android NDK versions before NDK r14, each Android +# API level had a different set of headers, each in its own directory. +#NDK_SYSROOT=$NDK_ROOT/platforms/$NDK_PLAT/arch-arm +# Starting with Android NDK r14, a single set of headers (called Unified Headers) +# is provided in one location for every Android API level. +NDK_SYSROOT=$NDK_ROOT/sysroot ## If the cross compilation tools are prefixed by `<HOST>-' you probably do ## not need to set these variables (where `<HOST>' is what has been passed as @@ -76,10 +83,15 @@ NDK_SYSROOT=$NDK_ROOT/platforms/$NDK_PLAT/arch-arm ## All variables in this section can also be used when native compiling. # * `CC' - C compiler. -CC="arm-linux-androideabi-gcc --sysroot=$NDK_SYSROOT" +# +# For older Android NDK versions still supporting GCC. +#CC="arm-linux-androideabi-gcc --sysroot=$NDK_SYSROOT" +# For more recent Android NDK versions only supporting Clang/LLVM. +#NDK_ABI_PLAT=androideabi16 # when targeting Android 4.1 Jelly Bean +CC="armv7a-linux-$NDK_ABI_PLAT-clang" # * `CFLAGS' - C compiler flags. -CFLAGS="-static -march=armv7-a -msoft-float -mthumb" +CFLAGS="-g -O2 -march=armv7-a -mfloat-abi=softfp -mthumb" # * `STATIC_CFLAGS' - Static C compiler flags. #STATIC_CFLAGS= @@ -90,22 +102,38 @@ CFLAGS="-static -march=armv7-a -msoft-float -mthumb" #CFLAG_RUNTIME_LIBRARY_PATH= # * `CPP' - C pre-processor. -CPP="arm-linux-androideabi-cpp --sysroot=$NDK_SYSROOT" +# +# For older Android NDK versions still supporting GCC. +#CPP="arm-linux-androideabi-cpp --sysroot=$NDK_SYSROOT" +# Not needed when using Clang/LLVM. +#CPP= # * `CPPFLAGS' - C pre-processor flags. -CPPFLAGS="-static -march=armv7-a -msoft-float -mthumb" +# +# For older Android NDK versions still supporting GCC. +#CPPFLAGS="-static -march=armv7-a -msoft-float -mthumb" +# Not needed when using Clang/LLVM. +#CPPFLAGS= # * `CXX' - C++ compiler. -CXX="arm-linux-androideabi-c++ --sysroot=$NDK_SYSROOT" +# +# For older Android NDK versions still supporting GCC. +#CXX="arm-linux-androideabi-c++ --sysroot=$NDK_SYSROOT +# For more recent Android NDK versions only supporting Clang/LLVM. +CXX="armv7a-linux-$NDK_ABI_PLAT-clang++" # * `CXXFLAGS' - C++ compiler flags. -CXXFLAGS="-static -march=armv7-a -msoft-float -mthumb" +CXXFLAGS="-march=armv7-a -mfloat-abi=softfp -mthumb" # * `LD' - Linker. +# +# Not needed when using GCC. #LD= +# For more recent Android NDK versions only supporting Clang/LLVM. +LD="arm-linux-androideabi-ld" # * `LDFLAGS' - Linker flags. -LDFLAGS="-static -march=armv7-a -msoft-float -mthumb" +LDFLAGS="-march=armv7-a -mfloat-abi=softfp -mthumb" # * `LIBS' - Libraries. #LIBS= |