This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Passing "-g" through driver to assembler for .s/S files
- To: gcc at gcc dot gnu dot org
- Subject: Passing "-g" through driver to assembler for .s/S files
- From: fche at redhat dot com (Frank Ch. Eigler)
- Date: 30 Oct 2001 13:24:53 -0500
Hi -
Since the gcc top-level driver can accept ".s"/".S" files, and pass
them through to the assembler, it makes sense to want "-g" to do
something useful. In specific, for the gnu assembler, a user may like
gcc -g -c foo.s
to map to
gas -gdwarf-2 foo.s
(or -gstabs, as appropriate), to have symbolic assembly-level
debugging information. But "-g" now is simply dropped, and requires
the user to do instead
gcc -Wa,-gdwarf-2 -c foo.s
which appears unnecessarily complicated.
Is there a clause in the existing specs mechanism that relates to the
case where a .s/.S file is being passed to the driver, so that this
mapping could be done in target.h SPEC macros? Can this be done in a
more target-independent manner?
- FChE