[uClibc] Bug 385, add Thumb support to ARM
John Bowler
jbowler at acm.org
Fri Aug 19 04:23:12 UTC 2005
From: Mike Frysinger [mailto:vapier at gentoo.org]
>on the topic of the toolchain, it seemed odd to add a bunch of
>defined(__thumb__) checks to the code ... does that mean if you compile for
>thumb targets the __arm__ preprocessor is not defined ?
That's correct (__arm__ is not defined if -mthumb). Makes sense too - what
can you do under the protection of __arm__ which will work if the compiler
is writing thumb code? (Notice that the places where I simply added this
were for the most part places where there were a whole load of other
processor tests in the same #if, in one or two places I did it because the
thumb instruction has an ASCII representation which is identical to the
corresponding ARM instruction...)
>going back to the question i posed on the bug, it seems like a good idea to
me
>if we add a new config option to Target Architecture Features and Options
for
>arm targets:
>[ ] Compile code using thumb
>i know you can easily override CC with automated build systems such as OE,
but
>not everyone uses automated build systems ;)
Well, just so long as it doesn't stop CC="foo -mthumb" working...
Specifically if *not* setting the option resulted in -mno-thumb later on in
the command line - that would be bad news.
The other point about this, though, is that -mthumb-interwork is a more
important decision - if that isn't specified then it simply won't be
possible to run any thumb (or, with -mthumb, arm) code. So -mthumb affects
how uclibc gets built, but -mthumb-interwork affects whether thumb (or arm)
code will run at all.
John Bowler <jbowler at acm.org>
More information about the uClibc
mailing list