Return to BSD News archive
Xref: sserve comp.os.386bsd.development:3058 gnu.gcc.help:10814 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!ncar!taos.Craycos.COM!nack.craycos.com!not-for-mail From: ferguson@craycos.com (Scott R. Ferguson) Newsgroups: comp.os.386bsd.development,gnu.gcc.help Subject: System-specific compiler constant for BSD386/gcc Date: 23 Jan 1995 08:39:04 -0700 Organization: Cray Computer Corporation Lines: 25 Distribution: world Message-ID: <3g0iio$fi7@nack.craycos.com> NNTP-Posting-Host: nack.craycos.com Please respond via e-mail if you can help, thanks. I'm building a copy of gnu make on a bsd386 system, but rather than their standard "configure" then "make" method, I need to compile it from a standard copy of the source code that compiles also on Cray-3's and Sun's. The way you do this is with statements in the code like: #ifdef _CRAYCOM #endif where the symbol "_CRAYCOM" is always set by our C compiler. It's easy enough to put something like -DBSD386 as a compiler option when I build for BSD386 systems, but would rather find a symbol that's defined by the compiler, in this case gcc. Does gcc define a system constant based on what architecture it's running on? In particular, BSD386? Scott -- --------------------------------------------------------------------------- Scott Ferguson ferguson@craycos.com Cray Computer Corporation http://www.craycos.com/~ferguson/ferguson.html Colorado Springs, CO Solely my opinions