diff mbox

[PATCHv2/AARCH64,3/3] Support ILP32 multi-lib

Message ID 6688546a80b0fa9f907c32ba781f062e6bbbe551.1393381023.git.apinski@cavium.com
State New
Headers show

Commit Message

Andrew Pinski Feb. 26, 2014, 2:25 a.m. UTC
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.

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(-)

Comments

Yufeng Zhang Feb. 27, 2014, 3:57 p.m. UTC | #1
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.

>
> 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
Andrew Pinski May 23, 2014, 11:23 p.m. UTC | #2
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
>
>
>
Marcus Shawcroft June 2, 2014, 1:40 p.m. UTC | #3
On 26 February 2014 02:25, Andrew Pinski <apinski@cavium.com> 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.
>
> 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.

Hi, This is OK, thanks  /Marcus
diff mbox

Patch

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
+	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.
+
+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