]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: restrict configure error with all targets and 64 bit bfd to mips
authorGuinevere Larsen <guinevere@redhat.com>
Tue, 28 Jan 2025 19:09:51 +0000 (16:09 -0300)
committerGuinevere Larsen <guinevere@redhat.com>
Wed, 5 Feb 2025 12:28:38 +0000 (09:28 -0300)
The recent commit b601c58034ed755fb765fc13782b6876bffd25d4 causes the
gdb configure to fail if --enable-targets=all was requested, but 64 bit
bfd was not enabled. This was due to a build failure first reported
against mips, and that I also encountered building on a 32 bit mips
system, but that looked like a general failure.

Further examination showed that this is, in fact, mips-specific (or at
least, not completely generic) as other targets like debian-i386 and
32-bit arm could build all targets just fine.

This commit restricts the new error to only trigger in mips hosts.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/configure
gdb/configure.ac

index cfb4f446ef8c96d6b8c919c64121b269fd06170a..bdc405e01b3e568bfada2096e0da0d07e8847b17 100755 (executable)
@@ -25005,9 +25005,16 @@ if test x${all_targets} = xtrue; then
   if test x${enable_64_bit_bfd} = xyes; then
     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
   else
-    # If all targets were requested, but 64 bit bfd is not enabled,
-    # the build will fail. See PR 28684.
-    as_fn_error $? "--enable-targets=all requires --enable-64-bit-bfd" "$LINENO" 5
+    case ${host} in
+    mips*)
+      # If all targets were requested, but 64 bit bfd is not enabled,
+      # the build will fail. See PR 28684.
+      as_fn_error $? "--enable-targets=all requires --enable-64-bit-bfd" "$LINENO" 5
+      ;;
+    *)
+      TARGET_OBS='$(ALL_TARGET_OBS)'
+      ;;
+    esac
   fi
 fi
 
index 77f774e23ee066c8b758fbb7aed822f209bca141..fb77e79e73bd85624a5232da3e36ef7f5c4bf885 100644 (file)
@@ -257,9 +257,16 @@ if test x${all_targets} = xtrue; then
   if test x${enable_64_bit_bfd} = xyes; then
     TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
   else
-    # If all targets were requested, but 64 bit bfd is not enabled,
-    # the build will fail. See PR 28684.
-    AC_MSG_ERROR([--enable-targets=all requires --enable-64-bit-bfd])
+    case ${host} in
+    mips*)
+      # If all targets were requested, but 64 bit bfd is not enabled,
+      # the build will fail. See PR 28684.
+      AC_MSG_ERROR([--enable-targets=all requires --enable-64-bit-bfd])
+      ;;
+    *)
+      TARGET_OBS='$(ALL_TARGET_OBS)'
+      ;;
+    esac
   fi
 fi