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]

Producing .o and .s files at once


One of the few nice features of the Visual C++ command-line compiler is
that, with a command line of the form

cl /c /Fa foo.cpp

you can get it to output an assembler listing of the program at the same
time as compiling it.

From the gcc documentation, it appears that I have to do

g++ -c -S foo.cpp
g++ -c foo.cpp

to do the same thing - which makes my Makefile rather repetitive, and has
often annoyed me in optimisation when I change the code, rebuild with
gcc -S, and the executable I'm running no longer corresponds to the
assembler I have.

Is there an option which produces the .o and .s files from the same compile?

Tom


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