*BSD News Article 41915


Return to BSD News archive

Xref: sserve comp.os.386bsd.development:3110 gnu.gcc.help:10912
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!paladin.american.edu!gatech!howland.reston.ans.net!swrinde!pipex!peernews.demon.co.uk!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.os.386bsd.development,gnu.gcc.help
Subject: Re: System-specific compiler constant for BSD386/gcc
Followup-To: comp.os.386bsd.development,gnu.gcc.help
Date: 27 Jan 1995 02:24:33 -0000
Organization: None
Lines: 26
Distribution: world
Message-ID: <3g9lh1$ki@awfulhak.demon.co.uk>
References: <3g0iio$fi7@nack.craycos.com>
X-Newsreader: TIN [version 1.2 PL2]

Scott R. Ferguson (ferguson@craycos.com) wrote:
: 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?

Try using the -v option - this tells you all the pre-processor symbols.

--
Brian <brian@awfulhak.demon.co.uk>

Don't _EVER_ lose your sense of humour....