Re: dietlibc with android ndk

Felix von Leitner <[email protected]> Mon, 27 Oct 2014 04:00:20 +0100
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
> I tried to compile dietlibc for target "android" with android-ndk-r9d:

> make ARCH=arm CROSS=/tbin/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
> all > log.txt 2>&1

> and got the attached logfile.

> I need advice how to handle these errors, because the mentioned functions can i find in dietlibc.

> Where is the problem?

It looks like the gcc environment on Android is different than on
regular Linux.

gcc comes with a small run-time environment that is linked to all
binaries, even dietlibc ones.  This run-time is called libgcc, and these
error message indicate that it references symbols that are not found in
dietlibc.

Some of the symbols are definitely exported by dietlibc, so something
fundamental is wrong here.  My guess is that "androideabi" is not
compatible with the ABI that dietlibc implements on ARM.

I have no idea how to fix this.  It may be necessary to do a separate
port of dietlibc to support this ABI.

> Host: Linux x86_64 GNU/Linux
> Target: Linux 3.0.64-OMNI-g81a30c3-dirty armv7l GNU/Linux

I wonder if regular arm-linux dietlibc programs run on Android.
They ought to, if Google did not meddle with the syscall ABI.

Felix