LoongArch: Don't falsely claim gold supported in toplevel configure

Message ID 20240222091923.129502-1-xry111@xry111.site
State New
Headers
Series LoongArch: Don't falsely claim gold supported in toplevel configure |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed

Commit Message

Xi Ruoyao Feb. 22, 2024, 9:17 a.m. UTC
  The gold linker has never been ported to LoongArch (and it seems
unlikely to be ported in the future as the new architectures are
focusing on lld and/or mold for fast linkers).

ChangeLog:

	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
	list.
	* configure: Regenerate.
---

Ok for GCC trunk (to get synced into Binutils later)?

 configure    | 2 +-
 configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Lulu Cheng Feb. 23, 2024, 3:16 a.m. UTC | #1
在 2024/2/22 下午5:17, Xi Ruoyao 写道:
> The gold linker has never been ported to LoongArch (and it seems
> unlikely to be ported in the future as the new architectures are
> focusing on lld and/or mold for fast linkers).
>
> ChangeLog:
>
> 	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
> 	list.
> 	* configure: Regenerate.
> ---
>
> Ok for GCC trunk (to get synced into Binutils later)?

I have no problem. But I have a question. Is this modification simply 
because we don’t

support it or is there an error somewhere?

>
>   configure    | 2 +-
>   configure.ac | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 874966fb9f0..02b435c1163 100755
> --- a/configure
> +++ b/configure
> @@ -3092,7 +3092,7 @@ case "${ENABLE_GOLD}" in
>         # Check for target supported by gold.
>         case "${target}" in
>           i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
> -        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
> +        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
>   	  configdirs="$configdirs gold"
>   	  if test x${ENABLE_GOLD} = xdefault; then
>   	    default_ld=gold
> diff --git a/configure.ac b/configure.ac
> index 4f34004a072..1a19c07a27b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -364,7 +364,7 @@ case "${ENABLE_GOLD}" in
>         # Check for target supported by gold.
>         case "${target}" in
>           i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
> -        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
> +        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
>   	  configdirs="$configdirs gold"
>   	  if test x${ENABLE_GOLD} = xdefault; then
>   	    default_ld=gold
  
Xi Ruoyao Feb. 23, 2024, 3:27 a.m. UTC | #2
On Fri, 2024-02-23 at 11:16 +0800, chenglulu wrote:
> 
> 在 2024/2/22 下午5:17, Xi Ruoyao 写道:
> > The gold linker has never been ported to LoongArch (and it seems
> > unlikely to be ported in the future as the new architectures are
> > focusing on lld and/or mold for fast linkers).
> > 
> > ChangeLog:
> > 
> >  	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
> >  	list.
> >  	* configure: Regenerate.
> > ---
> > 
> > Ok for GCC trunk (to get synced into Binutils later)?
> 
> I have no problem. But I have a question. Is this modification simply 
> because we don’t
> 
> support it or is there an error somewhere?

If a user specify --enable-gold building Binutils, with loongarch in
this list the building system will attempt to build gold and fail.  If
removing loongarch from the list the building system will ignore --
enable-gold.
  
Lulu Cheng Feb. 23, 2024, 3:37 a.m. UTC | #3
在 2024/2/23 上午11:27, Xi Ruoyao 写道:
> On Fri, 2024-02-23 at 11:16 +0800, chenglulu wrote:
>> 在 2024/2/22 下午5:17, Xi Ruoyao 写道:
>>> The gold linker has never been ported to LoongArch (and it seems
>>> unlikely to be ported in the future as the new architectures are
>>> focusing on lld and/or mold for fast linkers).
>>>
>>> ChangeLog:
>>>
>>>   	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
>>>   	list.
>>>   	* configure: Regenerate.
>>> ---
>>>
>>> Ok for GCC trunk (to get synced into Binutils later)?
>> I have no problem. But I have a question. Is this modification simply
>> because we don’t
>>
>> support it or is there an error somewhere?
> If a user specify --enable-gold building Binutils, with loongarch in
> this list the building system will attempt to build gold and fail.  If
> removing loongarch from the list the building system will ignore --
> enable-gold.
>
Okay, I understand.

Thanks!:-)
  
Xi Ruoyao Feb. 23, 2024, 10:24 a.m. UTC | #4
On Fri, 2024-02-23 at 11:37 +0800, chenglulu wrote:
> 
> 在 2024/2/23 上午11:27, Xi Ruoyao 写道:
> > On Fri, 2024-02-23 at 11:16 +0800, chenglulu wrote:
> > > 在 2024/2/22 下午5:17, Xi Ruoyao 写道:
> > > > The gold linker has never been ported to LoongArch (and it seems
> > > > unlikely to be ported in the future as the new architectures are
> > > > focusing on lld and/or mold for fast linkers).
> > > > 
> > > > ChangeLog:
> > > > 
> > > >   	* configure.ac (ENABLE_GOLD): Remove loongarch*-*-* from target
> > > >   	list.
> > > >   	* configure: Regenerate.
> > > > ---
> > > > 
> > > > Ok for GCC trunk (to get synced into Binutils later)?
> > > I have no problem. But I have a question. Is this modification simply
> > > because we don’t
> > > 
> > > support it or is there an error somewhere?
> > If a user specify --enable-gold building Binutils, with loongarch in
> > this list the building system will attempt to build gold and fail.  If
> > removing loongarch from the list the building system will ignore --
> > enable-gold.
> > 
> Okay, I understand.

Pushed r14-9149 and the Binutils maintainer will pick it up before the
next Binutils release (AFAIK).
  

Patch

diff --git a/configure b/configure
index 874966fb9f0..02b435c1163 100755
--- a/configure
+++ b/configure
@@ -3092,7 +3092,7 @@  case "${ENABLE_GOLD}" in
       # Check for target supported by gold.
       case "${target}" in
         i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
-        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
+        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
 	  configdirs="$configdirs gold"
 	  if test x${ENABLE_GOLD} = xdefault; then
 	    default_ld=gold
diff --git a/configure.ac b/configure.ac
index 4f34004a072..1a19c07a27b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,7 +364,7 @@  case "${ENABLE_GOLD}" in
       # Check for target supported by gold.
       case "${target}" in
         i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
-        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*)
+        | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
 	  configdirs="$configdirs gold"
 	  if test x${ENABLE_GOLD} = xdefault; then
 	    default_ld=gold