From owner-freebsd-hackers Fri Jan 4 10:28:12 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 4945937B405 for ; Fri, 4 Jan 2002 10:28:09 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id CAE9D81D01; Fri, 4 Jan 2002 12:28:03 -0600 (CST) Date: Fri, 4 Jan 2002 12:28:03 -0600 From: Alfred Perlstein To: Stephen Montgomery-Smith Cc: freebsd-hackers@freebsd.org Subject: Re: Tell gcc I have a i686 Message-ID: <20020104122803.N82406@elvis.mu.org> References: <3C35EE1B.484A6AD@math.missouri.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C35EE1B.484A6AD@math.missouri.edu>; from stephen@math.missouri.edu on Fri, Jan 04, 2002 at 12:02:03PM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Stephen Montgomery-Smith [020104 12:02] wrote: > I want to create a Makefile for a C program that includes some Pentium > II specific inline assembler code. How do I tell the compiler whether > we are compiling on a i686? > > For Linux, I can do something like this (for gnu-make) > Arch = $(shell arch) > cc ...... -DArch ..... > > and inside the program > > #ifdef i686 > > But arch doesn't exist on FreeBSD. Isn't this somewhat trivial? ARCH=i686 CFLAGS+=-D${ARCH} ? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message