public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC][i*86]appropriate target triplet for Android on x86?
@ 2010-03-19 22:08 Doug Kwan (關振德)
  2010-03-19 22:53 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Kwan (關振德) @ 2010-03-19 22:08 UTC (permalink / raw)
  To: gcc

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.

Thanks

-Doug

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][i*86]appropriate target triplet for Android on x86?
  2010-03-19 22:08 [RFC][i*86]appropriate target triplet for Android on x86? Doug Kwan (關振德)
@ 2010-03-19 22:53 ` Joseph S. Myers
  2010-03-19 23:06   ` Doug Kwan (關振德)
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2010-03-19 22:53 UTC (permalink / raw)
  To: Doug Kwan (關振德); +Cc: gcc

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC][i*86]appropriate target triplet for Android on x86?
  2010-03-19 22:53 ` Joseph S. Myers
@ 2010-03-19 23:06   ` Doug Kwan (關振德)
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Kwan (關振德) @ 2010-03-19 23:06 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc

That's a very good suggestion.  Thanks.

-Doug

2010/3/19 Joseph S. Myers <joseph@codesourcery.com>:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-19 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-19 22:08 [RFC][i*86]appropriate target triplet for Android on x86? Doug Kwan (關振德)
2010-03-19 22:53 ` Joseph S. Myers
2010-03-19 23:06   ` Doug Kwan (關振德)

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).