[PATCH] Rework -fno-omit-frame-pointer support on i386
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Feb 17 17:08:00 GMT 2017
>> -#if __GNUC_PREREQ (5,0) && !defined PROF
>> + profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
>> + can't be used to put the 6th argument in %ebp for syscall. */
>> +#if __GNUC_PREREQ (5,0) && !defined PROF && CAN_USE_REGISTER_ASM_EBP
>
> Should it be "defined CAN_USE_REGISTER_ASM_EBP"
> since CAN_USE_REGISTER_ASM_EBP may not be defined.
In fact since it is defined in config.h.in as default being 0, it will
always be defined (also I check with -O2 and -Os without --disable-werror
to confirm it.
>
>> # define OPTIMIZE_FOR_GCC_5
>> #endif
>>
>> @@ -611,7 +611,8 @@ struct libc_do_syscall_args
>> #endif
>>
>> /* Consistency check for position-independent code. */
>> -#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5
>> +#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5 \
>> + && !CAN_USE_REGISTER_ASM_EBP
>
> No need for this. If CAN_USE_REGISTER_ASM_EBP
> isn't defined, OPTIMIZE_FOR_GCC_5 won't be defined.
>
>> # define check_consistency() \
>> ({ int __res; \
>> __asm__ __volatile__ \
>> --
>> 2.7.4
>>
Right, I will remove it. I presume with this fix it is ok to commit.
More information about the Libc-alpha
mailing list