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]
Other format: [Raw text]

Re: Determine the target of a build in gcc


J. Grant wrote:
Is it possible to determine the target of a build when compiling with gcc?
Perhaps it is possible to see something like the target architecture? I

Most ports do define macros to identify the target. This is very target dependent though. You will need to look at the macros defined by your target compiler, and pick appropriate ones to test.


The command
touch foo.h; cpp -dM foo.h
will show you all of the predefined macros. This is from the cpp manual, for the -dM documentation.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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