New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not build on Android ARM #12
Comments
I only tested ARM builds by cross-compiling with the GNU EABI toolchain. I don't have an Android environment, and setting one up is going to probably take me more time than I am able to devote to such a task. a patch to enable NEON flags on Android would be very welcome. |
just to check, you can use the I can push a patch that blindly adds |
It seems that Android requires `-mfloat-abi=softfp -mfpu=neon` in the compilation flags in order to use the NEON instructions, even if the configure time check passes with `-mfpu=neon` alone. [#12]
there's also the option of reworking the |
build: Add -mfloat-abi=softfp on Android
merged the issues/12 branch; let's see what happens. |
Works now, thanks 😄 |
It unconditionally uses NEON it seems. Not all Android devices have NEON so we need to compile it in conditionally and detect at runtime.
libtool: compile: arm-linux-androideabi-gcc -fuse-ld=gold -DHAVE_CONFIG_H -I. -DGRAPHENE_COMPILATION=1 -DG_LOG_DOMAIN="Graphene" -I../src -I../src -DGRAPHENE_ENABLE_DEBUG --sysroot=/home/jenkins/workspace/cerbero-android/workdir/android-ndk-r9d/platforms/android-9/arch-arm -I/home/jenkins/workspace/cerbero-android/workdir/android-ndk-r9d/platforms/android-9/arch-arm/usr/include -DANDROID -DPIC -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -O3 -ffast-math -fstrict-aliasing -I/home/jenkins/workspace/cerbero-android/workdir/dist/android_arm/include/glib-2.0 -I/home/jenkins/workspace/cerbero-android/workdir/dist/android_arm/lib/glib-2.0/include -fvisibility=hidden -I/home/jenkins/workspace/cerbero-android/workdir/dist/android_arm/include/glib-2.0 -I/home/jenkins/workspace/cerbero-android/workdir/dist/android_arm/lib/glib-2.0/include -Wall -Wshadow -Wstrict-aliasing=2 -Wno-uninitialized -Wcast-align -Wstrict-prototypes -Werror=logical-op -Werror=pointer-arith -Werror=missing-declarations -Werror=redundant-decls -Werror=implicit-function-declaration -Werror=format=2 -Werror=missing-include-dirs -Werror=init-self -Werror=empty-body -Werror=declaration-after-statement -mfpu=neon -Wall -g -Os --sysroot=/home/jenkins/workspace/cerbero-android/workdir/android-ndk-r9d/platforms/android-9/arch-arm -I/home/jenkins/workspace/cerbero-android/workdir/android-ndk-r9d/platforms/android-9/arch-arm/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -mthumb -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -march=armv5te -mtune=xscale -msoft-float -DANDROID -DPIC -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wa,--noexecstack -g -MT libgraphene_1_0_la-graphene-point.lo -MD -MP -MF .deps/libgraphene_1_0_la-graphene-point.Tpo -c graphene-point.c -fPIC -DPIC -o .libs/libgraphene_1_0_la-graphene-point.o
graphene-alloc.c: In function 'graphene_alloc':
In file included from graphene-config.h:38:0,
from graphene-types.h:32,
from graphene-matrix.h:27,
from graphene-matrix.c:35:
/home/jenkins/workspace/cerbero-android/workdir/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
#error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
The text was updated successfully, but these errors were encountered: