From: "Joseph S. Myers" <joseph@codesourcery.com>
To: "Doug Kwan (關振德)" <dougkwan@google.com>
Cc: gcc@gcc.gnu.org
Subject: Re: [RFC][i*86]appropriate target triplet for Android on x86?
Date: Fri, 19 Mar 2010 22:53:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1003192235370.2023@digraph.polyomino.org.uk> (raw)
In-Reply-To: <498552561003191453x60c5c431v9f8bb8981ea7a336@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2015 bytes --]
On Fri, 19 Mar 2010, Doug Kwan (Ãö®¶¼w) wrote:
> Hi,
>
> I would like to get some advice on handling Android for x86 in
> tool configurations. Android is based on Linux but it is exactly the
> same, so some customizations are required. There was a discussion
> among people working on Android and someone suggested using
> i*86-unknown-android. My question is whether this is a good thing to
> do. I would also like to hear from the maintainer of the i*86
> backend. Eventually we would like to see x86 Android modifications to
> be pushed up-stream.
My inclination is that Android should use the same arrangements as the
existing support I added for different C libraries under the Linux kernel.
*-*-linux-gnu* means a system defaulting to using the GNU C library.
*-*-linux-uclibc* means a system defaulting to using the uClibc library.
So *-*-linux-android* would mean a system defaulting to using Android's C
library. -mglibc selects a multilib based on the GNU C library in a
toolchain defaulting to uClibc; -muclibc selects a multilib based on
uClibc in a toolchain defaulting to the GNU C library. So -mandroid would
be added to these options, and *-*-linux* configurations could support
three C libraries. This means that configure tests in target libraries
that care about which C library is in use cannot be based on the target
triplet; they must check features or preprocessor macros (existing code in
libstdc++-v3 checks __UCLIBC__, for example).
All the triplets above could have existing suffixes, so
i686-pc-linux-android, arm-none-linux-uclibceabi,
powerpc-none-linux-androidspe (for example) would be possible
combinations.
The __linux__ preprocessor macro would be defined for all configurations
using the Linux kernel. __gnu_linux__ should only be defined for those
using the GNU C library (it's defined at present for those using uClibc as
well, but I think that's a bug).
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2010-03-19 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 22:08 Doug Kwan (關振德)
2010-03-19 22:53 ` Joseph S. Myers [this message]
2010-03-19 23:06 ` Doug Kwan (關振德)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1003192235370.2023@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=dougkwan@google.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).