Blame SOURCES/binutils-gold-warn-unsupported.patch

ddc4e9
diff -rupN --no-dereference binutils-2.39/bfd/config.bfd binutils-2.39-new/bfd/config.bfd
ddc4e9
--- binutils-2.39/bfd/config.bfd	2022-07-08 11:46:47.000000000 +0200
ddc4e9
+++ binutils-2.39-new/bfd/config.bfd	2022-10-30 12:41:33.412023779 +0100
ddc4e9
@@ -490,7 +490,7 @@ case "${targ}" in
0c89c8
     ;;
0c89c8
 
0c89c8
 #ifdef BFD64
0c89c8
-  bpf-*-none)
0c89c8
+  bpf-*-none | bpf-*)
0c89c8
     targ_defvec=bpf_elf64_le_vec
0c89c8
     targ_selvecs=bpf_elf64_be_vec
0c89c8
     targ_underscore=yes
ddc4e9
@@ -1478,7 +1478,7 @@ case "${targ}" in
0c89c8
     ;;
0c89c8
 
0c89c8
   *)
0c89c8
-    echo 1>&2 "*** BFD does not support target ${targ}."
0c89c8
+    echo 1>&2 "*** BFD does not support target '${targ}'.  Honest."
0c89c8
     echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
0c89c8
     exit 1
0c89c8
     ;;
ddc4e9
diff -rupN --no-dereference binutils-2.39/gold/configure binutils-2.39-new/gold/configure
ddc4e9
--- binutils-2.39/gold/configure	2022-07-08 11:58:08.000000000 +0200
ddc4e9
+++ binutils-2.39-new/gold/configure	2022-10-30 12:41:33.410023779 +0100
ddc4e9
@@ -5223,7 +5223,8 @@ for targ in $target $canon_targets; do
0c89c8
     . ${srcdir}/configure.tgt
0c89c8
 
0c89c8
     if test "$targ_obj" = "UNKNOWN"; then
0c89c8
-      as_fn_error $? "\"unsupported target $targ\"" "$LINENO" 5
0c89c8
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"unsupported target $targ\"" >&5
0c89c8
+$as_echo "$as_me: WARNING: \"unsupported target $targ\"" >&2;}
0c89c8
     else
0c89c8
       targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
0c89c8
       if test "$targ_extra_obj" != ""; then
ddc4e9
diff -rupN --no-dereference binutils-2.39/gold/configure.ac binutils-2.39-new/gold/configure.ac
ddc4e9
--- binutils-2.39/gold/configure.ac	2022-07-08 11:46:48.000000000 +0200
ddc4e9
+++ binutils-2.39-new/gold/configure.ac	2022-10-30 12:41:33.411023779 +0100
ee698d
@@ -182,7 +182,7 @@ for targ in $target $canon_targets; do
0c89c8
     . ${srcdir}/configure.tgt
0c89c8
 
0c89c8
     if test "$targ_obj" = "UNKNOWN"; then
0c89c8
-      AC_MSG_ERROR("unsupported target $targ")
0c89c8
+      AC_MSG_WARN("unsupported target $targ")
0c89c8
     else
0c89c8
       targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
0c89c8
       if test "$targ_extra_obj" != ""; then
ddc4e9
diff -rupN --no-dereference binutils-2.39/ld/configure.tgt binutils-2.39-new/ld/configure.tgt
ddc4e9
--- binutils-2.39/ld/configure.tgt	2022-07-29 09:37:48.000000000 +0200
ddc4e9
+++ binutils-2.39-new/ld/configure.tgt	2022-10-30 12:41:33.411023779 +0100
ddc4e9
@@ -258,7 +258,7 @@ bfin-*-linux-uclibc*)	targ_emul=elf32bfi
0c89c8
 			targ_extra_emuls="elf32bfin"
0c89c8
 			targ_extra_libpath=$targ_extra_emuls
0c89c8
 			;;
0c89c8
-bpf-*-*)		targ_emul=elf64bpf
0c89c8
+bpf-* | bpf-*-*)	targ_emul=elf64bpf
0c89c8
 			;;
0c89c8
 cr16-*-elf*)		targ_emul=elf32cr16
0c89c8
 			;;
ddc4e9
@@ -1078,7 +1078,7 @@ loongarch64-*)		targ_emul=elf64loongarch
0c89c8
 			targ_extra_ofiles=
0c89c8
 			;;
0c89c8
 *)
0c89c8
-  echo 2>&1 "*** ld does not support target ${targ}"
0c89c8
+  echo 2>&1 "*** ld does not support target '${targ}' NO REALLY"
0c89c8
   echo 2>&1 "*** see ld/configure.tgt for supported targets"
0c89c8
   exit 1
0c89c8