[Android] [PATCH 1/7] contrib: Support other Android architectures than ARM

Rafaël Carré funman at videolan.org
Mon Jul 23 16:26:38 CEST 2012


Le 2012-07-23 05:54, Edward Wang a écrit :
> ---
>  contrib/bootstrap    |   17 +++++++++++++++--
>  contrib/src/main.mak |    4 ++--
>  2 files changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/contrib/bootstrap b/contrib/bootstrap
> index 35866aa..4eb558f 100755
> --- a/contrib/bootstrap
> +++ b/contrib/bootstrap
> @@ -216,10 +216,23 @@ case "${OS}" in
>  	*bsd*)
>  		add_make_enabled "HAVE_BSD"
>  		;;
> -	linux-androideabi)
> +	*android*)
>  		check_android_sdk
>  		add_make_enabled "HAVE_LINUX" "HAVE_ANDROID"
> -		add_make "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
> +		case "${HOST}" in
> +			*arm*)
> +			add_make "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
> +			add_make "PLATFORM_SHORT_ARCH := arm"
> +			;;
> +			*i686*)
> +			add_make "PATH = ${ANDROID_NDK}/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
> +			add_make "PLATFORM_SHORT_ARCH := x86"
> +			;;
> +			*mipsel*)
> +			add_make "PATH = ${ANDROID_NDK}/toolchains/mipsel-linux-android-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
> +			add_make "PLATFORM_SHORT_ARCH := mips"
> +			;;
> +		esac
>  		;;
>  	*linux*)
>  		add_make_enabled "HAVE_LINUX"
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 4c4d974..f750970 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -100,8 +100,8 @@ endif
>  endif
>  
>  ifdef HAVE_ANDROID
> -CC :=  $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
> -CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-arm
> +CC :=  $(HOST)-gcc --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-$(PLATFORM_SHORT_ARCH)
> +CXX := $(HOST)-g++ --sysroot=$(ANDROID_NDK)/platforms/android-9/arch-$(PLATFORM_SHORT_ARCH)
>  EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/include
>  EXTRA_CFLAGS += -I$(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_ABI)/include
>  endif
> 

I got "You must set ANDROID_ABI environment variable"

Also HAVE_NEON should not be set


More information about the Android mailing list