Can't compile with meson for Android
I'm trying to build pixman for Android using the following cross file: android_cross.txt
[host_machine]
system = 'android'
cpu_family = 'arm'
cpu = 'arm'
endian = 'little'
[constants]
ndk_root = '/path/to/ndk/21.4.7075529'
build_machine = 'linux-x86_64'
target = 'armv7a-linux-androideabi28'
[properties]
sys_root = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'sysroot'
ndk-sources-path = ndk_root/'sources'
[built-in options]
default_library = 'static'
c_args = ['--target=' + target, '-fno-integrated-as']
c_link_args = ['--target=' + target]
cpp_args = ['--target=' + target, '-fno-integrated-as']
cpp_link_args = ['--target=' + target]
[binaries]
c = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/clang'
cpp = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/clang++'
ar = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/llvm-ar'
ld = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/llvm-ld'
objcopy = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/llvm-objcopy'
strip = ndk_root/'toolchains/llvm/prebuilt'/build_machine/'bin/llvm-strip'
[pixman:project options]
cpu-features-path = ndk_root/'sources/android/cpufeatures'
#arm-simd = 'disabled'
#neon = 'disabled'
But i'm getting the following error:
/path/to/android-sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -
Ipixman/libpixman-arm-simd.a.p -Ipixman -I../pixman -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSE
T_BITS=64 -Wall -Winvalid-pch -O2 -g -Wdeclaration-after-statement -fno-strict-aliasing -fvisibilit
y=hidden -Wundef -ftrapping-math -Wno-unused-local-typedefs -DHAVE_CONFIG_H --target=armv7a-linux-a
ndroideabi28 -fPIC -MD -MQ pixman/libpixman-arm-simd.a.p/pixman-arm-simd-asm.S.o -MF pixman/libpixm
an-arm-simd.a.p/pixman-arm-simd-asm.S.o.d -o pixman/libpixman-arm-simd.a.p/pixman-arm-simd-asm.S.o
-c ../pixman/pixman-arm-simd-asm.S
<instantiation>:1:1: error: unknown directive
.func fname
^
../pixman/pixman-arm-simd-asm.h:599:5: note: while in macro instantiation
pixman_asm_function fname
^
/tmp/pixman-arm-simd-asm-0ff417.s:913:1: note: while in macro instantiation
generate_composite_function pixman_composite_src_8888_8888_asm_armv6, 32, 0, 32, FLAG_DST_WRITEONLY
| FLAG_COND_EXEC | FLAG_SPILL_LINE_VARS_WIDE | FLAG_PROCESS_PRESERVES_SCRATCH, 4, blit_init, nop_m
acro, nop_macro, blit_process_head, nop_macro, blit_inner_loop
^
../pixman/pixman-arm-simd-asm.h:614:6: error: expected absolute expression
.if prefetch_distance == 0
^
/tmp/pixman-arm-simd-asm-0ff417.s:913:1: note: while in macro instantiation
generate_composite_function pixman_composite_src_8888_8888_asm_armv6, 32, 0, 32, FLAG_DST_WRITEONLY
| FLAG_COND_EXEC | FLAG_SPILL_LINE_VARS_WIDE | FLAG_PROCESS_PRESERVES_SCRATCH, 4, blit_init, nop_m
acro, nop_macro, blit_process_head, nop_macro, blit_inner_loop
^
../pixman/pixman-arm-simd-asm.h:620:6: error: expected absolute expression
.if src_bpp == 32
^
Edited by BogDan Vatra