Date: Tue, 25 Apr 2000 15:04:14 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Kris Kennaway <kris@freebsd.org> Cc: arch@freebsd.org Subject: Re: MACHINE_CPU Message-ID: <Pine.BSF.4.21.0004251441010.5148-100000@alphplex.bde.org> In-Reply-To: <Pine.BSF.4.21.0004211802040.61323-100000@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004251441010.5148-100000>