Article View: gnu.gcc.help
Article #52892RESULTS of: wanting .s and .o output in same compile
From: Phil Howard
Date: Tue, 28 Apr 1992 18:35
Date: Tue, 28 Apr 1992 18:35
30 lines
1656 bytes
1656 bytes
I originally wrote:
>I'd like to get the .s and the .o output file in the same compile.
>Is there any way to do this? I read the man page and the command
>line options seem to only let me choose one or the other.
I've gotten 2 suggestions:
1. Use the "-save-temps" option on gcc.
This is a recent addition that many will find usable if they need to do
this, but I personally did not because of older versions of gcc and I am
not the sysadmin.
This will also leave the pre-processor output file.
2. Go ahead and invoke gcc twice like:
gcc $(CCOPTS) -S $*.c
gcc $(CCOPTS) -c $*.s
This avoids doing the actual conversion of .c to .s twice and leaves
the .s file existant. This is the method I've decided to use as meeting
my own needs.
When I originally said "in one compile" I should have been more exact by
saying "I want to avoid doing the pre-processing and code generation twice".
But this revealed a feature ("-save-temps") that has its uses.
Thanks to all those who replied by E-mail.
Technical Details
Message-ID:
<1992Apr28.183539.19096@ux1.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!uwm.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!philShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,fc11d0a91b00ba84,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-04-28 11:35:39 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!uwm.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu (Phil Howard) Subject: RESULTS of: wanting .s and .o output in same compile Message-ID: <1992Apr28.183539.19096@ux1.cso.uiuc.edu> Organization: University of Illinois at Urbana Date: Tue, 28 Apr 1992 18:35:39 GMT Lines: 30