public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED] bfd: fix build with --enable-targets=all in 32-bit hosts
@ 2019-05-23 21:27 Jose E. Marchesi
  0 siblings, 0 replies; only message in thread
From: Jose E. Marchesi @ 2019-05-23 21:27 UTC (permalink / raw)
  To: binutils


Sigh, of course I had to break something :/

In this case, I broke the BFD build in 32-bit hosts with
--enable-targets=all and a 32-bit default target.

Good that Sergio's buildbot for GDB catched this.
Patch below committed as obvious.

Sorry!

commit 45d5293f6e098ff7e85a30554fcdc8c7f00db675
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Thu May 23 23:17:39 2019 +0200

    bfd: fix build with --enable-targets=all in 32-bit hosts
    
    This patch avoids for bpf_elf64_le_vec to be referenced in targmatch.h
    when building a BFD without BFD64, resulting in an undefined symbol.
    This was a regression introduced along with the BPF target.
    
    bfd/ChangeLog:
    
    2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
            * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
            * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
            bpf_elf64_be_vec.
            * configure: Regenerate.

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 85f00362a2..aa0a38db3a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,12 @@
 2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
-	* configure.ac: Add bpf_elf64_le_vec and bpf_elf64_be_vec.
+	* config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
+	* configure.ac: Set target_size=64 for bpf_elf64_le_vec and
+	bpf_elf64_be_vec.
+	* configure: Regenerate.
+
+2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
 	* configure: Regenerated.
 	* Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
 	(ALL_MACHINES_CFILES): Add cpu-bpf.c.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 562c331c55..8bc330e41a 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -480,11 +480,13 @@ case "${targ}" in
     targ_defvec=d30v_elf32_vec
     ;;
 
+#ifdef BFD64
   bpf-*-none)
     targ_defvec=bpf_elf64_le_vec
     targ_selvecs=bpf_elf64_be_vec
     targ_underscore=yes
     ;;
+#endif
 
   epiphany-*-*)
     targ_defvec=epiphany_elf32_vec
diff --git a/bfd/configure b/bfd/configure
index f2f8735629..2efeaf34c1 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14752,8 +14752,8 @@ do
     elf32_le_vec)		 tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     elf64_be_vec)		 tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     elf64_le_vec)		 tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
-    bpf_elf64_le_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf" ;;
-    bpf_elf64_be_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf" ;;
+    bpf_elf64_le_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64;;
+    bpf_elf64_be_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64 ;;
     epiphany_elf32_vec)		 tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
     fr30_elf32_vec)		 tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
     frv_elf32_vec)		 tb="$tb elf32-frv.lo elf32.lo $elf" ;;
diff --git a/bfd/configure.ac b/bfd/configure.ac
index fe6754e789..c941389138 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -476,8 +476,8 @@ do
     elf32_le_vec)		 tb="$tb elf32-gen.lo elf32.lo $elf" ;;
     elf64_be_vec)		 tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     elf64_le_vec)		 tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
-    bpf_elf64_le_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf" ;;
-    bpf_elf64_be_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf" ;;
+    bpf_elf64_le_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64;;
+    bpf_elf64_be_vec)		 tb="$tb elf64-bpf.lo elf64.lo $elf"; target_size=64 ;;
     epiphany_elf32_vec)		 tb="$tb elf32-epiphany.lo elf32.lo $elf" ;;
     fr30_elf32_vec)		 tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
     frv_elf32_vec)		 tb="$tb elf32-frv.lo elf32.lo $elf" ;;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-23 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 21:27 [COMMITTED] bfd: fix build with --enable-targets=all in 32-bit hosts Jose E. Marchesi

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).