From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 25 16:46:54 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B28C81065673 for ; Thu, 25 Mar 2010 16:46:54 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 573A48FC19 for ; Thu, 25 Mar 2010 16:46:54 +0000 (UTC) Received: by wyb33 with SMTP id 33so3665191wyb.13 for ; Thu, 25 Mar 2010 09:46:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.154.208 with SMTP id h58mr241585wek.46.1269534250273; Thu, 25 Mar 2010 09:24:10 -0700 (PDT) In-Reply-To: <201003242258.05830.lobo@bsd.com.br> References: <201003242258.05830.lobo@bsd.com.br> Date: Thu, 25 Mar 2010 13:24:10 -0300 Message-ID: <9884b5281003250924i462eee68uf2a7eba7dd864033@mail.gmail.com> From: Mario Lobo To: FreeBSD-Questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Compiling kernel with gcc43 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2010 16:46:54 -0000 2010/3/24 Mario Lobo > Hi; > > I followed the instructions from > http://www.freebsd.org/doc/en/articles/custom-gcc/article.html > > to see if I can achieve some performance gain (8-STABLE r205630 amd64) and > also get a more modern instruction set for my Phenom II (amdfam10), so I've > done the following config settings: > > make.conf > > .if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc43) > CC=/usr/local/bin/gcc43 > CXX=/usr/local/bin/g++43 > CPP=/usr/local/bin/cpp43 > CFLAGS+=-mssse3 > CPUTYPE=amdfam10 > .endif > > libmap.conf > > libgcc_s.so.1 gcc43/libgcc_s.so.1 > libgomp.so.1 gcc43/libgomp.so.1 > libobjc.so.3 gcc43/libobjc.so.2 > libssp.so.0 gcc43/libssp.so.0 > libstdc++.so.6 gcc43/libstdc++.so.6 > > > buildworld goes on normally it seems, but when I tried to build the kernel, > the first stop came from the option used by the kernel build "-fformat- > extensions", which is not accepted by gcc43, so I took it out of > /usr/src/sys/conf/kern.mk, the ONLY place I found it. > > It seemed to solve the problem until gcc43 stopped because of the "-Werror" > option, which is all over the place!. Funny that gcc42 (used by default) > doesn't stop because of this option. > > Anyway,my question boils down to: Is there a way to build the kernel with > gcc43, with minimal tweaking? Am i attempting something out of my league? > > Thanks, > -- > Mario Lobo > > Any suggestions/Comments? Should I just dump the gcc43 idea and try this with clang/llvm? I've seen http://wiki.freebsd.org/BuildingFreeBSDWithClang. Anything else to watch out for when building world/kernel/ports? Thanks, -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winfoes FREE)