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,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