> Hello!
>
>> Here is a patch which creates new gnu-user-common.h file and moves all
>> common gnu-user.h and gnu-user64.h definitions to this new file. New
>> file is required to avoid duplication of Android specific changes in
>> gnu-user.h and gnu-user64.h. This patch is actually a non Android
>> specific part of previously submitted patch to support Android in x86
>> target (http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00127.html).
>> Bootstrapped and tested on linux-x86_64. Is it OK for mainline and
>> 4.7?
>
>> 2012-04-13  Enkovich Ilya  <ilya.enkov...@intel.com>
>>
>>       * config/i386/gnu-user.h: Include gnu-user-common.h.
>>       (CPP_SPEC): Removed.
>>       (CC1_SPEC): Removed.
>>       (ENDFILE_SPEC): Removed.
>>       (DEFAULT_PCC_STRUCT_RETURN): Removed.
>>       (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): Removed.
>>       (TARGET_OS_CPP_BUILTINS): Removed.
>>       (LIBGCC2_HAS_TF_MODE): Removed.
>>       (LIBGCC2_TF_CEXT): Removed.
>>       (TF_SIZE): Removed.
>>       (TARGET_ASM_FILE_END): Removed.
>>       (STACK_CHECK_MOVING_SP): Removed.
>>       (STACK_CHECK_STATIC_BUILTIN): Removed.
>>       (TARGET_THREAD_SSP_OFFSET): Removed.
>>       (TARGET_CAN_SPLIT_STACK): Removed.
>>       (TARGET_THREAD_SPLIT_STACK_OFFSET): Removed.
>>
>>       * config/i386/gnu-user64.h: Likewise.
>>
>>       * config/i386/gnu-user-common.h: New.
>
> This ChangeLog is wrong, you didn't remove these files but move them
> to new file.
>
> +#ifdef TARGET_LIBC_PROVIDES_SSP
> +/* i386 glibc provides __stack_chk_guard in %gs:0x14,
> +   x32 glibc provides it in %fs:0x18.
> +   x86_64 glibc provides it in %fs:0x28.  */
> +#define TARGET_THREAD_SSP_OFFSET \
> +  (TARGET_64BIT ? (TARGET_X32 ? 0x18 : 0x28) : 0x14)
> +
> +/* We steal the last transactional memory word.  */
> +#define TARGET_CAN_SPLIT_STACK
> +#define TARGET_THREAD_SPLIT_STACK_OFFSET \
> +  (TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
> +#endif
>
> Shouldn't TARGET_64BIT part remain in gnu_user64.h and !TARGET_64BIT
> in gnu-user.h? I don't see the reason to put these conditinal defines
> in shared file. However, this may be due to biarch handling that I'm
> not familiar with in all details.
>
> +#include "config/i386/gnu-user-common.h"
>
> You shouldn't include new file here, list it in config.gcc before
> i386/gnu-user.h or i386/gnu-user64.c
>
> Uros.

Hello,

Thanks for review! Here is a new version with all issues fixed.

Bootstrapped on linux-x86_64 and check is in progress. Will it be OK
for trunk and 4.7 after successfull check?

Thanks,
Ilya
---
2012-04-13  Enkovich Ilya  <ilya.enkov...@intel.com>

        * config/i386/gnu-user-common.h: New.

        * config/i386/gnu-user.h (CPP_SPEC): Moved to
        gnu-user-common.h.
        (CC1_SPEC): Likewise.
        (ENDFILE_SPEC): Likewise.
        (DEFAULT_PCC_STRUCT_RETURN): Likewise.
        (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): Likewise.
        (TARGET_OS_CPP_BUILTINS): Likewise.
        (LIBGCC2_HAS_TF_MODE): Likewise.
        (LIBGCC2_TF_CEXT): Likewise.
        (TF_SIZE): Likewise.
        (TARGET_ASM_FILE_END): Likewise.
        (STACK_CHECK_MOVING_SP): Likewise.
        (STACK_CHECK_STATIC_BUILTIN): Likewise.

        * config/i386/gnu-user64.h: Likewise.

Attachment: mandroid.patch
Description: Binary data

Reply via email to