This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc-4.7 versus non-standard "-f" options
- From: Ben Liblit <liblit at cs dot wisc dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 17 Apr 2012 18:03:17 -0500
- Subject: gcc-4.7 versus non-standard "-f" options
gcc 4.6.x quietly accepted nonstandard command-line options that started
with "-f". They wouldn't do anything automatically, but if used in
conjunction with a non-standard specs file ("-specs=...") you could
trigger all sorts of useful and interesting extra behavior.
Unfortunately gcc-4.7.0 seems much more strict. Any nonstandard "-f"
option leads to a "gcc: error: unrecognized command line option" error
message. Tracing gcc system calls shows that this error message appears
*before* my non-standard specs file is even read. So I'm really at a
loss for how to pass nonstandard flags around and especially how to get
them to reach my nonstandard specs file for further processing. Is this
still possible at all?
(Aside: gcc-4.5.x would also rewrite any nonstandard option that began
with two dashes into one that began with "-f". So you could write "gcc
--foo" and that would turn into a "-ffoo" flag you could test for in a
specs file. gcc-4.6.x apparently removed the "--" to "-f" rewriting but
retained the permissive, quiet acceptance of nonstandard "-f" options.
Now with gcc-4.7.0 I fear that even the nonstandard "-f" capability may
have been removed.)