This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Support arm-android-eabi
- From: Mark Mitchell <mark at codesourcery dot com>
- To: "Doug Kwan (éæå)" <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 30 Jun 2008 21:27:33 -0700
- Subject: Re: [PATCH][ARM] Support arm-android-eabi
- References: <498552560806271116o2f5618f6m230c1453dfa873c4@mail.gmail.com> <48656BAA.9080107@codesourcery.com> <498552560806281105y4b57ba94p53d375cb5cafed3a@mail.gmail.com> <4867D662.2040203@codesourcery.com> <498552560806291228q25344823k4c3a9644c45f1cf2@mail.gmail.com> <4867E4D9.8040503@codesourcery.com> <498552560806301522l721a55d6qc31cf0e929f7e825@mail.gmail.com>
Doug Kwan (éæå) wrote:
2008-06-30 Doug Kwan <dougkwan@google.com>
* config/arm/arm.opt (mandroid): New option.
* config/arm/bpabi.h (ANDROID_LINK_SPEC): New macro.
(LINK_SPEC): Enable Android specific behaviour when -mandroid is used.
(CC1_SPEC): Same.
(CC1PLUS_SPEC): Same.
(LIB_SPEC): Same.
(STARTFILE_SPEC): Same.
(ENDFILE_SPEC): Same.
(TARGET_BPABI_CPP_BUILTINS): Define __ANDROID__ when -mandroid is
used.
This version looks reasonable to me. But, I want to allow the ARM
backend maintainers a chance to comment. If you don't hear anything in
a week, please ping me.
Is it acceptable to add code in arm's backend to recognize
"*-android-*" in DEFAULT_TARGET_MACHINE and turn on -mandroid
automatically?
I don't know. Do we do that in any other backend? In my ideal world,
there'd be a "--with-options=" option to configure that would cause the
driver to assume those options appeared on every command-line. Then,
you could just configure with that. For example:
configure --with-options="-mandroid -meb"
would be a way of saying that:
gcc -c foo.c
should be treated as equivalent to:
gcc -mandroid -meb -c foo.c
Maybe the string passed in could be a specs string which would allow a
bit more power, potentially.
Thoughts?
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713