Created attachment 24879 [details] Patch The following things are bionic specificities that the gcc source code doesn't handle well: - sincos is not supported - getpagesize is defined as an inline in the headers - prctl is defined with the prototype as per the linux manual page: int prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) and not prctl(int option, ...) as in glibc headers. With the attached patch, I was able to build gcc 4.6.1 for use with the Android NDK.
The libiberty patch is not needed anymore as it is not built for the target.
Note that sincos() was introduced with Android 2.3. The initial version calls sin() then calls cos() so there's no immediate advantage.
So just the getpagesize remains?
(In reply to comment #3) > So just the getpagesize remains? getpagesize is in libiberty, it shouldn't matter anymore (In reply to comment #2) > Note that sincos() was introduced with Android 2.3. The initial version calls > sin() then calls cos() so there's no immediate advantage. As you say, sincos() was introduced with Android 2.3, which means you can build native binaries for that target without the patch, but you can't build native binaries for older targets. There are too many Android < 2.3 devices out there to just ignore the problem.