GNU as: move deprecation message after option parsing

Some cmake test parses the output of the first line of as --version, and
emits an error if it does not contain some expected strings:

Checking whether the ASM compiler is GNU using "--version" did not match
"(GNU assembler)|(GCC)|(Free Software Foundation)"

Emit the deprecation message later, after parsing argv and thus --version.

PR:		246540
Reported by:	dch
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste
2020-05-18 16:07:14 +00:00
parent bc71118183
commit eb95dbfa4f
+1 -1
View File
@@ -1089,7 +1089,6 @@ main (int argc, char ** argv)
expandargv (&argc, &argv);
START_PROGRESS (myname, 0);
fprintf (stderr, _("warning: as 2.17.50 is deprecated in FreeBSD and will be removed\n"));
#ifndef OBJ_DEFAULT_OUTPUT_FILE_NAME
#define OBJ_DEFAULT_OUTPUT_FILE_NAME "a.out"
@@ -1109,6 +1108,7 @@ main (int argc, char ** argv)
/* Call parse_args before any of the init/begin functions
so that switches like --hash-size can be honored. */
parse_args (&argc, &argv);
fprintf (stderr, _("warning: GNU as %s is deprecated and will be removed\n"), BFD_VERSION_STRING);
symbol_begin ();
frag_init ();
subsegs_begin ();