delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/09/13/10:02:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
x-gfisavedcharset: Windows-1252
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <C9150052B112D3119E9E0004ACA6E437025AFDE8@tepg1.tepg.co.uk>
From: "Bruce Adams" <bruadams AT tycoint DOT com>
To: <cygwin AT cygwin DOT com>, <crossgcc AT sources DOT redhat DOT com>
Subject: RE: Preprocessing Assembly
Date: Fri, 13 Sep 2002 14:51:01 +0100
MIME-Version: 1.0
X-OriginalArrivalTime: 13 Sep 2002 13:58:22.0265 (UTC) FILETIME=[9F374290:01C25B2D]


> -----Original Message-----
> From: Bruce Adams [mailto:bruadams AT tycoint DOT com] 
> Sent: Thursday, September 12, 2002 4:39 PM
> To: cygwin AT cygwin DOT com; crossgcc AT sources DOT redhat DOT com
> Subject: RE: Preprocessing Assembly
> 
> 
> 
> 
> > -----Original Message-----
> > From: Dhananjay R. Deshpande [mailto:dhananjayd AT kpit DOT com]
> > Sent: Thursday, September 12, 2002 3:03 PM
> > To: Dhananjay R. Deshpande; Bruce Adams; cygwin AT cygwin DOT com;
> > crossgcc AT sources DOT redhat DOT com
> > Subject: RE: Preprocessing Assembly
> > 
> > > > Is there a way to force gcc to preprocess assembly 
> using a switch.
> > > 
> > > Yes. Use "-x assembler-with-cop" switch.
> > 
> > Typo.. Use "-x assembler-with-cpp" switch.
> 
> Ah ok.  Missed that one when I RTFM.  You don't need the 
> space though. One teensy flaw.  
> The prebuilt rtems compiler I'm using (being stuck unable to 
> build my own for now) can't find cpp0.  I copied that into 
> C:\cygwin\opt\rtems\bin from 
> C:\cygwin\opt\rtems\lib\gcc-lib\m68k-rtems\2.95.3 and it 
> works. However, I now have syntax errors in my assembly but 
> the line numbers refer to the preprocessed output rather than 
> the original file. Closer inspection of my workaround to use 
> gcc -E reveals something more insidious and slightly 
> surprising.  Gcc -E produces no output at all.  This seems to 
> go for both the cygwin native gcc and the rtems one.  If I 
> run cpp0.exe directly I get output.  Neither cpp or gcc put 
> anything on stdout. I know the preprocessor works (people 
> would have noticed if it didn't!) so
> what am I Missing?  	
> 						Regards,
> 							  Bruce A.
> 
Okay.  I have obtained part of the answer through RTFMing and
Experimentation.
Apparently gcc -E doesn't work unless I also use -x assembly-with-cpp
or equally -x c++.  
My initial syntax errors were caused by the line directives output by
the preprocessor.  Gcc chokes itself.  If I disable those using -Wp,-P 
then I at least get syntax errors relating to our assembly code, though
the line numbers only make sense if use a two stage process and investigate
the intermediate file.  
Another thing it seems to dislike is the use of 0x to signify hexadecimal in
constants.  I was all set to change to the alternate notation of an H at the
end when the manual (www.delorie.com/gnu/docs/binutils/as_36.html) 
told me this was legal.  What else am I missing? :-)
					Regards,
						 Bruce A.


============================================================================
 Any opinions expressed in this e-mail are those of the individual and not
 necessarily those of Tyco Electronic Product Group.

 Any prices for the supply of goods or services are only valid if supported
 by a formal written quotation.

 This e-mail and any files transmitted with it, including replies and
 forwarded copies (which may contain alterations) subsequently transmitted
 from Tyco Electronic Product Group are confidential and solely for the use
 of the intended recipient.

 If you are not the intended recipient or the person responsible for
 delivery to the intended recipient, be advised that you have received this
 e-mail in error and that any use is strictly prohibited.  In this event,
 please notify us via e-mail at 'helpdesk DOT tepg AT tycoint DOT com' or telephone on 
 0121 255 6499 and then delete the e-mail and any copies of it.
============================================================================






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019