From owner-freebsd-bugs@FreeBSD.ORG Fri May 25 15:20:02 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA56316A4AC for ; Fri, 25 May 2007 15:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id B5EB813C48A for ; Fri, 25 May 2007 15:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4PFK274066061 for ; Fri, 25 May 2007 15:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4PFK2QK066060; Fri, 25 May 2007 15:20:02 GMT (envelope-from gnats) Resent-Date: Fri, 25 May 2007 15:20:02 GMT Resent-Message-Id: <200705251520.l4PFK2QK066060@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9DE5C16A421 for ; Fri, 25 May 2007 15:15:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 8B84913C44B for ; Fri, 25 May 2007 15:15:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4PFFNMe028895 for ; Fri, 25 May 2007 15:15:23 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l4PFFM9Q028894; Fri, 25 May 2007 15:15:22 GMT (envelope-from nobody) Message-Id: <200705251515.l4PFFM9Q028894@www.freebsd.org> Date: Fri, 25 May 2007 15:15:22 GMT From: Scot Hetzel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: conf/112997: Add note about the 'native' mtune option to share/examples/etc/make.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 15:20:03 -0000 >Number: 112997 >Category: conf >Synopsis: Add note about the 'native' mtune option to share/examples/etc/make.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 25 15:20:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: 7.0-CURRENT >Organization: >Environment: FreeBSD hp010.hetzel.org 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Thu May 24 21:37:39 CDT 2007 root@hp010.hetzel.org:/usr/src/7x/sys-p4/amd64/compile/GENERIC.debug amd64 >Description: On the AMD64 mailing list there was a discussion on what to set CPUTYPE to for a users system. During the discussion, the new 'native' mtune option for gcc 4.2 was brought up. This option allows gcc to automatically tune the compile for the processor that the machine is being built on for the x86 and AMD64 architectures. We need to warn users to not set CPUTYPE to 'native' in /etc/make.conf, as CPUTYPE is used to determine the value of MACHINE_CPU. But instead to use: gcc -v -x c -E -mtune=native /dev/null -o /dev/null 2>&1 | grep mtune | sed -e 's/.*mtune=//' to determine the value of CPUTYPE for their system. >How-To-Repeat: >Fix: apply attached patch to share/examples/etc/make.conf Patch attached with submission follows: Index: make.conf =================================================================== RCS file: /home/ncvs/src/share/examples/etc/make.conf,v retrieving revision 1.279 diff -u -r1.279 make.conf --- make.conf 17 Jan 2007 12:43:06 -0000 1.279 +++ make.conf 25 May 2007 15:08:52 -0000 @@ -40,6 +40,17 @@ # AMD64 architecture: opteron, athlon64, nocona, prescott, core2 # Intel ia64 architecture: itanium2, itanium # +# On the Intel x86 and AMD architectures, you can use gcc to determine +# determine the processor type of the compiling machine by using the +# following command: +# +# gcc -v -x c -E -mtune=native /dev/null -o /dev/null 2>&1 | grep mtune | sed -e -e 's/.*mtune=//' +# +# set CPUTYPE to the value returned for mtune. +# +# NOTE: DO NOT set CPUTYPE to 'native' in make.conf, as CPUTYPE is used to +# set MACHINE_CPU in share/mk/bsd.cpu.mk. +# # (?= allows to buildworld for a different CPUTYPE.) # #CPUTYPE?=pentium3 >Release-Note: >Audit-Trail: >Unformatted: