On Fri, Feb 24, 2012 at 7:17 AM, Ilya Enkovich <enkovich....@gmail.com> wrote:
>> On Wed, Feb 22, 2012 at 6:54 AM, Ilya Enkovich <enkovich....@gmail.com> 
>> wrote:
>>> Hello,
>>>
>>> This patch adds -mandroid support to i386 target. OK for trunk?
>>>
>>> Thanks,
>>> Ilya
>>> --
>>>
>>> 2012-02-22  Enkovich Ilya  <ilya.enkov...@intel.com>
>>>
>>>        * config/i386/gnu-user.h (LINUX_TARGET_CC1_SPEC): New.
>>
>> I don't think you should define LINUX_* in gnu-user.h.
>>
>>>        (CC1_SPEC): Use LINUX_OR_ANDROID_CC.
>>>        (CC1PLUS_SPEC): Likewise.
>>>        (LINUX_TARGET_LINK_SPEC): New.
>>>        (LINK_SPEC): Support LINUX_OR_ANDROID_LD.
>>>        (LIB_SPEC): New.
>>>        (STARTFILE_SPEC): New.
>>>        (LINUX_TARGET_ENDFILE_SPEC): New.
>>>        (ENDFILE_SPEC): Support LINUX_OR_ANDROID_LD.
>>
>> There is a feedback at
>>
>> http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01283.html
>>
>> to my earlier patch to define GNU_USER_TARGET_* in gnu-user.h
>> and use them in linux.h.
>>
>
> Thanks for the link. I fixed patch according to this feedback.
>
>>>        * config/linux-android.h (ANDROID_STARTFILE_SPEC): Use
>>>        crtbegin_so%O%s for -shared.
>>>        (ANDROID_ENDFILE_SPEC): Use crtend_so%O%s for -shared.
>>>
>>>
>>
>> I think you should separate this part similar to
>>
>> http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01109.html
>
> I removed this part from the patch.
>
>>
>>
>> --
>> H.J.
>
> Here is a new patch version. Does it look better?
>
> Thanks,
> Ilya
> --
>
> 2012-02-24  Enkovich Ilya  <ilya.enkov...@intel.com>
>
>        * gcc/config/i386/gnu-user.h (CC1_SPEC): Rename to ...
>        (GNU_USER_TARGET_CC1_SPEC): ... this.
>        (LINK_SPEC): Rename to ...
>        (GNU_USER_TARGET_LINK_SPEC): ... this.
>        (ENDFILE_SPEC): Delete.
>        (GNU_USER_TARGET_MATHFILE_SPEC): New.
>

You should keep those *_SPEC and define them with new
GNU_*_SPEC in gnu-user.h since gnu-user.h is also used
by other non-linux targets.  In linux.h, you undef *_SPEC
before defining them.


-- 
H.J.

Reply via email to