From owner-freebsd-questions@FreeBSD.ORG Fri Apr 2 15:40:01 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 CB51E106566B; Fri, 2 Apr 2010 15:40:01 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-yx0-f198.google.com (mail-yx0-f198.google.com [209.85.210.198]) by mx1.freebsd.org (Postfix) with ESMTP id 76CB08FC17; Fri, 2 Apr 2010 15:40:01 +0000 (UTC) Received: by yxe36 with SMTP id 36so1662707yxe.13 for ; Fri, 02 Apr 2010 08:40:00 -0700 (PDT) Received: by 10.150.118.34 with SMTP id q34mr2938763ybc.207.1270222800365; Fri, 02 Apr 2010 08:40:00 -0700 (PDT) Received: from papi.localnet ([189.70.250.62]) by mx.google.com with ESMTPS id 15sm6186287gxk.10.2010.04.02.08.39.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 08:39:59 -0700 (PDT) From: Mario Lobo To: Pegasus Mc Cleaft Date: Fri, 2 Apr 2010 12:39:44 +0000 User-Agent: KMail/1.12.4 (FreeBSD/8.0-STABLE; KDE/4.3.5; amd64; ; ) References: <201004011527.o31FRffp053530@lurza.secnetix.de> <201004011653.36780.ken@mthelicon.com> In-Reply-To: <201004011653.36780.ken@mthelicon.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004021239.44148.lobo@bsd.com.br> Cc: freebsd-hackers@freebsd.org, FreeBSD-Questions@freebsd.org Subject: Re: Compiling kernel with gcc43 [SOLVED] 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: Fri, 02 Apr 2010 15:40:02 -0000 On Thursday 01 April 2010 16:53:36 Pegasus Mc Cleaft wrote: > On Thursday 01 April 2010 15:27:41 Oliver Fromme wrote: > > Mario Lobo wrote: > > > [...] > > > It's compiling right now. > > > > > > I'll post my findings and impressions on results and performance right > > > after the next reboot. > > > > So, how is it going? Any benchmarks yet? I'm curious > > if the new gcc version will really make a significant > > difference. > > I would love to see the /etc/make.conf, /etc/src.conf and > /etc/libmap.conf files that were used for the build. I have tried compiling > in VBox a current kernel and world, but it usually just bombs out for me. > I would like to give this a go as well. > > Peg > Well, to tell the truth I wasn't that thrilled with the results. I didn't benchmark anything by my impressions were that at least disk access was a bit slower not only during booting but it was more noticeable to me particularly on a burning DVD session. Of course this is ultra abstract. In all previous experiences I had in burning CD/DVD with k3b, I recollect that during burning, the software buffer and device buffer gouges were always 100%, with the software buffer gouge dropping down occasionally to 89/92%. After recompiling the kernel with gcc43, the software buffer was always empty and the device buffer rarely reached 40/50%. I think (if not mistaken) this means that the device is asking "where is my data??" and the OS is not providing it fast enough. I could not get world to build with gcc43 so I gave that up. Then I moved on to VirtualBox. I managed to have it compiled and running. After long trial and error sessions, I could pin point what was breaking compilation and fixed it. Here are the steps: ------------------------------------------------------------------------------ Compiling vbox/vbox-devel with gcc43 1) /usr/include/cam/cam.h needed #include for FILE define, complained by: work/VirtualBox-3.1.51.r27657_OSE/src/VBox/Main/freebsd/HostHardwareFreeBSD.cpp:47: /usr/include/cam/cam.h:246: error: 'FILE' has not been declared 2)/usr/ports/emulators/virtualbox- ose/work/VirtualBox-3.1.6_OSE/src/VBox/Main/generic/NetIf-generic.cpp needed #include because of popen() (this step is ONLY for virtualbox-ose) 3)/usr/ports/emulators/virtualbox-ose(- devel)/work/VirtualBox-3.1.6_OSE/src/VBox/Main/freebsd/NetIf-freebsd.cpp needed #include because of malloc()/free() 4) Config.kmk needed some tweaks: a) line 1750 - $(APPEND) '$@' 'VBOX_GCC_mtune-generic ?= $(call VBOX_GCC_CHECK_CC,-mtune=amdfam10 -D__FreeBSD_cc_version=0,)' to use instructions closer to Phenom and avoid cc complains. b) took out all references to "-fformat-extensions" and "-fno_format- extensions" c) Preceeded all relevant locations of "/usr/lib \" with "/usr/local/lib/gcc43 \" so kbuild searched there for libraries first. (except TEMPLATE_VBOXQT4GUIEXE_LIBPATH !) d) You can use the same Config.kmk for building kmods as well 5) took out -fformat-extensions from src/sys/conf/kern.mk And I left /etc/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 /etc/make.conf CC=/usr/local/bin/gcc43 CXX=/usr/local/bin/g++43 CPP=/usr/local/bin/cpp43 CFLAGS+=-mssse3 -D__FreeBSD_cc_version=0 CXXFLAGS+=-D__FreeBSD_cc_version=0 CPUTYPE=amdfam10 #MAKEOPTS+= -j4 and /etc/src.conf NO_WERROR= WERROR= ------------------------------------------------------------------------------ New problems started to come when I tried to extend this to other ports, breaking a lot of them, to point of making me revert everything back to what it was. In fact I am still in this process right now, and reving a lot of problems to rebuild kde4. This is it for now, guys. If you find anything new, please post. Best of luck, -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winfoes FREE)