add qemu with gcc4 hack

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@591 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2008-12-08 11:16:27 +00:00
parent 1cae4c474e
commit 846f57bf93
31 changed files with 2200 additions and 587 deletions

View File

@@ -1,39 +0,0 @@
--- 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

@@ -1,14 +0,0 @@
--- 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

@@ -1,11 +0,0 @@
--- 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

@@ -1,87 +0,0 @@
--- 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

@@ -1 +0,0 @@
INSTALL_DIR=/opt/VirtualBox

View File

@@ -1,21 +0,0 @@
--- 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

@@ -1,4 +0,0 @@
# This file is for registering VirtualBox permanent host networking interfaces
# and optionally adding them to network bridges on the host.
# Each line should be of the format <interface name> <user name> [<bridge>].

View File

@@ -1,11 +0,0 @@
--- 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

@@ -1,33 +0,0 @@
--- 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

@@ -1,11 +0,0 @@
--- 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

@@ -1,11 +0,0 @@
--- 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

@@ -1,130 +0,0 @@
#!/bin/sh
#
# innotek VirtualBox
#
# Copyright (C) 2006-2007 innotek GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
CONFIG="/etc/vbox/vbox.cfg"
if [ ! -r "$CONFIG" ]; then
echo "Could not find VirtualBox installation. Please reinstall."
exit 1
fi
. "$CONFIG"
# Note: This script must not fail if the module was not successfully installed
# because the user might not want to run a VM but only change VM params!
if [ "$1" = "shutdown" ]; then
SHUTDOWN="true"
elif [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
cat << EOF
WARNING: There is no module available for the current kernel (`uname -r`).
Please recompile the kernel module and install it by:
sudo emerge -1 app-emulation/virtualbox-modules
You will not be able to start VMs until this problem is fixed.
EOF
elif ! lsmod|grep -q vboxdrv; then
cat << EOF
WARNING: The vboxdrv kernel module is not loaded.
Please load the kernel module by:
sudo modprobe vboxdrv
You will not be able to start VMs until this problem is fixed.
EOF
elif [ ! -c /dev/vboxdrv ]; then
cat << EOF
WARNING: The character device /dev/vboxdrv does not exist.
Please try to reload the kernel module by:
sudo rmmod vboxdrv; sleep 2; sudo modprobe vboxdrv
and if that is not successful, try to re-install the package by:
sudo emerge -1 app-emulation/virtualbox-modules
You will not be able to start VMs until this problem is fixed.
EOF
elif [ ! -w /dev/vboxdrv ]; then
if [ "`id | grep vboxusers`" = "" ]; then
cat << EOF
WARNING: You are not a member of the "vboxusers" group.
Please add yourself to this group before starting VirtualBox.
You will not be able to start VMs until this problem is fixed.
EOF
else
cat << EOF
WARNING: /dev/vboxdrv not writable for some reason.
If you recently added the current user to the "vboxusers" group
then you have to logout and re-login to take the change effect.
You will not be able to start VMs until this problem is fixed.
EOF
fi
elif [ ! -e /usr/lib/libhal.so ]; then
cat << EOF
WARNING: libhal was not found on this system.
This can create several side effects thus problems,
when accessing host resources (eg: Cd/Dvd readers).
The use of "sys-apps/hal" is still recommended, please install it
to meet this requirement by:
sudo emerge sys-apps/hal
EOF
fi
export LD_LIBRARY_PATH="$INSTALL_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
if [ -z "$SERVER_PID" ]; then
# Server not running yet/anymore, cleanup socket path.
# See IPC_GetDefaultSocketPath()!
if [ -n "$LOGNAME" ]; then
rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1
else
rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1
fi
fi
if [ "$SHUTDOWN" = "true" ]; then
if [ -n "$SERVER_PID" ]; then
kill -TERM $SERVER_PID
sleep 2
fi
exit 0
fi
APP=`which $0`
APP=${APP##/*/}
case "$APP" in
VirtualBox)
exec "$INSTALL_DIR/VirtualBox" "$@"
;;
VBoxManage)
exec "$INSTALL_DIR/VBoxManage" "$@"
;;
VBoxSDL)
exec "$INSTALL_DIR/VBoxSDL" "$@"
;;
VBoxHeadless)
exec "$INSTALL_DIR/VBoxHeadless" "$@"
;;
*)
echo "Unknown application - $APP"
;;
esac

View File

@@ -1,8 +0,0 @@
[Desktop Entry]
Name=Sun xVM VirtualBox
Type=Application
Comment=Run several virtual systems on a single host computer
Exec=VirtualBox
TryExec=VirtualBox
Icon=virtualbox
Categories=System;Emulator;