This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[PATCH] [Gold,MIPS] Detect 64-bit MIPS targets


When building gold targetting mips64el-linux-gnu or mips64-linux-gnu,
the configure script does not set HAVE_TARGET_64_LITTLE or
HAVE_TARGET_64_BIG. This causes the link of gold to fail:

mips.o: In function `(anonymous namespace)::Target_mips<64, true>::set_gp(gold::Layout*, gold::Symbol_table*) [clone .isra.1854]':
/home/aurel32/git/binutils-gdb/gold/mips.cc:8377: undefined reference to `gold::Sized_symbol<64>::init_output_data(char const*, char const*, gold::Output_data*, unsigned long, unsigned long, elfcpp::STT, elfcpp::STB, elfcpp::STV, unsigned char, bool, bool)'
mips.o: In function `gold::Merged_symbol_value<64>::value(gold::Relobj const*, unsigned int, unsigned long) const':
/home/aurel32/git/binutils-gdb/gold/object.h:1649: undefined reference to `gold::Merged_symbol_value<64>::value_from_output_section(gold::Relobj const*, unsigned int, unsigned long) const'
/home/aurel32/git/binutils-gdb/gold/object.h:1649: undefined reference to `gold::Merged_symbol_value<64>::value_from_output_section(gold::Relobj const*, unsigned int, unsigned long) const'
...

Fix that by adding mips64el and mips64 entry in gold/configure.tgt

gold/Changelog:
	* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
---
 gold/ChangeLog     |  4 ++++
 gold/configure.tgt | 14 ++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 239df36..9bfbaab 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-09  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* configure.tgt: Add mips64el*-*-*|mips64le*-*-* and mips64*-*-*.
+
 2016-06-29  Cary Coutant  <ccoutant@gmail.com>
 
 gold/
diff --git a/gold/configure.tgt b/gold/configure.tgt
index f1fd132..ac3d847 100644
--- a/gold/configure.tgt
+++ b/gold/configure.tgt
@@ -153,6 +153,13 @@ aarch64*-*)
  targ_big_endian=false
  targ_extra_big_endian=true
  ;;
+mips64el*-*-*|mips64le*-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS_RS3_LE
+ targ_size=64
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
 mips*el*-*-*|mips*le*-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS_RS3_LE
@@ -160,6 +167,13 @@ mips*el*-*-*|mips*le*-*-*)
  targ_big_endian=false
  targ_extra_big_endian=true
  ;;
+mips64*-*-*)
+ targ_obj=mips
+ targ_machine=EM_MIPS
+ targ_size=64
+ targ_big_endian=true
+ targ_extra_big_endian=false
+ ;;
 mips*-*-*)
  targ_obj=mips
  targ_machine=EM_MIPS
-- 
2.8.1


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