On 18/04/2012, at 1:10 PM, Fu, Chao-Ying wrote:
> Maxim Kuvyrkov wrote:
>
>> Above definitions are OK.
>
> Thanks!
For avoidance of doubt, please wait for the whole patch to be approved before
committing it.
>>>> Index: gcc/libgcc/unwind-dw2-fde-dip.c
>>>> ===================================================================
>>>> --- gcc.orig/libgcc/unwind-dw2-fde-dip.c 2012-04-03
>> 17:07:28.000000000 -0700
>>>> +++ gcc/libgcc/unwind-dw2-fde-dip.c 2012-04-04
>> 14:51:01.338074000 -0700
>>>> @@ -48,8 +48,9 @@
>>>> #include "gthr.h"
>>>>
>>>> #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
>>>> - && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
>>>> - || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 &&
>> defined(DT_CONFIG)))
>>>> + && ((defined(__BIONIC__) && (defined(mips) ||
>> defined(__mips__))) \
>>>> + || (__GLIBC__ > 2 || (__GLIBC__ == 2 &&
>> __GLIBC_MINOR__ > 2) \
>>>> + || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 &&
>> defined(DT_CONFIG))))
>>>> # define USE_PT_GNU_EH_FRAME
>>>> #endif
>>
>> What is this change for?
>
> For stack unwinding, MIPS needs supporting functions in libgcc to
> work with eh_frame for Android.
> (Note that ARM has its own unwinding functions in gcc/config/arm/. It
> doesn't use eh_frame.)
> The file is enabled for GLIBC originally. Thus, I add a new test to enable it
> for MIPS Android BIONIC build.
Please use format that other C libraries use (instead of mixing together GLIBC
and Bionic definitions):
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
&& defined(__BIONIC__)
# define USE_PT_GNU_EH_FRAME
#endif
Also, as far as I can tell, this change would also apply for x86, and for ARM
having USE_PT_GNU_EH_FRAME defined will not hurt. So please make the
definition architecture-agnostic.
Thank you,
--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics