This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Passing "-g" through driver to assembler for .s/S files



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]