diff mbox

[i386,Android] Enable __ANDROID__ macro for Android i386 target

Message ID CAMbmDYYu6vhyet+pK+-3CEwyYgJyZ6x4tMyVEU84CLyqth9=RQ@mail.gmail.com
State New
Headers show

Commit Message

Ilya Enkovich Feb. 22, 2012, 2:59 p.m. UTC
Hello,

Here is a one-line fix to enable __ANDROID__ macro on i386 Android
target. OK for trunk?

Thanks,
Ilya
--

2012-02-22  Enkovich Ilya  <ilya.enkovich@intel.com>

	* gcc/config/i386/gnu-user.h (TARGET_OS_CPP_BUILTINS): Add
	ANDROID_TARGET_OS_CPP_BUILTINS.

Comments

H.J. Lu Feb. 22, 2012, 5:47 p.m. UTC | #1
On Wed, Feb 22, 2012 at 6:59 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> Hello,
>
> Here is a one-line fix to enable __ANDROID__ macro on i386 Android
> target. OK for trunk?
>
> Thanks,
> Ilya
> --
>
> 2012-02-22  Enkovich Ilya  <ilya.enkovich@intel.com>
>
>        * gcc/config/i386/gnu-user.h (TARGET_OS_CPP_BUILTINS): Add
>        ANDROID_TARGET_OS_CPP_BUILTINS.
>
>
> diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
> index 98d0a25..d317229 100644
> --- a/gcc/config/i386/gnu-user.h
> +++ b/gcc/config/i386/gnu-user.h
> @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3.  If not see
>   do                                           \
>     {                                          \
>        GNU_USER_TARGET_OS_CPP_BUILTINS();      \
> +       ANDROID_TARGET_OS_CPP_BUILTINS();       \
>     }                                          \
>   while (0)

I think this should be done in linux.h, not gnu-user.h.
Ilya Enkovich Feb. 24, 2012, 9:51 a.m. UTC | #2
> On Wed, Feb 22, 2012 at 6:59 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> Hello,
>>
>> Here is a one-line fix to enable __ANDROID__ macro on i386 Android
>> target. OK for trunk?
>>
>> Thanks,
>> Ilya
>> --
>>
>> 2012-02-22  Enkovich Ilya  <ilya.enkovich@intel.com>
>>
>>        * gcc/config/i386/gnu-user.h (TARGET_OS_CPP_BUILTINS): Add
>>        ANDROID_TARGET_OS_CPP_BUILTINS.
>>
>>
>> diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
>> index 98d0a25..d317229 100644
>> --- a/gcc/config/i386/gnu-user.h
>> +++ b/gcc/config/i386/gnu-user.h
>> @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3.  If not see
>>   do                                           \
>>     {                                          \
>>        GNU_USER_TARGET_OS_CPP_BUILTINS();      \
>> +       ANDROID_TARGET_OS_CPP_BUILTINS();       \
>>     }                                          \
>>   while (0)
>
> I think this should be done in linux.h, not gnu-user.h.

I fix macro which is defined in gnu-user.h. How do you suppose me to
do it in linux.h?

Ilya
>
> --
> H.J.
H.J. Lu Feb. 24, 2012, 3:20 p.m. UTC | #3
On Fri, Feb 24, 2012 at 1:51 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> On Wed, Feb 22, 2012 at 6:59 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>> Hello,
>>>
>>> Here is a one-line fix to enable __ANDROID__ macro on i386 Android
>>> target. OK for trunk?
>>>
>>> Thanks,
>>> Ilya
>>> --
>>>
>>> 2012-02-22  Enkovich Ilya  <ilya.enkovich@intel.com>
>>>
>>>        * gcc/config/i386/gnu-user.h (TARGET_OS_CPP_BUILTINS): Add
>>>        ANDROID_TARGET_OS_CPP_BUILTINS.
>>>
>>>
>>> diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
>>> index 98d0a25..d317229 100644
>>> --- a/gcc/config/i386/gnu-user.h
>>> +++ b/gcc/config/i386/gnu-user.h
>>> @@ -71,6 +71,7 @@ along with GCC; see the file COPYING3.  If not see
>>>   do                                           \
>>>     {                                          \
>>>        GNU_USER_TARGET_OS_CPP_BUILTINS();      \
>>> +       ANDROID_TARGET_OS_CPP_BUILTINS();       \
>>>     }                                          \
>>>   while (0)
>>
>> I think this should be done in linux.h, not gnu-user.h.
>
> I fix macro which is defined in gnu-user.h. How do you suppose me to
> do it in linux.h?
>

Undef TARGET_OS_CPP_BUILTINS and define TARGET_OS_CPP_BUILTINS
in linux.h with GNU_USER_TARGET_OS_CPP_BUILTINS and
ANDROID_TARGET_OS_CPP_BUILTINS.
diff mbox

Patch

diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index 98d0a25..d317229 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -71,6 +71,7 @@  along with GCC; see the file COPYING3.  If not see
   do						\
     {						\
 	GNU_USER_TARGET_OS_CPP_BUILTINS();	\
+	ANDROID_TARGET_OS_CPP_BUILTINS();	\
     }						\
   while (0)