VirtualBox with gcc 4.3

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@391 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2008-07-03 13:27:37 +00:00
parent acc548f02e
commit f06167ca4d
11 changed files with 421 additions and 0 deletions

View File

@ -0,0 +1,11 @@
AUX VirtualBox-gcc43.patch 1971 RMD160 fbcffbd00e8162301077031d0bf8ab42f2dca70b SHA1 83e6337ffda610fcfabeda88128bd42122a6f038 SHA256 f97d93fc36601094ed477bbab5075669df9fd62f272368c5de5628111e8001a9
AUX use-o3-to-workaround-gcc-ice.diff 845 RMD160 afe61a922260348a979f746b83d27c89ac4ba478 SHA1 f8875f474975d33ef2c8707bde4710c7c72f9727 SHA256 4c99526e026799beb2589b15e1e1d2fdb69673a856c43791f56ec4dcd0d2f58b
AUX vbox-futex.diff 549 RMD160 bccac340ffe59864bac026f0dd28894b6fb9498b SHA1 db9a1829c4d39135e2071ef773bc2712cda03cef SHA256 8dfb4f3be9e0048d1cbcebbb3f9e6e4609de1a652ce65adc59e520c66cc1888e
AUX virtualbox-1.6.2-remove-unused.patch 2964 RMD160 ffef7f5935213c569bc941d2585c68bdac1c3b11 SHA1 d58a6a0caa6c6aca71508ddfd530aada406f2c97 SHA256 881eda1f4ae366bce257a49b399448cc182f7d355d842768a289d946c6950bcf
AUX virtualbox-gcc43-fixes.diff 504 RMD160 bc535996d68e1640158fa53f722c19d8fd69ef65 SHA1 05c150841982e99a15813250ef8a6290d1670d84 SHA256 adc92255e83c0adc6daa1d48df71bb4bd95548a89083e577b114bbcf76ddf65a
AUX virtualbox-ose-64issue.diff 581 RMD160 22e749ae1ad84e73b76d2476c8a179b6768be08f SHA1 15e9f1fbd37d3cf0f0b90ebd829342982754db30 SHA256 709f5b0bfb7149b40dfbc345b239d2496d241e9db4b0a24d042da61bfa03a9d0
AUX virtualbox-system-yasm.diff 1274 RMD160 5602e270dd0834d49e8273a7aa25366519d0c2d9 SHA1 77298debf3a4afabacd454350dd6ca512c25d52d SHA256 60cf79f7c7e5f60c1bf27b7bd977436ee8519a2af64fbfee645bce9164749cad
AUX virtualbox-use-intree-yasm.diff 502 RMD160 00f4e18dd032b84b7e195e6d3fb149466e136607 SHA1 8eeb1ca1398e1215bec0d7eaa012100692af26af SHA256 4d817835192a2b7ab3f26574e6bdb9e5ac623a611a8cf9fd382b1888c6b9fa10
AUX virtualbox-validate-op-gcc43.diff 369 RMD160 082a2665d88d1cb941cbfc1af27eb929160d4a6c SHA1 82e7a7346314bcc7e94e363f501708ca58ad1c2b SHA256 a83a002ebcbf5e2a55e8fb061a3cd1231f394c9f4be340000b404c13022eaeaa
DIST VirtualBox-1.6.2-OSE.tar.bz2 35409803 RMD160 9a5fe4746b41a46403921c7a400460cc7abc3c81 SHA1 6811a580b70e651f36002f344033e1db1858fdef SHA256 f458e6ad674ae54ea67b2c8b08816c87b1c4768ec9d43ca041d64a2bcec4eb3b
EBUILD virtualbox-1.6.2.ebuild 5087 RMD160 1b0e7382142987e097ec2a0577d302df0688afdd SHA1 2368868f3f7ba1328c5021757335011a67407baf SHA256 a66d17639c9a05bef4020ef0611d1bbfd6bdc412f1e659ec1742446e0b366105

View File

@ -0,0 +1,39 @@
--- configure.orig 2008-07-03 14:57:47.000000000 +0200
+++ configure 2008-07-03 15:06:48.000000000 +0200
@@ -337,36 +337,6 @@
fail really
elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "OS" = "darwin" ]; then
log_success "found version $cc_ver"
- elif [ $cc_maj -eq 4 -a $cc_min -eq 3 ]; then
- if [ -z "$CC_COMPAT" ]; then
- log ""
- log " ** There are known problems with gcc version 4.3 when compiling the recompiler"
- log " ** stuff. You need to specify a compatibility compiler with version < 4.3. Look"
- log " ** for a package compat-gcc-34 on Fedora systems or something similar on other"
- log " ** distributions and call configure with parameter --with-gcc-compat=gcc34."
- fail really
- fi
- if check_avail "$CC_COMPAT" CC_COMPAT really; then
- cc_compat_ver=`$CC_COMPAT -dumpversion` 2>/dev/null
- if [ $? -ne 0 ]; then
- log_failure "cannot execute '$CC_COMPAT -dumpversion'"
- fail really
- fi
- cc_compat_maj=`echo $cc_compat_ver|cut -d. -f1`
- cc_compat_min=`echo $cc_compat_ver|cut -d. -f2`
- if [ $cc_compat_maj -lt 3 \
- -o \( $cc_compat_maj -eq 3 -a $cc_compat_min -lt 2 \) \
- -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -lt 1 \) \
- -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -gt 2 \) \
- -o $cc_compat_maj -gt 4 ]; then
- log ""
- log " ** Version $cc_compat_ver of the compatibility gcc found. Expected gcc 3.x with x>1"
- log " ** or gcc 4.x with 0<x<3"
- fail really
- fi
- cnf_append "VBOX_RECOMPILER_OP_GCC" "$CC_COMPAT"
- fi
- # gcc-4.0 is allowed for Darwin only
elif [ $cc_maj -lt 3 \
-o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
-o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \

View File

@ -0,0 +1,14 @@
--- src/recompiler/Makefile.kmk
+++ src/recompiler/Makefile.kmk
@@ -231,9 +231,9 @@
# Extra flags for these source modules.
target-i386/op.c_CFLAGS = -O2 -fno-strict-aliasing -fomit-frame-pointer -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls
-target-i386/op.c_CFLAGS.x86 = -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2
+target-i386/op.c_CFLAGS.x86 = -O3 -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2
target-i386/op.c_CFLAGS.darwin.x86 = -m128bit-long-double -mpreferred-stack-boundary=4
-target-i386/helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
+target-i386/helper.c_CFLAGS.x86 = -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse

View File

@ -0,0 +1,11 @@
--- src/VBox/Runtime/r3/linux/semevent-linux.cpp.old 2008-05-04 02:20:12.000000000 +0200
+++ src/VBox/Runtime/r3/linux/semevent-linux.cpp 2008-05-04 02:20:31.000000000 +0200
@@ -77,7 +77,7 @@ struct RTSEMEVENTINTERNAL
static long sys_futex(int32_t volatile *uaddr, int op, int val, struct timespec *utime, int32_t *uaddr2, int val3)
{
errno = 0;
- long rc = syscall(__NR_futex, uaddr, op, val, utime, uaddr2, val3);
+ long rc = syscall(SYS_futex, uaddr, op, val, utime, uaddr2, val3);
if (rc < 0)
{
Assert(rc == -1);

View File

@ -0,0 +1,87 @@
--- Config.kmk.orig 2008-06-06 17:14:01.000000000 +0200
+++ Config.kmk 2008-06-06 17:15:47.000000000 +0200
@@ -132,26 +132,26 @@
# This indicates that additions (of some kind or another) is being _built_.
# VBOX_WITHOUT_ADDITIONS overrides it.
-if1of ($(KBUILD_TARGET),l4 linux os2 solaris win)
- VBOX_WITH_ADDITIONS = 1
-else ifdef VBOX_WITH_WIN32_ADDITIONS # for ssh cross builds -remove later!
- VBOX_WITH_ADDITIONS = 1
-else ifdef VBOX_WITH_LINUX_ADDITIONS # for ssh cross builds - remove later!
- VBOX_WITH_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux os2 solaris win)
+# VBOX_WITH_ADDITIONS = 1
+#else ifdef VBOX_WITH_WIN32_ADDITIONS # for ssh cross builds -remove later!
+# VBOX_WITH_ADDITIONS = 1
+#else ifdef VBOX_WITH_LINUX_ADDITIONS # for ssh cross builds - remove later!
+# VBOX_WITH_ADDITIONS = 1
+#endif
# Build the optional ring-0 part of the additions for syntax checking.
# (Ignored ifndef VBOX_WITH_ADDITIONS. Hack for 32/64 linux issues.)
-VBOX_WITH_ADDITION_DRIVERS = 1
+#VBOX_WITH_ADDITION_DRIVERS = 1
# Build win32 additions (cross building them on linux and l4 using wine).
-if1of ($(KBUILD_TARGET),l4 linux win)
- VBOX_WITH_WIN32_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux win)
+# VBOX_WITH_WIN32_ADDITIONS = 1
+#endif
# Build linux additions.
# Note! VBOX_WITH_LINUX_ADDITIONS will be removed later and only
# VBOX_WITH_WIN32_ADDITIONS will be kept around for cross building.
-if1of ($(KBUILD_TARGET),l4 linux)
- VBOX_WITH_LINUX_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux)
+# VBOX_WITH_LINUX_ADDITIONS = 1
+#endif
# Build X11 additions. Can be disabled separately.
ifndef VBOX_WITH_X11_ADDITIONS
ifdef VBOX_WITH_LINUX_ADDITIONS
@@ -207,7 +207,7 @@
# The SDL based GUI.
VBOX_WITH_VBOXSDL = 1
# The basic frontend (w/o Main).
-VBOX_WITH_VBOXBFE = 1
+#VBOX_WITH_VBOXBFE = 1
# The Qt GUI.
VBOX_WITH_QTGUI = 1
# The Qt 4 GUI (experimental).
@@ -243,9 +243,9 @@
# Enable the kchmviewer
VBOX_WITH_KCHMVIEWER = 1
# Build the testsuite.
-VBOX_WITH_TESTSUITE = 1
+#VBOX_WITH_TESTSUITE = 1
# Build the testcases.
-VBOX_WITH_TESTCASES = 1
+#VBOX_WITH_TESTCASES = 1
# Set this to not use COM or XPCOM in places where it can be avoided.
#VBOX_WITHOUT_COM = 1
# Set this to skip installing the redistributable compiler runtime.
--- configure.orig 2008-06-06 17:14:06.000000000 +0200
+++ configure 2008-06-06 17:15:32.000000000 +0200
@@ -1785,14 +1785,14 @@
# some things are not available in for OSE
if [ $OSE -ge 1 ]; then
cnf_append "VBOX_OSE" "1"
- cnf_append "VBOX_WITH_TESTSUITE" ""
+# cnf_append "VBOX_WITH_TESTSUITE" ""
cnf_append "VBOX_WITH_WIN32_ADDITIONS" ""
- if [ "$OS" = "linux" ]; then
- cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
- else
- cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
- fi
+# if [ "$OS" = "linux" ]; then
+# cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
+# else
+# cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
+# fi
echo >> $CNF
fi

View File

@ -0,0 +1,21 @@
--- src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
+++ src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
@@ -28,6 +28,8 @@
#include "VBoxRegistrationDlg.h"
#endif
+#include <stdlib.h>
+
#include <qapplication.h>
#include <qmessagebox.h>
#include <qpixmap.h>
--- src/VBox/Main/VMMDevInterface.cpp
+++ src/VBox/Main/VMMDevInterface.cpp
@@ -27,6 +27,7 @@
#include <VBox/VBoxGuest.h>
#include <VBox/shflsvc.h>
#include <iprt/asm.h>
+#include <stdlib.h>
#ifdef VBOX_HGCM
#include "hgcm/HGCM.h"

View File

@ -0,0 +1,11 @@
--- src/recompiler/exec.c
+++ src/recompiler/exec.c
@@ -1555,7 +1555,7 @@
ram_addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) +
tlb_entry->addend - (unsigned long)phys_ram_base;
#else
- ram_addr = remR3HCVirt2GCPhys(first_cpu, (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend);
+ ram_addr = (ram_addr_t)remR3HCVirt2GCPhys(first_cpu, (void *)((tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend));
#endif
if (!cpu_physical_memory_is_dirty(ram_addr)) {
tlb_entry->addr_write |= IO_MEM_NOTDIRTY;

View File

@ -0,0 +1,33 @@
--- Config.kmk
+++ Config.kmk
@@ -861,7 +861,7 @@
# We need to export YASM for OSE, but since it was converted to .zip we need to
# allow for the location used by the zip to be properly cleaned up first.
ifeq ($(filter-out win.x86 linux.x86 solaris.x86, $(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)),)
- PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
+ PATH_TOOL_YASM ?= /usr/bin
endif
# XPCOM setup for all but win32.
--- configure
+++ configure
@@ -468,8 +468,8 @@
yasm_min=`echo $yasm_ver|cut -d. -f2`
yasm_rev=`echo $yasm_ver|cut -d. -f3`
yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
- if [ $yasm_ver_mul -lt 501 ]; then
- log_failure "found version $yasm_ver, expected at least 0.5.1"
+ if [ $yasm_ver_mul -lt 600 ]; then
+ log_failure "found version $yasm_ver, expected at least 0.6.0"
fail
else
log_success "found version $yasm_ver"
@@ -1503,7 +1503,7 @@
[ "$OS" != "darwin" ] && check_bcc
[ "$OS" != "darwin" ] && check_iasl
# don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs
-# [ "$OS" != "darwin" ] && check_yasm
+[ "$OS" != "darwin" ] && check_yasm
[ "$OS" != "darwin" ] && check_xsltproc
[ $OSE -eq 0 ] && check_mkisofs

View File

@ -0,0 +1,11 @@
--- Config.kmk.old 2008-06-12 15:05:11.000000000 +0200
+++ Config.kmk 2008-06-12 15:05:40.000000000 +0200
@@ -968,7 +968,7 @@
# We need to export YASM for OSE, but since it was converted to .zip we need to
# allow for the location used by the zip to be properly cleaned up first.
-if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), win.x86 linux.x86 solaris.x86)
+if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), win.x86 linux.x86 linux.amd64 solaris.x86)
PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
endif

View File

@ -0,0 +1,11 @@
--- src/recompiler/Sun/op-validate.sed.old 2008-05-04 02:38:45.000000000 +0200
+++ src/recompiler/Sun/op-validate.sed 2008-05-04 02:39:18.000000000 +0200
@@ -63,6 +63,8 @@
/\.Lfe[0-9][0-9]*:/d
/\.LFE[0-9][0-9]*:/d
/size[[:space:]]/d
+/p2align[[:space:]]/d
+/^[/#][[:space:]]0[[:space:]]\"\"[[:space:]]2[[:space:]]*$/d
/^[/#]NO_APP[[:space:]]*$/d
/^$/!b bad
b end

View File

@ -0,0 +1,172 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-1.6.2.ebuild,v 1.1 2008/06/13 22:45:18 cardoe Exp $
inherit eutils fdo-mime flag-o-matic qt3 toolchain-funcs
MY_P=VirtualBox-${PV}-OSE
DESCRIPTION="Softwarefamily of powerful x86 virtualization"
HOMEPAGE="http://www.virtualbox.org/"
SRC_URI="http://www.virtualbox.org/download/${PV}/${MY_P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="additions alsa headless pulseaudio sdk"
RDEPEND="!app-emulation/virtualbox-bin
~app-emulation/virtualbox-modules-${PV}
dev-libs/libIDL
>=dev-libs/libxslt-1.1.19
dev-libs/xalan-c
dev-libs/xerces-c
!headless? (
$(qt_min_version 3.3.5)
x11-libs/libXcursor
media-libs/libsdl
x11-libs/libXt )"
DEPEND="${RDEPEND}
sys-devel/bin86
sys-devel/dev86
sys-power/iasl
alsa? ( >=media-libs/alsa-lib-1.0.13 )
pulseaudio? ( media-sound/pulseaudio )"
# sys-apps/hal is required at runtime (bug #197541)
RDEPEND="${RDEPEND}
additions? ( ~app-emulation/virtualbox-additions-${PV} )
sys-apps/usermode-utilities
net-misc/bridge-utils
sys-apps/hal"
S=${WORKDIR}/${MY_P/-OSE/}
pkg_setup() {
# The VBoxSDL frontend needs media-libs/libsdl compiled
# with USE flag X enabled (bug #177335)
if ! use headless; then
if ! built_with_use media-libs/libsdl X; then
eerror "media-libs/libsdl was compiled without the \"X\" USE flag enabled."
eerror "Please re-emerge media-libs/libsdl with USE=\"X\"."
die "media-libs/libsdl should be compiled with the \"X\" USE flag."
fi
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
# Don't build things unused or splitted into separate ebuilds (eg: additions)
epatch "${FILESDIR}/${P}-remove-unused.patch"
epatch "${FILESDIR}/use-o3-to-workaround-gcc-ice.diff"
epatch "${FILESDIR}/virtualbox-ose-64issue.diff"
epatch "${FILESDIR}/vbox-futex.diff"
epatch "${FILESDIR}/VirtualBox-gcc43.patch"
epatch "${FILESDIR}/virtualbox-gcc43-fixes.diff"
epatch "${FILESDIR}/virtualbox-validate-op-gcc43.diff"
# epatch "${FILESDIR}/virtualbox-system-yasm.diff"
# epatch "${FILESDIR}/virtualbox-use-intree-yasm.diff"
}
src_compile() {
local myconf
# Don't build vboxdrv kernel module
myconf="--disable-kmods"
if ! use pulseaudio; then
myconf="${myconf} --disable-pulse"
fi
if ! use alsa; then
myconf="${myconf} --disable-alsa"
fi
if use headless; then
myconf="${myconf} --build-headless"
fi
./configure \
${myconf} || die "configure failed"
source ./env.sh
# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
# and strip all flags
strip-flags
MAKE="kmk" emake TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
all || die "kmk failed"
}
src_install() {
cd "${S}"/out/linux.${ARCH}/release/bin
# create virtualbox configurations files
insinto /etc/vbox
newins "${FILESDIR}/${PN}-config" vbox.cfg
newins "${FILESDIR}/${PN}-interfaces" interfaces
insinto /opt/VirtualBox
if use sdk; then
doins -r sdk
fowners root:vboxusers /opt/VirtualBox/sdk/bin/xpidl
fperms 0750 /opt/VirtualBox/sdk/bin/xpidl
fi
rm -rf sdk src tst* testcase xpidl SUPInstall SUPUninstall VBox.png \
VBoxBFE vditool VBoxSysInfo.sh vboxkeyboard.tar.gz
doins -r *
if ! use headless; then
for each in VBox{Manage,SDL,SVC,XPCOMIPCD,Tunctl,Headless} VirtualBox ; do
fowners root:vboxusers /opt/VirtualBox/${each}
fperms 0750 /opt/VirtualBox/${each}
done
dosym /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
newicon "${S}"/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png ${PN}.png
domenu "${FILESDIR}"/${PN}.desktop
else
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,Headless} ; do
fowners root:vboxusers /opt/VirtualBox/${each}
fperms 0750 /opt/VirtualBox/${each}
done
fi
exeinto /opt/VirtualBox
newexe "${FILESDIR}/${PN}-wrapper" "VBox.sh" || die
fowners root:vboxusers /opt/VirtualBox/VBox.sh
fperms 0750 /opt/VirtualBox/VBox.sh
newexe "${S}"/src/VBox/Installer/linux/VBoxAddIF.sh "VBoxAddIF.sh" || die
fowners root:vboxusers /opt/VirtualBox/VBoxAddIF.sh
fperms 0750 /opt/VirtualBox/VBoxAddIF.sh
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
dosym /opt/VirtualBox/VBoxTunctl /usr/bin/VBoxTunctl
dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxAddIF
dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxDeleteIF
}
pkg_postinst() {
fdo-mime_desktop_database_update
elog ""
if ! use headless; then
elog "To launch VirtualBox just type: \"VirtualBox\""
fi
elog "You must be in the vboxusers group to use VirtualBox,"
elog ""
elog "The last user manual is available for download at:"
elog "http://www.virtualbox.org/download/UserManual.pdf"
elog ""
}
pkg_postrm() {
fdo-mime_desktop_database_update
}