Xref: news2.mv.net comp.os.msdos.djgpp:6709 Newsgroups: comp.os.msdos.djgpp From: hk AT bercos DOT de (Helge Kruse) Subject: Re: Target-Dependent DEFINES ?? Sender: usenet AT bercos DOT de Organization: Bercos GmbH Message-ID: References: <4tprvs$l5v$1 AT mhade DOT production DOT compuserve DOT com> Date: Thu, 1 Aug 1996 23:10:05 GMT Lines: 34 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Steven M. Gibson <76711 DOT 2621 AT CompuServe DOT COM> wrote: >All: > >Does GCC have any target-dependent DEFINES? I'd like to assemble >slightly different code under GCC/Unix than under GCC/PC ... and >I'd like to not have to REMEMBER to set my own DEFINE to do so. You can set target definition in two ways: use the -A switch: #if #cpu(i386) char *cpu="intel 386"; #else char *cpu="other"; #endif c:\> gcc -Acpu(i386) xx.c But you didn't want to specify your own define: Just use the -v switch: C:\TMP>gcc -v a.c Reading specs from c:/djgpp/lib\specs gcc version 2.7.2 c:/djgpp/bin\cpp.exe -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=0 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=0 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=0 a.c c:/djgpp/tmp\ccbaaaaa GNU CPP version 2.7.2 (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: c:/djgpp/include c:/djgpp/contrib/grx20/include C:\TMP> I think, you can find as many target defines as you need. Helge