Android NDK r6b with Linaro GCC (4.6.2) with neon fixes, Graphite and Python-capable GDB.

668 views
Skip to first unread message

mingw.android

unread,
Dec 5, 2011, 7:21:48 AM12/5/11
to android-ndk
Hi,

I'm pleased to announce a new release of my own version of the Android
NDK (based on r6b for now). I've rebuilt *everything* from source
(apart from a few Windows-only tools from the gnuwin32 project) for
both arm and x86. The links are:

http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50.20110709-binutils-2.22.51-linux-x86.7z
http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50.20110709-binutils-2.22.51-darwin-x86.7z
http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50.20110709-binutils-2.22.51-windows.7z

Features and differences from the offical NDK:

GCC 4.6.2 20110004 (arm and x86):
* Full Graphite support (auto-parallelisation has not been tested yet
- may prove interesting for Tegra-3)
* Better (i.e. finally usable) neon intrinsics support.
GCC 4.4.3 (arm and x86):
* Rebuilt with some Graphite support.
Binutils 2.22.51:
* Assembles neon instructions correctly.
GDB 7.3.50.20110709:
* Python scripting support (http://labs.qt.nokia.com/2010/04/22/peek-
and-poke-vol-3/)
* Includes Google's changes for threaded debugging.
* vfp registers supported.
NDK:
* Windows: ndk-build can be run from cmd.exe (add <install-dir>/
android-ndk-r6b/cmd-exe-tools to your path, this is similar to what
Google are doing since r7, but not based on their work).
* ndk-gdb has work arounds for problems with custom ROMs (run-as
failure) and some other issues.

I provide toolchains for the Necessitas Qt Creator project (IMHO far
and away the best IDE for Android NDK development), but these
toolchains aren't included with that yet. Before this happens I'll
give them some more testing.

If you're not liking Eclipse much and miss a fully featured, fast IDE
then Necessitas Qt Creator (you can fully use this for non-Qt based
apps) can be found at:

http://sourceforge.net/p/necessitas/home/necessitas/

Cheers,

Ray Donnelly.

mrzerg

unread,
Dec 8, 2011, 11:12:33 PM12/8/11
to android-ndk
cool... would like to try it out

On 12月5日, 下午8时21分, "mingw.android" <mingw.andr...@gmail.com> wrote:
> Hi,
>
> I'm pleased to announce a new release of my own version of the Android
> NDK (based on r6b for now). I've rebuilt *everything* from source
> (apart from a few Windows-only tools from the gnuwin32 project) for
> both arm and x86. The links are:
>

> http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....

snk_kid

unread,
Dec 9, 2011, 5:04:05 PM12/9/11
to android-ndk
Thanks for this, I've been testing this out over last few nights. One
thing I had problem with is when using gcc 4.6 and gnustl_static for
gnu c++ standard library the symbolic link points to cxx-stl-4.4.3
instead of cxx-stl-4.6.2 this caused me some headaches. Is there
anything else we should be aware of when trying using gcc 4.6, C++11
features/libraries and gnustl?

On Dec 5, 12:21 pm, "mingw.android" <mingw.andr...@gmail.com> wrote:
> Hi,
>
> I'm pleased to announce a new release of my own version of the Android
> NDK (based on r6b for now). I've rebuilt *everything* from source
> (apart from a few Windows-only tools from the gnuwin32 project) for
> both arm and x86. The links are:
>

> http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....

mingw android

unread,
Dec 12, 2011, 5:28:29 AM12/12/11
to andro...@googlegroups.com
You should be able to set NDK_TOOLCHAIN to 4.6.2, but I think you have
to manage the cxx-stl link yourself. When I upgrade to NDK r7(b -
probably) I'll make sure correct cxx-stl folder is used.

AFAIK there is nothing else to be aware of. The toolchain originates
from the Linaro 4.6.2 Android toolchain 2011.11 (with some of my own
patches).

> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To post to this group, send email to andro...@googlegroups.com.
> To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
>

dnick

unread,
Dec 13, 2011, 2:08:23 PM12/13/11
to andro...@googlegroups.com
Thanks a lot for your NDK version - it really saved me a lot of time with neon issues! I use it for release builds now.

One more thing I've made - just replaced standard `ld` linker with `gold` linker (I keep them both and switch via '-B' option to g++).
This brought me ~x8 faster linking time (very useful when previous link time was about 2min)).

PS.
little issue: there's not enough some mingw dlls for ndk-stack.exe, but with working addr2line that is not problem.

mingw android

unread,
Dec 13, 2011, 2:46:14 PM12/13/11
to andro...@googlegroups.com


On Dec 13, 2011 7:08 PM, "dnick" <nick.d...@gmail.com> wrote:
>
> Thanks a lot for your NDK version - it really saved me a lot of time with neon issues! I use it for release builds now.

Only for release builds? How come?


>
> One more thing I've made - just replaced standard `ld` linker with `gold` linker (I keep them both and switch via '-B' option to g++).

> This brought me ~x8 faster linking time (very useful when previous link time was about 2min).

I don't build gold yet, which version did you use?


>
> PS.
> little issue: there's not enough some mingw dlls for ndk-stack.exe, but with working addr2line that is not problem.

Ah yeah I upgraded my mingw compilers to some very latest ones. Ill put the needed dlls for ndk-stack in the right place next time.


>
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/M0H9ofJi0NAJ.

dnick

unread,
Dec 13, 2011, 4:10:57 PM12/13/11
to andro...@googlegroups.com

> Thanks a lot for your NDK version - it really saved me a lot of time with neon issues! I use it for release builds now.

Only for release builds? How come?

*even for release builds =), it was crunch time.. our 'asm' neon math (iOS tested) failed (possibly because of https://groups.google.com/d/topic/android-ndk/kswM7TCOm0E/discussion).. and suddenly with your help we got x3 fps with 'intrinsics' for a lot of devices). I still didn't tried - does gdb work.
 

> One more thing I've made - just replaced standard `ld` linker with `gold` linker (I keep them both and switch via '-B' option to g++).
> This brought me ~x8 faster linking time (very useful when previous link time was about 2min).

I don't build gold yet, which version did you use?

--version
GNU gold (GNU Binutils 2.22) 1.11
it works fine with r6b/r7 toolchains too.

mingw android

unread,
Dec 13, 2011, 4:33:10 PM12/13/11
to andro...@googlegroups.com


On Dec 13, 2011 9:11 PM, "dnick" <nick.d...@gmail.com> wrote:
>>
>> > Thanks a lot for your NDK version - it really saved me a lot of time with neon issues! I use it for release builds now.
>>
>> Only for release builds? How come?
>
> *even for release builds =), it was crunch time.. our 'asm' neon math (iOS tested) failed (possibly because of https://groups.google.com/d/topic/android-ndk/kswM7TCOm0E/discussion).. and suddenly with your help we got x3 fps with 'intrinsics' for a lot of devices). I still didn't tried - does gdb work.

3x? Nice. Intrinsics really are awesome. Gdb certainly does work, as does gdbtui. For the best dev experience, use necessitas qt creator.


>  
>>
>> > One more thing I've made - just replaced standard `ld` linker with `gold` linker (I keep them both and switch via '-B' option to g++).
>> > This brought me ~x8 faster linking time (very useful when previous link time was about 2min).
>>
>> I don't build gold yet, which version did you use?
>
> --version
> GNU gold (GNU Binutils 2.22) 1.11
> it works fine with r6b/r7 toolchains too.

Ok but from where did you get this?


>
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/PuKhzdzlaD8J.

snk_kid

unread,
Dec 14, 2011, 7:18:08 PM12/14/11
to android-ndk
Hi, I'm trying to use the x86 toolchains for android-x86. When I try
to build the SDL libraries using the x86-4.6.2 toolchain I get a link
error about a missing object file what looks likes a c-runtime file,
crti.o however the library builds fine with the x86-4.4.3 toolchain
with all the same settings in my Application.mk/Android.mk files.

On Dec 5, 12:21 pm, "mingw.android" <mingw.andr...@gmail.com> wrote:

> Hi,
>
> I'm pleased to announce a new release of my own version of the Android
> NDK (based on r6b for now). I've rebuilt *everything* from source
> (apart from a few Windows-only tools from the gnuwin32 project) for
> both arm and x86. The links are:
>

> http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50....

mingw android

unread,
Dec 14, 2011, 7:43:18 PM12/14/11
to andro...@googlegroups.com

x86 4.6.2? Ive not tried that myself. If you post your project files and a link to the sdl sources, ill take a look.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.

snk_kid

unread,
Dec 15, 2011, 8:52:41 AM12/15/11
to android-ndk
Download SDL 1.3 from here: http://www.libsdl.org/hg.php, my
Application.mk is:

NDK_TOOLCHAIN := x86-4.6.2
APP_ABI := x86
APP_STL := gnustl_static
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -frtti

Changing the toolchain to 4.4.3 builds fine. I'm sure all those
variables related to C++ compiler have very little to no influence on
building SDL as it's predominately a C library.

On Dec 15, 12:43 am, mingw android <mingw.andr...@gmail.com> wrote:
> x86 4.6.2? Ive not tried that myself. If you post your project files and a
> link to the sdl sources, ill take a look.

> On Dec 15, 2011 12:18 AM, "snk_kid" <korcan.huss...@googlemail.com> wrote:
>
>
>
>
>
>
>
> > Hi, I'm trying to use the x86 toolchains for android-x86. When I try
> > to build the SDL libraries using the x86-4.6.2 toolchain I get a link
> > error about a missing object file what looks likes a c-runtime file,
> > crti.o however the library builds fine with the x86-4.4.3 toolchain
> > with all the same settings in my Application.mk/Android.mk files.
>
> > On Dec 5, 12:21 pm, "mingw.android" <mingw.andr...@gmail.com> wrote:
> > > Hi,
>
> > > I'm pleased to announce a new release of my own version of the Android
> > > NDK (based on r6b for now). I've rebuilt *everything* from source
> > > (apart from a few Windows-only tools from the gnuwin32 project) for
> > > both arm and x86. The links are:
>

> >http://mingw-and-ndk.googlecode.com/files/android-ndk-r6b-gdb-7.3.50......

mingw android

unread,
Dec 15, 2011, 9:02:15 AM12/15/11
to andro...@googlegroups.com

Did you use mklink to point sources/cxx-stl to sources/cxx-stl-4.6.2?

snk_kid

unread,
Dec 15, 2011, 9:11:47 AM12/15/11
to android-ndk
I used the GUI right-click menu option "Make Link", I don't know if it
does/doesn't use mklink. I just noticed one thing, I get the same
linker error consistently when building any shared library (C or C++)
but if the library is built as a static library it builds fine.

On Dec 15, 2:02 pm, mingw android <mingw.andr...@gmail.com> wrote:
> Did you use mklink to point sources/cxx-stl to sources/cxx-stl-4.6.2?

snk_kid

unread,
Dec 15, 2011, 9:18:05 AM12/15/11
to android-ndk
By the way I'm using Fedora 16 (in a VM) and it looks like mklink is
not installed and doesn't exist in the official fedora yum repos. It
may also worth mentioning that using arm gcc 4.6.2 toolchain also
works fine, just x86 gcc 4.6.2 toolchain I'm having problems with.

mingw android

unread,
Dec 15, 2011, 9:35:01 AM12/15/11
to andro...@googlegroups.com

Ah sorry, 'ln -s cxx-stl-4.6.2 cxx-stl' in fedora.

You could always go native though as I build this for all 3 major oses!

snk_kid

unread,
Dec 15, 2011, 9:51:55 AM12/15/11
to android-ndk
Yeah I did that after I wrote my message, still getting the same
linker error, I'm just reading this http://stackoverflow.com/questions/91576/crti-o-file-missing
wondering if the setup.mk for x86-4.6.2 toolchain is incorrect but I
can't find the file crti.o anywhere within the root of android-ndk
folder, it's not in the x86-4.4.3 toolchain but they all have similar
object files like crtbegin/end.o so maybe this tool-chain has been
built incorrectly?

Yeah I know you got binaries for Windows but I don't want to install
cygwin and it's just generally painful to dev/building open source
libraries meant for GNU tools/Posix environment in Windows even with
cygwin. I'm better off using a real linux distro with a good package
system in a VM, I've got the computing power for it, a 4-core CPU with
support for virtualization and 8GB of RAM.

On Dec 15, 2:35 pm, mingw android <mingw.andr...@gmail.com> wrote:
> Ah sorry, 'ln -s cxx-stl-4.6.2 cxx-stl' in fedora.
>
> You could always go native though as I build this for all 3 major oses!

mingw android

unread,
Dec 15, 2011, 9:57:57 AM12/15/11
to andro...@googlegroups.com

Msys is what I use on windows instead of cygwin. Thanks for the report btw, i'll make sure it all works in the next version.

Halsafar

unread,
Jul 11, 2012, 6:08:47 PM7/11/12
to andro...@googlegroups.com
How does one include the STL in a custom build of the NDK toolchains?

I can compile everything fine for GCC 4.6 for all architectures but no STL support comes through.
Reply all
Reply to author
Forward
0 new messages