This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add Android related compilation options and multilib options
On Tuesday 16 June 2009, Ian Lance Taylor wrote:
> Richard Guenther <richard.guenther@gmail.com> writes:
> > On Tue, Jun 16, 2009 at 2:50 AM, Jing Yu<jingyu@google.com> wrote:
> >> This patch does three things:
> >>
> >> 1. Add -mandroid option to the compiler.
> >> (This part was originally written by Doug Kwan dougkwan@google.com
> >> for gcc-4.3.1)
> >> With this option, users can easily compile programs for android.
> >> Suppose arm-eabi-gcc is built with android sysroot. Then we can use a
> >> simple command to compile a program:
> >> eg. arm-eabi-gcc -mandroid hello.c -o hello
> >
> > Why don't you add android as a os variant and configure
> > for a arm-eabi-android target instead?
>
> That is what Doug Kwan proposed originally, and Mark Mitchell said this:
>
> http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01795.html
>
> I try to avoid approving Google patches, but now different maintainers
> are just jerking around the Android folks. That is unfair.
>
> What do we want to do here?
If android is just a random collection of target options, then I don't see why
we have -mandroid in the first place. It's no different to any other RTOS, of
which there are many. If it it's actually something that needs compile time
alterations then it should be a different target triplet.
I'm definitely opposed to adding an android multilib to any of the default arm
configs.
If you want to rework the multilib machinery to allow building arbitrary
multilibs without hacking t-*, then that's probably ok, but nothing to do with
android.
The -mthumb-interwork bits are just plain wrong. Interworking is a mandatory
part of the EABI, so this option should never be used.
Paul