From owner-freebsd-arch Thu Feb 22 4:59:43 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mout1.freenet.de (mout1.freenet.de [194.97.50.132]) by hub.freebsd.org (Postfix) with ESMTP id 967F037B503 for ; Thu, 22 Feb 2001 04:59:30 -0800 (PST) (envelope-from netchild@leidinger.net) Received: from [194.97.50.136] (helo=mx3.freenet.de) by mout1.freenet.de with esmtp (Exim 3.22 #1) id 14VvLF-0005Nw-00; Thu, 22 Feb 2001 13:59:29 +0100 Received: from a2a16.pppool.de ([213.6.42.22] helo=Magelan.Leidinger.net) by mx3.freenet.de with esmtp (Exim 3.22 #1) id 14VvLD-00060F-00; Thu, 22 Feb 2001 13:59:27 +0100 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.11.2/8.11.2) with ESMTP id f1MBopF07996; Thu, 22 Feb 2001 12:50:52 +0100 (CET) (envelope-from netchild@Leidinger.net) Message-Id: <200102221150.f1MBopF07996@Magelan.Leidinger.net> Date: Thu, 22 Feb 2001 12:50:50 +0100 (CET) From: Alexander Leidinger Subject: Re: cvs commit: src/share/mk sys.mk To: kris@obsecurity.org Cc: arch@FreeBSD.ORG In-Reply-To: <20010221123835.A59024@mollari.cthul.hu> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 21 Feb, Kris Kennaway wrote: > .if ${MACHINE_CPU:Mi686} > CFLAGS += -mpentiumpro > .elif ${MACHINE_CPU:Mi586} > CFLAGS += -mpentium > ... > .endif > > which may be worthwhile to do. > > The -march statement doesnt matter though, since some binaries built > with MACHINE_CPU set will already be CPU-specific (e.g. if you specify > i686 then openssl will use the i686 blowfish code) You want to use "-mXXX -march=XXX". You are CPU-specific already, no need to produce parts of code which run on an i386 too. ---snip--- #include int main(void) { #if defined(__pentiumpro__) || defined(__i686__) puts("pentiumpro"); #endif #if defined(__pentium__) || defined(__i586__) puts("pentium"); #endif exit(0); } ---snip--- ---snip--- (23) netchild@ttyp0 % rm cputest; CFLAGS=-mpentiumpro gmake cputest; md5 cputest; ./cputest cc -mpentiumpro cputest.c -o cputest MD5 (cputest) = 577769bb73460f7bd062882a4ee44235 pentiumpro (24) netchild@ttyp0 % rm cputest; CFLAGS=-march=pentiumpro gmake cputest; md5 cputest; ./cputest cc -march=pentiumpro cputest.c -o cputest MD5 (cputest) = b721209c7b0089ee1442cb0880af06b8 (25) netchild@ttyp0 % rm cputest; CFLAGS="-mpentiumpro -march=pentiumpro" gmake cputest; md5 cputest; ./cputest cc -mpentiumpro -march=pentiumpro cputest.c -o cputest MD5 (cputest) = c41ce5e5941b335c6fcf1b6d8d59f2e1 pentiumpro ---snip--- Bye, Alexander. -- "One world, one web, one program" -- Microsoft promotional ad "Ein Volk, ein Reich, ein Fuehrer" -- Adolf Hitler http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message