From owner-freebsd-questions@FreeBSD.ORG Tue Mar 2 19:45:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 025CC106567B for ; Tue, 2 Mar 2010 19:45:18 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8848FC24 for ; Tue, 2 Mar 2010 19:45:17 +0000 (UTC) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 4D856EB4828; Tue, 2 Mar 2010 21:45:16 +0200 (EET) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 553C0160D1E; Tue, 2 Mar 2010 21:45:16 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HBysJabNfHSS; Tue, 2 Mar 2010 21:45:16 +0200 (EET) Received: from kobe.laptop (ppp-94-64-230-198.home.otenet.gr [94.64.230.198]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 16BCF160D1C; Tue, 2 Mar 2010 21:45:16 +0200 (EET) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o22JjCiQ003179 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Mar 2010 21:45:13 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o22Fbpof002896; Tue, 2 Mar 2010 17:37:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Aaron Lewis References: <4B8A63D5.90104@gmail.com> Date: Tue, 02 Mar 2010 17:37:50 +0200 In-Reply-To: <4B8A63D5.90104@gmail.com> (Aaron Lewis's message of "Sun, 28 Feb 2010 20:38:45 +0800") Message-ID: <87iq9e7n01.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Compiler Flags problem with core2 CPU X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 19:45:18 -0000 On Sun, 28 Feb 2010 20:38:45 +0800, Aaron Lewis wrote: > Hi, > I gonna recompile kernel for my core2 CPU , so i'd like to pass some > flags to gcc. > Kinds of "-march=core2" , i tried to modify /etc/make.conf > e.g CFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse > But it fails .. bad arch switch , core2 cpu is not supported ? > > And is that useful to let gcc select cpu specified asm code ? See the section "3.17.14 Intel 386 and AMD x86-64 Options" in the gcc Info manual. It contains a full list of the supported CPU-TYPE values for the -mtune=CPU-TYPE option. The -march=CPU-TYPE option accepts the same CPU types: `-march=CPU-TYPE' Generate instructions for the machine type CPU-TYPE. The choices for CPU-TYPE are the same as for `-mtune'. Moreover, specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.