diff --git a/gcc5-real-support.patch b/gcc5-real-support.patch new file mode 100644 index 0000000..f4dbb73 --- /dev/null +++ b/gcc5-real-support.patch @@ -0,0 +1,34 @@ +--- + Config.kmk | 2 +- + configure | 9 +++++++-- + 2 files changed, 8 insertions(+), 3 deletions(-) + +--- a/Config.kmk ++++ b/Config.kmk +@@ -2292,7 +2292,7 @@ else + # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). + # Some versions of gcc (e.g. openSUSE11) return only major.minor on `gcc -dumpversion`. + VBOX_GCC_VERSION = $(shell \ +- $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' ) ++ $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, $$(firstword \2 0)), $$(firstword \3 0))|' ) + endif + + # Find MinGW cross compilers for EFI on non-windows systems. We need to probe +--- a/configure ++++ b/configure +@@ -409,8 +409,13 @@ check_gcc() + log_failure "cannot execute '$CXX -dumpversion'" + fail really + fi +- cc_maj=`echo $cc_ver|cut -d. -f1` +- cc_min=`echo $cc_ver|cut -d. -f2` ++ if echo $cc_ver | grep -q '\.'; then ++ cc_maj=`echo $cc_ver|cut -d. -f1` ++ cc_min=`echo $cc_ver|cut -d. -f2` ++ else ++ cc_maj=$cc_ver ++ cc_min=0 ++ fi + if [ "x$cc_ver" != "x$cxx_ver" ]; then + log_failure "gcc version $cc_ver does not match g++ version $cxx_ver" + fail really diff --git a/gcc5-support.patch b/gcc5-support.patch new file mode 100644 index 0000000..282c2df --- /dev/null +++ b/gcc5-support.patch @@ -0,0 +1,16 @@ +Index: configure +=================================================================== +--- configure (revision 55371) ++++ configure (revision 55372) +@@ -422,8 +422,9 @@ + -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \ + -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \ + -o \( $cc_maj -eq 4 -a $cc_min -gt 9 \) \ +- -o $cc_maj -gt 4 ]; then +- log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 01 or gcc 4.x with 01 or gcc 4.x with 01 or gcc 4.x with 0 %{_builddir}/virtualbox-kmp-template) ExclusiveArch: %ix86 x86_64 %ifarch amd64 x86_64 ia32e em64t BuildRequires: gcc-32bit @@ -186,8 +190,7 @@ websrv GUI part for %{name}. %package host-KMP Summary: Host kernel module for VirtualBox Group: System/Emulators/PC -# SUSE specify macro to define host kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} kdump um xen xenpae} +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE7} -n %{name}-host -f %{SOURCE5} -x kdump um xen xenpae pv %description host-KMP This package contains the kernel-module for VirtualBox. @@ -196,8 +199,7 @@ This package contains the kernel-module for VirtualBox. %package guest-KMP Summary: Guest kernel modules for VirtualBox Group: System/Emulators/PC -#SUSE specify macro to define guest kmp package -%{?suse_kernel_module_package:%suse_kernel_module_package -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} kdump um xen xenpae} +%kernel_module_package -t %{_builddir}/virtualbox-kmp-template -p %{SOURCE8} -n %{name}-guest -f %{SOURCE6} -x kdump um xen xenpae pv %description guest-KMP This package contains the kernel-module for VirtualBox. @@ -259,14 +261,14 @@ Development file for %{name} Summary: Source files for %{name} kernel modules Group: Development/Sources Requires: %{name} = %{version} -BuildArch: noarch Requires: gcc Requires: make +BuildArch: noarch %description host-source Source files for %{name} kernel modules These can be built for custom kernels using -cd /usr/src/kernel-modules/virtualbox ; make ; make install +cd %{_prefix}/src/kernel-modules/virtualbox ; make ; make install ########################################### %package guest-desktop-icons @@ -296,6 +298,9 @@ This package contains icons for guest desktop files that were created on the des %patch103 %patch104 -p1 %patch105 -p1 +%patch106 +%patch107 +%patch108 -p1 #copy user manual cp %{SOURCE1} UserManual.pdf #copy kbuild config