From owner-freebsd-hackers Fri Jan 4 10:31:59 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from femail44.sdc1.sfba.home.com (femail44.sdc1.sfba.home.com [24.254.60.38]) by hub.freebsd.org (Postfix) with ESMTP id 82CB937B420 for ; Fri, 4 Jan 2002 10:31:48 -0800 (PST) Received: from math.missouri.edu ([24.12.197.197]) by femail44.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20020104183148.TLTB15906.femail44.sdc1.sfba.home.com@math.missouri.edu>; Fri, 4 Jan 2002 10:31:48 -0800 Message-ID: <3C35F513.2F16AC08@math.missouri.edu> Date: Fri, 04 Jan 2002 12:31:47 -0600 From: Stephen Montgomery-Smith X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Tell gcc I have a i686 References: <3C35EE1B.484A6AD@math.missouri.edu> <20020104122803.N82406@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Alfred Perlstein wrote: > > * 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} > > ? > What I want is a makefile that automatically detects whether it is on an i686 or not (not for me to tell it so). -- Stephen Montgomery-Smith stephen@math.missouri.edu http://www.math.missouri.edu/~stephen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message