This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2/AARCH64 3/3] Support ILP32 multi-lib
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Yufeng Zhang <Yufeng dot Zhang at arm dot com>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- Cc: Andrew Pinski <apinski at cavium dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 May 2014 16:23:38 -0700
- Subject: Re: [PATCHv2/AARCH64 3/3] Support ILP32 multi-lib
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1393381023 dot git dot apinski at cavium dot com> <6688546a80b0fa9f907c32ba781f062e6bbbe551 dot 1393381023 dot git dot apinski at cavium dot com> <530F6056 dot 5030508 at arm dot com>
On Thu, Feb 27, 2014 at 7:57 AM, Yufeng Zhang <Yufeng.Zhang@arm.com> wrote:
> On 02/26/14 02:25, Andrew Pinski wrote:
>>
>> Hi,
>> This is the final patch which adds support for the dynamic linker and
>> multi-lib directories for ILP32. I did not change multi-arch support as
>> I did not know what it should be changed to and internally here at Cavium,
>> we don't use multi-arch. Updated for the new names that were decided on.
>>
>>
>> OK? Build and tested for aarch64-linux-gnu with and without
>> --with-multilib-list=lp64,ilp32.
>
>
> Looks good to me, but I cannot approve. I have a couple of minor comments
> on the changelog entry.
Ping? This is also required to support the VDSO inside the Linux kernel.
Thanks,
Andrew
>
>
>>
>> Thanks,
>> Andrew Pinski
>>
>> * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER):
>> /lib/ld-linux-aarch64_ilp32.so.1
>> is used for ILP32.
>> (LINUX_TARGET_LINK_SPEC): Update linker script for ILP32.
>> file whose name depends on -mabi= and -mbig-endian.
>> * config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Handle
>> LP64 better
>> and handle ilp32 too.
>> (MULTILIB_OPTIONS): Delete.
>> (MULTILIB_DIRNAMES): Delete.
>> ---
>> gcc/ChangeLog | 11 +++++++++++
>> gcc/config/aarch64/aarch64-linux.h | 4 ++--
>> gcc/config/aarch64/t-aarch64-linux | 7 ++-----
>> 3 files changed, 15 insertions(+), 7 deletions(-)
>>
>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index 155ce45..a0cdc58 100644
>> --- a/gcc/ChangeLog
>> +++ b/gcc/ChangeLog
>> @@ -1,5 +1,16 @@
>> 2014-02-25 Andrew Pinski<apinski@cavium.com>
>>
>> + * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER):
>> /lib/ld-linux32-aarch64_ilp32.so.1
>
>
> s/linux32/linux
>
>
>> + is used for ILP32.
>> + (LINUX_TARGET_LINK_SPEC): Update linker script for ILP32.
>> + file whose name depends on -mabi= and -mbig-endian.
>> + * config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Handle
>> LP64 better
>> + and handle ilp32 too.
>
>
> s/ilp32/ILP32
>
> Thanks,
> Yufeng
>
>
>
>
>
>> + (MULTILIB_OPTIONS): Delete.
>> + (MULTILIB_DIRNAMES): Delete.
>> +
>> +2014-02-25 Andrew Pinski<apinski@cavium.com>
>> +
>> * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
>> Handle TLS for ILP32.
>> * config/aarch64/aarch64.md (tlsie_small): Rename to ...
>> diff --git a/gcc/config/aarch64/aarch64-linux.h
>> b/gcc/config/aarch64/aarch64-linux.h
>> index a8f0771..48beafb 100644
>> --- a/gcc/config/aarch64/aarch64-linux.h
>> +++ b/gcc/config/aarch64/aarch64-linux.h
>> @@ -21,7 +21,7 @@
>> #ifndef GCC_AARCH64_LINUX_H
>> #define GCC_AARCH64_LINUX_H
>>
>> -#define GLIBC_DYNAMIC_LINKER
>> "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
>> +#define GLIBC_DYNAMIC_LINKER
>> "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
>>
>> #define CPP_SPEC "%{pthread:-D_REENTRANT}"
>>
>> @@ -33,7 +33,7 @@
>> -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
>> -X \
>> %{mbig-endian:-EB} %{mlittle-endian:-EL} \
>> - -maarch64linux%{mbig-endian:b}"
>> + -maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}"
>>
>> #define LINK_SPEC LINUX_TARGET_LINK_SPEC
>>
>> diff --git a/gcc/config/aarch64/t-aarch64-linux
>> b/gcc/config/aarch64/t-aarch64-linux
>> index 147452b..d6a678e 100644
>> --- a/gcc/config/aarch64/t-aarch64-linux
>> +++ b/gcc/config/aarch64/t-aarch64-linux
>> @@ -22,10 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
>> LIB1ASMFUNCS = _aarch64_sync_cache_range
>>
>> AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1,
>> $(tm_defines)),_be)
>> -MULTILIB_OSDIRNAMES = .=../lib64$(call
>> if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
>> +MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call
>> if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
>> MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
>>
>> -# Disable the multilib for linux-gnu targets for the time being; focus
>> -# on the baremetal targets.
>> -MULTILIB_OPTIONS =
>> -MULTILIB_DIRNAMES =
>> +MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
>
>
>