From owner-freebsd-arch Tue Apr 25 4: 4: 8 2000 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 485C437BCE7 for ; Tue, 25 Apr 2000 04:04:06 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id NAA29330 for ; Tue, 25 Apr 2000 13:04:02 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id NAA00328 for freebsd-arch@freebsd.org; Tue, 25 Apr 2000 13:03:52 +0200 (CEST) Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 84BC737BC31 for ; Mon, 24 Apr 2000 22:04:22 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: (qmail 3316 invoked from network); 25 Apr 2000 05:04:18 -0000 Received: from bde.zeta.org.au (203.2.228.102) by gidora.zeta.org.au with SMTP; 25 Apr 2000 05:04:18 -0000 Date: Tue, 25 Apr 2000 15:04:14 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Kris Kennaway Cc: arch@freebsd.org Subject: Re: MACHINE_CPU In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 21 Apr 2000, Kris Kennaway wrote: > I want to enable support for CPU-specific assembler code in things like > libgmp, openssl, etc, which requires knowledge of the target CPU type (not > just the architecture). For example, OpenSSL only includes asm code for > pentium and above, so we can't just build it if MACHINE_ARCH == "i386". > > The obvious way to do this is to add a MACHINE_CPU to sys.mk and add a > shadow TARGET_CPU in Makefile.inc1. Any objections to this approach? I think MACHINE_CPU requires similar support to MACHINE and MACHINE_ARCH in make(1). sys.mk can't do much more with it than convert it from an environment variable to CFLAGS, but it shouldn't do that. Hacks like the current "MACHINE_ARCH ?= i386" only work because make(1) supports the variable except on a few machine all of the same type. (This hack is only for bootstrapping using old versions of make(1) and shouldn't be in sys.mk anyway.) Note that you can't actually use MACHINE_CPU to make finer distinctions than MACHINE if the distinctions would result in code that doesn't run on all systems with the same value of MACHINE, at least for releases. The files in libc/i386/net/ still have to avoid using the i486 bswap instruction because plain i386's are still supported. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message