This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH [1/n] X32: Add initial -x32 support


On Thu, Jul 7, 2011 at 2:59 PM, H.J. Lu <hjl.tools@gmail.com> wrote:

>>>> Hi Paolo, DJ, Nathanael, Alexandre, Ralf,
>>>>
>>>> Is the change
>>>> .
>>>> ? ? ? ?* configure.ac: Support --enable-x32.
>>>> ? ? ? ?* configure: Regenerated.
>>>>
>>>> diff --git a/gcc/configure.ac b/gcc/configure.ac
>>>> index 5f3641b..bddabeb 100644
>>>> --- a/gcc/configure.ac
>>>> +++ b/gcc/configure.ac
>>>> @@ -611,6 +611,11 @@ AC_ARG_ENABLE(multilib,
>>>> ?[], [enable_multilib=yes])
>>>> ?AC_SUBST(enable_multilib)
>>>>
>>>> +# With x32 support
>>>> +AC_ARG_ENABLE(x32,
>>>> +[ ?--enable-x32 ? ? ? ? ? ?enable x32 library support for multiple ABIs],
>>>
>>> Looks like a very very generic switch for a global configury ... we already
>>> have --with-multilib-list (SH only), why not extend that to also work
>>> for x86_64?
>>>
>>> Richard.
>>>
>>>> +[], [enable_x32=no])
>>>> +
>>>> ?# Enable __cxa_atexit for C++.
>>>> ?AC_ARG_ENABLE(__cxa_atexit,
>>>> ?[AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
>>>>
>>>> OK?
>>>>
>>>> Thanks.
>>>>
>>
>> Here is the updated patch to use --with-multilib-list=x32.
>>
>> Paolo, DJ, Nathanael, Alexandre, Ralf, Is the configure.ac change
>>
>> ---
>> ? ? ? ?* configure.ac: Mention x86-64 for --with-multilib-list.
>> ? ? ? ?* configure: Regenerated.
>>
>> ? ? ? ?* doc/install.texi: Document --with-multilib-list=x32.
>>
>> diff --git a/gcc/configure.ac b/gcc/configure.ac
>> index 5f3641b..a73f758 100644
>> --- a/gcc/configure.ac
>> +++ b/gcc/configure.ac
>> @@ -795,7 +795,7 @@ esac],
>> ?[enable_languages=c])
>>
>> ?AC_ARG_WITH(multilib-list,
>> -[AS_HELP_STRING([--with-multilib-list], [select multilibs (SH only)])],
>> +[AS_HELP_STRING([--with-multilib-list], [select multilibs (SH and
>> x86-64 only)])],
>> ?:,
>> ?with_multilib_list=default)
>>
>> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
>> index 49aac95..a5d266c 100644
>> --- a/gcc/doc/install.texi
>> +++ b/gcc/doc/install.texi
>> @@ -1049,8 +1049,10 @@ sysv, aix.
>> ?@item --with-multilib-list=@var{list}
>> ?@itemx --without-multilib-list
>> ?Specify what multilibs to build.
>> -Currently only implemented for sh*-*-*.
>> +Currently only implemented for sh*-*-* and x86-64-*-linux*.
>>
>> +@table @code
>> +@item sh*-*-*
>> ?@var{list} is a comma separated list of CPU names. ?These must be of the
>> ?form @code{sh*} or @code{m*} (in which case they match the compiler option
>> ?for that processor). ?The list should not contain any endian options -
>> @@ -1082,6 +1084,12 @@ only little endian SH4AL:
>> ?--with-multilib-list=sh4al,!mb/m4al
>> ?@end smallexample
>>
>> +@item x86-64-*-linux*
>> +If @var{list} is @code{x32}, x32 run-time library will be enabled. ?By
>> +default, x32 run-time library is disabled.
>> +
>> +@end table
>> +
>> ?@item --with-endian=@var{endians}
>> ?Specify what endians to use.
>> ?Currently only implemented for sh*-*-*.
>> ---
>>
>> OK?
>>
>> Thanks.
>>
>> --
>> H.J.
>> ---
>> 2011-07-06 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? ?* config.gcc: Support --with-multilib-list=x32 for x86 Linux
>> ? ? ? ?targets.
>>
>> ? ? ? ?* configure.ac: Mention x86-64 for --with-multilib-list.
>> ? ? ? ?* configure: Regenerated.
>>
>> ? ? ? ?* config/i386/gnu-user64.h (SPEC_64): Support x32.
>> ? ? ? ?(SPEC_32): Likewise.
>> ? ? ? ?(ASM_SPEC): Likewise.
>> ? ? ? ?(LINK_SPEC): Likewise.
>> ? ? ? ?(TARGET_THREAD_SSP_OFFSET): Likewise.
>> ? ? ? ?(TARGET_THREAD_SPLIT_STACK_OFFSET): Likewise.
>> ? ? ? ?(SPEC_X32): New.
>>
>> ? ? ? ?* config/i386/i386.h (TARGET_X32): New.
>> ? ? ? ?(TARGET_LP64): New.
>> ? ? ? ?(LONG_TYPE_SIZE): Likewise.
>> ? ? ? ?(POINTER_SIZE): Likewise.
>> ? ? ? ?(POINTERS_EXTEND_UNSIGNED): Likewise.
>> ? ? ? ?(OPT_ARCH64): Support x32.
>> ? ? ? ?(OPT_ARCH32): Likewise.
>>
>> ? ? ? ?* config/i386/i386.opt (mx32): New.
>>
>> ? ? ? ?* config/i386/kfreebsd-gnu64.h (GNU_USER_LINK_EMULATIONX32): New.
>> ? ? ? ?(GLIBC_DYNAMIC_LINKERX32): Likewise.
>> ? ? ? ?* config/i386/linux64.h (GNU_USER_LINK_EMULATIONX32): Likewise.
>> ? ? ? ?(GLIBC_DYNAMIC_LINKERX32): Likewise.
>>
>> ? ? ? ?* config/i386/t-linux-x32: New.
>>
>> ? ? ? ?* config/linux.h (UCLIBC_DYNAMIC_LINKERX32): New.
>> ? ? ? ?(BIONIC_DYNAMIC_LINKERX32): Likewise.
>> ? ? ? ?(GNU_USER_DYNAMIC_LINKERX32): Likewise.
>>
>> ? ? ? ?* doc/install.texi: Document --with-multilib-list=x32.
>>
>> ? ? ? ?* doc/invoke.texi: Document -mx32.
>>
>
> Hi Uros,
>
> This new version only adds a comment to configure.ac. ?OK to install?

OK.

Thanks,
Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]