[v5,3/4] Gold/MIPS: Add targ_extra_size=64 for mips32 triples

Message ID 20231113050549.702494-4-yunqiang.su@cipunited.com
State Accepted
Headers
Series None |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

YunQiang Su Nov. 13, 2023, 5:05 a.m. UTC
  So we can enable 64bit ELF support for MIPS32 toolchain.

This patch can fix build failure with configure:
   --target=mips-linux-gnu \
   --enable-targets=mips64-linux-gnuabi64,mips64-linux-gnuabin32
The error message is like:
   undefined reference to `gold::Output_data_reloc_base<9, true, 32, false>::
   ...
---
 gold/configure.tgt | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Nick Clifton Nov. 17, 2023, 2:35 p.m. UTC | #1
Hi YunQiang Su,

> So we can enable 64bit ELF support for MIPS32 toolchain.
> 
> This patch can fix build failure with configure:
>     --target=mips-linux-gnu \
>     --enable-targets=mips64-linux-gnuabi64,mips64-linux-gnuabin32
> The error message is like:
>     undefined reference to `gold::Output_data_reloc_base<9, true, 32, false>::

Patch approved and applied.

Cheers
   Nick
  
YunQiang Su Nov. 17, 2023, 2:57 p.m. UTC | #2
Nick Clifton <nickc@redhat.com> 于 2023年11月17日周五 22:36写道:

> Hi YunQiang Su,
>
> > So we can enable 64bit ELF support for MIPS32 toolchain.
> >
> > This patch can fix build failure with configure:
> >     --target=mips-linux-gnu \
> >     --enable-targets=mips64-linux-gnuabi64,mips64-linux-gnuabin32
> > The error message is like:
> >     undefined reference to `gold::Output_data_reloc_base<9, true, 32,
> false>::
>
> Patch approved and applied.
>

thanks. can i backport it to 2.41?


> Cheers
>    Nick
>
>
>
  
Nick Clifton Nov. 20, 2023, 12:11 p.m. UTC | #3
Hi YunQiang Su,

>      > This patch can fix build failure with configure:
>      >     --target=mips-linux-gnu \
>      >     --enable-targets=mips64-linux-gnuabi64,mips64-linux-gnuabin32
>      > The error message is like:
>      >     undefined reference to `gold::Output_data_reloc_base<9, true, 32, false>::
> 
>     Patch approved and applied.
> 
> 
> thanks. can i backport it to 2.41?

Yes - please do.

Cheers
   Nick
  

Patch

diff --git a/gold/configure.tgt b/gold/configure.tgt
index 8f0f21bdc03..4b16634ff4e 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -157,6 +157,7 @@  mips*el-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS
  targ_size=32
+ targ_extra_size=64
  targ_big_endian=false
  targ_extra_big_endian=true
  ;;
@@ -164,6 +165,7 @@  mips*-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS
  targ_size=32
+ targ_extra_size=64
  targ_big_endian=true
  targ_extra_little_endian=true
  ;;