This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386, Android] Enable __ANDROID__ macro for Android i386 target
- From: Maxim Kuvyrkov <maxim at codesourcery dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, gcc-patches Patches <gcc-patches at gcc dot gnu dot org>, <pavel dot v dot chupin at gmail dot com>, Jing Yu <jingyu at google dot com>
- Date: Thu, 29 Mar 2012 17:51:25 +1300
- Subject: Re: [PATCH, i386, Android] Enable __ANDROID__ macro for Android i386 target
- References: <CAMbmDYYu6vhyet+pK+-3CEwyYgJyZ6x4tMyVEU84CLyqth9=RQ@mail.gmail.com> <CAMe9rOo3ArbTy8bQaDhhHN=7ZrLxudUB6TcH5NOdfv-B_QSK3g@mail.gmail.com> <CAMbmDYZk9hErCKrT5hhwLa8gMMUxXGLs36F6Hud192GTT7MQ5g@mail.gmail.com> <CAMe9rOoD+VmEYhi6rTcMGZjg+0Ndw3azTa1uEPhLOe2Tm1cSRQ@mail.gmail.com> <CAMbmDYZbV7k31dYEy_Yc-gFJS-E7rwjcLv7Y0nXugmqrjEWQTg@mail.gmail.com>
On 28/02/2012, at 3:39 AM, Ilya Enkovich wrote:
>>
>> 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.
>>
>>
>> --
>> H.J.
>
> Hello,
>
> Here is a variant with linux.h modification. Does it look fine?
>
> Thanks,
> Ilya
> --
> 2012-02-27 Enkovich Ilya <ilya.enkovich@intel.com>
>
> * gcc/config/i386/linux.h (TARGET_OS_CPP_BUILTINS): New.
>
>
> diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
> index 73681fe..03c7b29 100644
> --- a/gcc/config/i386/linux.h
> +++ b/gcc/config/i386/linux.h
> @@ -22,3 +22,12 @@ along with GCC; see the file COPYING3. If not see
>
> #define GNU_USER_LINK_EMULATION "elf_i386"
> #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
> +
> +#undef TARGET_OS_CPP_BUILTINS
> +#define TARGET_OS_CPP_BUILTINS() \
> + do \
> + { \
> + GNU_USER_TARGET_OS_CPP_BUILTINS(); \
> + ANDROID_TARGET_OS_CPP_BUILTINS(); \
> + } \
> + while (0)
This is OK provided (1) i386/linux.h renamed to i386/linux32.h as per review of your other patch, (2) this change is made to "new" i386/linux.h, and (3) Uros and any other i386 doesn't object.
Please hold off this patch until your other Android *_SPEC changes are approved.
Thank you,
--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics