From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 11 14:10:30 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7340616A4CE for ; Fri, 11 Feb 2005 14:10:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 326E543D45 for ; Fri, 11 Feb 2005 14:10:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1BEATV4015406 for ; Fri, 11 Feb 2005 14:10:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1BEATUL015405; Fri, 11 Feb 2005 14:10:29 GMT (envelope-from gnats) Date: Fri, 11 Feb 2005 14:10:29 GMT Message-Id: <200502111410.j1BEATUL015405@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Subject: Re: kern/77355: Detect i*86 subarches for uname X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2005 14:10:30 -0000 The following reply was made to PR kern/77355; it has been noted by GNATS. From: Bruce Evans To: "Devon H. O'Dell" Cc: Robert Millan , freebsd-gnats-submit@freebsd.org Subject: Re: kern/77355: Detect i*86 subarches for uname Date: Sat, 12 Feb 2005 01:05:50 +1100 (EST) [gnats restored in Cc:] On Fri, 11 Feb 2005, Devon H. O'Dell wrote: > On Fri, 2005-02-11 at 13:25 +0100, Robert Millan wrote: > > On Fri, Feb 11, 2005 at 11:18:25AM +0100, Devon H. O'Dell wrote: > > > > > > > > With this change, the config.guess triplet becomes i686-unknown-freebsd5.3 > > > > (or whatever suitable). Some programs detect this and use it for optimisation. > > > > > > The proper way to specify optimizations in FreeBSD is with relevant > > > entries in /etc/make.conf. > > > > But this only affects the port system when passing --host and --build to > > configure scripts, right? > > > > I'm more concerned about programs that run config.guess on their own. > > Actually, make.conf is used to modify various flags used in the files > in /usr/share/mk and /usr/ports/Mk. Nothing would be passed to --host > and --build; the Makefile would use the desired CFLAGS when building, > which might include -march=whatever. > > Since FreeBSD encourages the use of its ports collection (and other > package systems such as pkgsrc use similar tricks to do this), I really > don't see this as an issue. Perhaps the only thing I see this useful for > is if you don't particularly care to use any package system, which isn't > really good for the project since we don't get to benefit from the > software you're using. It's farily simple to wrap any software into a > port file, regardless of what utilities you are using. It is needed for correctness. From "man uname | col -bx": %%% -m Write the type of the current hardware platform to standard out- put. ... -p Write the type of the machine processor architecture to standard output. %%% -p is supposed to give the arch (e.g., -i386) and -m is supposed to give the platfrom (is that the sub-arch?) (e.g., i686). It is useless for these to return the same string. (i686 is also useless, since it is the same for all i386's newer than about 8 years old, but that is another bug. The hw.model sysctl gives more useful info (e.g., "AMD Athlon(tm)"), but uname(1) only uses uname(2) which doesn't go near this sysctl.) However, I don't like changing the -a output (-a gets -m but not -p). Bruce