Building 64-bit app with r9d

206 views
Skip to first unread message

frank smith

unread,
Apr 15, 2014, 7:14:48 PM4/15/14
to andro...@googlegroups.com

I installed the GCC 4.8 toolchain and an trying to build a 64-bit version of an app.

I tested that this toolchain would continue building the 32-bit version and it did.

However when trying to build the 64-bit version "ld" bombed out with "Unknown CPU architecture

CC = /opt/ndk_llvm_3_4/bin/arm-linux-androideabi-gcc

CFLAGS=-O3
#CFLAGS+=-march=armv7-a -mfloat-abi=softfp -mfpu=neon
CFLAGS+=-march=armv8-a
LDFLAGS=-march=armv8-a

all: stream_c.exe

stream_c.exe: stream.c
        $(CC) $(CFLAGS) stream.c -o stream_c.exe

/opt/ndk_llvm_3_4/bin/arm-linux-androideabi-gcc -O3 -march=armv8-a stream.c -o stream_c.exe
/opt/ndk_llvm_3_4/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: /tmp/ccKENWtW.o: unknown CPU architecture
collect2: error: ld returned 1 exit status
make: *** [stream_c.exe] Error 1


David Turner

unread,
Apr 17, 2014, 5:10:42 AM4/17/14
to andro...@googlegroups.com
64-bit support is not officially supported by the NDK at this point.

In your specific example, even if the compiler (LLVM) supports armv8-a (and trust me, the generated code is very very poor with the version you have), other parts of the toolchain (e.g. the linker in this case) also need to be modified / upgraded to support it. Same goes for other 64-bit architectures (Intel and mips).


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages