+/* A completion function for "set gnutarget". */
+
+static void
+complete_set_gnutarget (struct cmd_list_element *cmd,
+ completion_tracker &tracker,
+ const char *text, const char *word)
+{
+ static const char **bfd_targets;
+
+ if (bfd_targets == NULL)
+ {
+ int last;
+
+ bfd_targets = bfd_target_list ();
+ for (last = 0; bfd_targets[last] != NULL; ++last)
+ ;
+
+ bfd_targets = XRESIZEVEC (const char *, bfd_targets, last + 2);
+ bfd_targets[last] = "auto";
+ bfd_targets[last + 1] = NULL;
+ }
+
+ complete_on_enum (tracker, bfd_targets, text, word);
+}
+