Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andy_Duplain
Beginner
74 Views

Support for compiling (assembling) .S files

Hi there, I have an assembler file as part of my project that contains both ia32 and intel64 assembler code, separated by guard statements:
#ifdef __i386
and:
#ifdef __x86_64
I am able to compile this code successfully using GCC under Linux and GCC and LLVM (Xcode 4.2.1) under Mac OS X. I am investigating the Intel C++ compiler but it appears unable to compile (assemble) this file as no manifest constants are defined by the compiler (as evidenced by using the -dM compiler flag) and it therefore sees assembler instructions for the wrong architecture. The manpage for icc doesn't state support for .S files (it does for .s files).
How can I get my .S files compiled by the Intel compilers?
Cheers,
Andy
0 Kudos
1 Reply
mecej4
Black Belt
74 Views

Please try the following option to ICC:

-x assembler-with-cpp ...

You may still need to include definitions for manifest constants in the command line.

Reply