bfd: fix build with --enable-targets=all in 32-bit hosts
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 23 May 2019 21:17:39 +0000 (23:17 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 23 May 2019 21:17:39 +0000 (23:17 +0200)
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.

bfd/ChangeLog
bfd/config.bfd
bfd/configure
bfd/configure.ac

index 85f00362a21dfaae7949d3a20215bec1eda4505e..aa0a38db3aabd1c1beb07d724037f79211ad7e63 100644 (file)
@@ -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.
index 562c331c55b2def59c2f4dd6ca78e1ce5a159372..8bc330e41abcbd1a9c7814874dfce79827558a7e 100644 (file)
@@ -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
index f2f8735629a239541e3c67aa6c1bf56781fd8597..2efeaf34c105f943bf2599eaa0d58c7eb9eab759 100755 (executable)
@@ -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" ;;
index fe6754e789f214983b9539292d4f49e458f9adf6..c94138913843c7979d06c0284c2e85da50886f50 100644 (file)
@@ -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" ;;