From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 6 07:45:00 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585561065678; Tue, 6 Jul 2010 07:45:00 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 507648FC16; Tue, 6 Jul 2010 07:44:59 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA14153; Tue, 06 Jul 2010 10:44:57 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OW2pt-000N2C-EZ; Tue, 06 Jul 2010 10:44:57 +0300 Message-ID: <4C32DEF6.1020409@freebsd.org> Date: Tue, 06 Jul 2010 10:44:54 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: vbox@freebsd.org, freebsd-emulation@freebsd.org References: <4C0DF92C.9020204@icyb.net.ua> In-Reply-To: <4C0DF92C.9020204@icyb.net.ua> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: emulators/virtualbox-ose vs non-base gcc X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2010 07:45:00 -0000 on 08/06/2010 11:02 Andriy Gapon said the following: > I am trying to compile my ports with gcc44 instead of a base gcc. > It seems that currently VirtualBox build system assumes that FreeBSD means base > GCC only. For example, it unconditionally uses -fno-format-extensions and > -fformat-extensions options. Those are extensions available in base GCC, but > not in ports GCCs (at least for time being). > I am not proficient in KBuild, so I don't have a patch, but I can make a > suggestion that for these options CC and CXX should be tested in addition to > KBUILD_TARGET. > > Additionally, two files seem to miss some include directives because of GCC > changes outlined here: > http://gcc.gnu.org/gcc-4.3/porting_to.html I would like to remind that the reported issues are still there with VirtualBox 3.2.6 and something like the following patch is still required. --- src/VBox/Main/freebsd/NetIf-freebsd.cpp.orig 2010-07-06 10:31:07.328680775 +0300 +++ src/VBox/Main/freebsd/NetIf-freebsd.cpp 2010-07-06 10:31:28.000532682 +0300 @@ -44,6 +44,7 @@ #include #include +#include #include #include --- src/VBox/Main/freebsd/HostHardwareFreeBSD.cpp.orig 2010-07-06 10:29:23.130414466 +0300 +++ src/VBox/Main/freebsd/HostHardwareFreeBSD.cpp 2010-07-06 10:32:59.702484321 +0300 @@ -40,6 +40,7 @@ # include # include # include +# include # include # include # include And probably the following should just work too. --- Config.kmk.orig 2010-06-25 17:23:52.000000000 +0300 +++ Config.kmk 2010-07-05 20:59:21.772469818 +0300 @@ -2612,7 +2613,7 @@ $(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \ -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs \ -Wimplicit-function-declaration -Werror-implicit-function-declaration \ - -O2 -fformat-extensions -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ + -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ -nostdinc -std=c99 TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 @@ -2621,7 +2622,7 @@ -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -Wundef TEMPLATE_VBOXR0DRV_CXXFLAGS = -fno-exceptions -fno-rtti \ $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ - -O2 -fno-format-extensions -fno-strict-aliasing -fno-common -finline-limit=8000 \ + -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ -nostdinc TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86) -- Andriy Gapon