[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add support for x86_64-*-gnu-* targets (binutils)
From: |
Flavio Cruz |
Subject: |
Re: [PATCH] Add support for x86_64-*-gnu-* targets (binutils) |
Date: |
Wed, 21 Dec 2022 16:06:32 -0500 |
---
On Wed, Dec 21, 2022 at 12:23:03PM +0100, Samuel Thibault wrote:
Hello,
Flavio Cruz, le lun. 19 déc. 2022 17:00:30 -0500, a ecrit:
Sending out this patch for comments. If it looks reasonable, will try to
submit it upstream.
Does it build? I had assumed it'd take more than that to get binutils
building, but if it does work fine, then yes please submit, after fixing
the comments below.
Yes, it does build. I was able to build binutils+gcc+gnumach so far with
both patches.
Also, could you perhaps Cc Helmut Grohne <helmut@subdivi.de>? He will be
very interested in including the patches to prepare bootstrapping the
hurd-amd64 Debian port :D
That would be great, but I think we still need the glibc bits too for a
complete bootstrap.
(see https://salsa.debian.org/helmutg/rebootstrap/ and
https://jenkins.debian.net/view/rebootstrap/ )
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..3a1c9f716e 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -701,6 +701,11 @@ case "${targ}" in
targ_selvecs="i386_elf32_fbsd_vec iamcu_elf32_vec i386_coff_vec i386_pei_vec
x86_64_pe_vec x86_64_pei_vec i386_elf32_vec x86_64_elf64_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
+ ;;
x86_64-*-haiku*)
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec"
This needs to go *after* the *-linux-* case, otherwise the linux-gnu
triplet will get caught but *-gnu*. And similarly for kfreebsd*-gnu
etc., i.e. all potential gnu-on-something targets. Perhaps better just
put it at the end of the x86_64 targets, after redox.
Done, thanks for the catch. Attached the new version.
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