[PATCH] Remove `netbsdpe` support

John Ericson John.Ericson@Obsidian.Systems
Fri Jun 18 02:36:05 GMT 2021


From: John Ericson <git@JohnEricson.me>

All branches in the "active" code are remove, and the target is
additionally marked as obsolete next to the other removed ones for
libbfd and gdb.

Per [1] from the NetBSD toolchain list, PE/COFF support was removed a
decade ago. Furthermore, the sole mention of this target in the binutils
commit history was in 2002. Together, I'm led to believe this target
hasn't seen much attention in quite a while.

I am proposing this change now to make my pain patch of changing
`netbsd` to mean `netbsdaout` rather than `netbsdelf` by default simpler
and safer.

[1]: https://mail-index.netbsd.org/tech-toolchain/2021/06/16/msg003996.html
---
 bfd/config.bfd                             | 5 +----
 binutils/configure                         | 2 +-
 binutils/configure.ac                      | 2 +-
 binutils/testsuite/lib/binutils-common.exp | 1 -
 gas/configure.tgt                          | 1 -
 gdb/configure.tgt                          | 1 +
 ld/configure.tgt                           | 3 ---
 ld/testsuite/ld-bootstrap/bootstrap.exp    | 3 +--
 8 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 57b513c7c73..4c3a519f5b4 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -74,6 +74,7 @@ case $targ in
  *-tandem-* | \
  *-*-ieee* | \
  *-*-netware* | \
+ *-*-netbsdpe* | \
  *-*-rtemsaout* | \
  *-*-rtemscoff* | \
  a29k-* | \
@@ -616,10 +617,6 @@ case "${targ}" in
     targ_selvecs="iamcu_elf32_vec"
     targ64_selvecs="x86_64_elf64_vec l1om_elf64_vec k1om_elf64_vec"
     ;;
-  i[3-7]86-*-netbsdpe*)
-    targ_defvec=i386_pe_vec
-    targ_selvecs="i386_pe_vec i386_pei_vec i386_elf32_vec iamcu_elf32_vec"
-    ;;
   i[3-7]86-*-openbsd*)
     targ_defvec=i386_elf32_vec
     targ_selvecs="iamcu_elf32_vec"
diff --git a/binutils/configure b/binutils/configure
index 1f855268c6f..4fe55dce8d9 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -14512,7 +14512,7 @@ do
 	  BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
 	  BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
 	  ;;
-	i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
+	i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32**)
   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
 	  if test -z "$DLLTOOL_DEFAULT"; then
 	    DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
diff --git a/binutils/configure.ac b/binutils/configure.ac
index b8ab642e068..ebcfbf47f1c 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -358,7 +358,7 @@ do
 	  BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
 	  ;;
 changequote(,)dnl
-	i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
+	i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32**)
 changequote([,])dnl
   	  BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
 	  if test -z "$DLLTOOL_DEFAULT"; then
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
index 59e25df99b0..0fb506cfd89 100644
--- a/binutils/testsuite/lib/binutils-common.exp
+++ b/binutils/testsuite/lib/binutils-common.exp
@@ -105,7 +105,6 @@ proc is_pecoff_format args {
 	 || [istarget $m_os-cygwin*]
 	 || [istarget $m_os-interix*]
 	 || [istarget $m_os-mingw*]
-	 || [istarget $m_os-netbsdpe*]
 	 || [istarget $m_os-pe*]
 	 || [istarget $m_os-winnt*] } {
 	return 1
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 338892add2a..0be695bc61c 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -224,7 +224,6 @@ case ${generic_target} in
   i386-*-fuchsia*)			fmt=elf ;;
   i386-*-genode*)			fmt=elf ;;
   i386-*-bsd*)				fmt=aout em=386bsd ;;
-  i386-*-netbsdpe*)			fmt=coff em=pe ;;
   i386-*-netbsd*-gnu* | \
   i386-*-knetbsd*-gnu | \
   i386-*-netbsd* | \
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index a928c0227a0..e507a6cfc4b 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -14,6 +14,7 @@
 case $targ in
  *-*-irix* | \
  *-*-solaris2.[01] | *-*-solaris2.[2-9]* | *-*-solaris2.10* | \
+ *-*-netbsdpe* |\
  alpha*-*-osf* | \
  alpha*-*-freebsd* | \
  alpha*-*-kfreebsd*-gnu | \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 6205d7c9872..6c535392183 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -347,9 +347,6 @@ i[3-7]86-*-openbsd*)
 			targ_emul=elf_i386
 			targ_extra_emuls="elf_iamcu"
 			;;
-i[3-7]86-*-netbsdpe*)	targ_emul=i386pe
-			targ_extra_ofiles="deffilep.o pe-dll.o"
-			;;
 i[3-7]86-*-elfiamcu)	targ_emul=elf_iamcu
 			targ_extra_emuls=elf_i386
 			;;
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index b21b48ab20e..df9fd95d76d 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -215,8 +215,7 @@ foreach flags $test_flags {
 	|| [istarget "*-*-winnt*"]
 	|| [istarget "*-*-mingw*"]
 	|| [istarget "*-*-interix*"]
-	|| [istarget "*-*-beospe*"]
-	|| [istarget "*-*-netbsdpe*"]} {
+	|| [istarget "*-*-beospe*"]} {
 	# Trim off the date present in PE binaries by only looking
 	#   at the ends of the files
 	# Although this works, a way to set the date would be better.
-- 
2.31.1



More information about the Binutils mailing list