From owner-freebsd-questions@FreeBSD.ORG Sun Feb 28 14:37:40 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 6CFD5106564A for ; Sun, 28 Feb 2010 14:37:40 +0000 (UTC) (envelope-from aaron.lewis1989@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8388FC2A for ; Sun, 28 Feb 2010 14:37:39 +0000 (UTC) Received: by pwj7 with SMTP id 7so1274546pwj.13 for ; Sun, 28 Feb 2010 06:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=8hQfYbP7QFHCFmK2LVP/+J6efLAlOo1ZM3ieF03Fdps=; b=AWWjEz9lMHj0XZl5kZyzV0JhjXfo+Pm4RtY5pXml/v71Ga0r+xL5+bXQYlJZPmwuxg czVfvxhtMl8uyDhsENpOz7+5Cb1VecSfggyEzKWNXzRVXiqu1D5gPPlZAqlrMYSC9kB+ YYyqOwQbc3DpeJUapfBTCOqZ2yGmJpVIYAc7s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Cscgwh6tmuilXNjbAHaInq/vZQlbbSitlFzV0/4lD0wokRkFeoUgjKl9Y1d6xpBt1z OJvNZcsxx0JJtg9MnzFuZFa/4YsVGg0aRVWY0twtRW+6qkuvyEVNuF0fDYS/hXFduAsP Lpgs3ejiEeHz7vcsNdjeafsk5fEyKdbeg65ns= Received: by 10.142.247.33 with SMTP id u33mr1791399wfh.219.1267367856829; Sun, 28 Feb 2010 06:37:36 -0800 (PST) Received: from ?192.168.0.103? ([112.229.152.74]) by mx.google.com with ESMTPS id 20sm2621259pzk.3.2010.02.28.06.37.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Feb 2010 06:37:36 -0800 (PST) Message-ID: <4B8A7FA7.1070200@gmail.com> Date: Sun, 28 Feb 2010 22:37:27 +0800 From: Aaron Lewis User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Paul B Mahol References: <4B8A63D5.90104@gmail.com> <3a142e751002280624w6f38d297o65b88301b3e5f8d@mail.gmail.com> In-Reply-To: <3a142e751002280624w6f38d297o65b88301b3e5f8d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Sun, 28 Feb 2010 14:37:40 -0000 Really ? It's bad to use custom flags to compile kernel , why do you think so ? I'd like to know more about this : ) So setting optimize compiler flags is only useful for userland stuff ? Paul B Mahol wrote: > On 2/28/10, 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 ? >> > It is bad idea to compile kernel with custom flags. And gcc in FreeBSD > doesn't know about core2, > use 'native' if you must. > > >> And is that useful to let gcc select cpu specified asm code ? >> > > Only for some userland stuff like openssl. > -- Best Regards, Aaron Lewis - PGP: 0xA476D2E9 irc: A4r0n on freenode