Hi, all
I want to build a simple C code like "Hello World" and run it on the Snapdagon 855 Android.
I folowed the instructions of the LLVM
https://developer.qualcomm.com/download/sdllvm/readme-snapdragon-llvm.pdf
I have android-ndk-r17 with the Snapdragon LLVM ARM Compiler 6.0.2 for Android NDK installed in it.
The detail is:
Windows (64-bit) ;
Cygwin-x86_64; which path is: C:\cygwin64
android-ndk-r17; which path is:C:\android-ndk-r17
-----------------------------------------------------------
My main issue is the how to compile and link. My command is:
/cygdrive/c/android-ndk-r17/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -nostdlib -march=armv7-a -mcpu=cortex-a8 -marm --target=arm-linux-androideabi -gcc-toolchain C:\\android-ndk-r17\\toolchains\\arm-linux-androideabi-4.9\\prebuilt\\linux-x86_64 --sysroot=C:\\android-ndk-r17\\sysroot\\usr\\lib hello.c -o hello.exe -I C:\\android-ndk-r17\\sysroot\\usr\\include -I C:\\android-ndk-r17\\sources\\cxx-stl\\llvm-libc++\\include -I C:\\android-ndk-r17\\sysroot\\usr\\include\\arm-linux-androideabi -v -lc
Then I got errors:
/usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: i386pep i386pe
-------------------------------------------------------------------------------------
I tried command below which is only added by "-fuse-ld=qcld":
/cygdrive/c/android-ndk-r17/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe ... -v -fuse-ld=qcld -lc
Then I got errors:
I think there is someting error about linker, can anyone give me some help, thanks a lot!!!!