From owner-freebsd-current@FreeBSD.ORG Thu Oct 31 10:35:48 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFAD74B4 for ; Thu, 31 Oct 2013 10:35:48 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay002.isp.belgacom.be (mailrelay002.isp.belgacom.be [195.238.6.175]) by mx1.freebsd.org (Postfix) with ESMTP id 707FE2108 for ; Thu, 31 Oct 2013 10:35:48 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlcGAG4xclJR8nUw/2dsb2JhbABZgwc4wD6BJxd0giUBAQU6HCMQCw4KCSUPKh4GiB4BvAKPTweELgOYCopFh0WDJzs Received: from 48.117-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.117.48]) by relay.skynet.be with ESMTP; 31 Oct 2013 11:35:38 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r9VAZZSL002041; Thu, 31 Oct 2013 11:35:36 +0100 (CET) (envelope-from tijl@coosemans.org) Date: Thu, 31 Oct 2013 11:35:34 +0100 From: Tijl Coosemans To: Alexey Dokuchaev Subject: Re: MACHINE_CPU detection b0rked? Message-ID: <20131031113534.0802aed9@kalimero.tijl.coosemans.org> In-Reply-To: <20131031025342.GA50515@regency.nsu.ru> References: <20131031025342.GA50515@regency.nsu.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 10:35:48 -0000 On Thu, 31 Oct 2013 09:53:42 +0700 Alexey Dokuchaev wrote: > Hi, > > Judging from /usr/share/mk/bsd.cpu.mk, it knows about both "core" and > "core2" and should be able to give me the list of features these CPUs > support. However, I'm puzzled: > > $ make -V MACHINE_CPU CPUTYPE=core2 > ssse3 sse3 sse2 sse i686 mmx i586 i486 > $ fmake -V MACHINE_CPU CPUTYPE=core2 > ssse3 sse3 sse2 sse i686 mmx i586 i486 > $ make -V MACHINE_CPU CPUTYPE=core > i486 > $ fmake -V MACHINE_CPU CPUTYPE=core > i486 i486 > $ uname -Um > i386 1100000 > > WTF? :) bsd.cpu.mk redefines CPUTYPE sometimes and that doesn't work if you pass it as a command line argument. You can only set this variable in make.conf.