public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd
@ 2022-12-26  1:20 Flavio Cruz
  2022-12-26 12:23 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Flavio Cruz @ 2022-12-26  1:20 UTC (permalink / raw)
  To: binutils

Tested by building a toolchain and compiling gnumach for x86_64 [1]

[1] https://github.com/flavioc/cross-hurd/blob/master/bootstrap-kernel.sh.
---
 bfd/config.bfd   | 5 +++++
 ld/configure.tgt | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 0bc27fdce9..d1839a586e 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -731,6 +731,11 @@ case "${targ}" in
     targ_selvecs=i386_elf32_vec
     want64=true
     ;;
+  x86_64-*-gnu*)
+    targ_defvec=x86_64_elf64_vec
+    targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec"
+    want64=true
+    ;;
 #endif
   i[3-7]86-*-lynxos*)
     targ_defvec=i386_elf32_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 741b246f67..dbabad5145 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -1058,6 +1058,11 @@ x86_64-*-mingw*)	targ_emul=i386pep ;
 			targ_extra_emuls=i386pe
 			targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
 			;;
+x86_64-*-gnu*)	targ_emul=elf_x86_64
+			targ_extra_emuls="elf32_x86_64 elf_iamcu elf_i386"
+			targ_extra_libpath="elf_i386 elf32_x86_64"
+			tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
+			;;
 xgate-*-*)		targ_emul=xgateelf
 			targ_extra_ofiles=ldelfgen.o
 			;;
-- 
2.35.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd
  2022-12-26  1:20 [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd Flavio Cruz
@ 2022-12-26 12:23 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2022-12-26 12:23 UTC (permalink / raw)
  To: Flavio Cruz; +Cc: binutils

Applied.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-26 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-26  1:20 [PATCH] Add support for x86_64-*-gnu-* targets to build x86_64 gnumach/hurd Flavio Cruz
2022-12-26 12:23 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).