1
0
forked from pool/virtualbox
virtualbox/gcc5-real-support.patch
Larry Finger ff1d6fb65b Accepting request 414498 from home:luizluca:branches:Virtualization
bump to 5.1.2

I tried to keep all Suse customization as they are. Warning dialogs were ported to Qt5.
I did not check for added executables in the new release.

Compile tested on all current targets. Runtime tested on Tumbleweed, both host and guest.

OBS-URL: https://build.opensuse.org/request/show/414498
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=262
2016-07-26 16:15:55 +00:00

34 lines
1.5 KiB
Diff

Index: VirtualBox-5.1.2/Config.kmk
===================================================================
--- VirtualBox-5.1.2.orig/Config.kmk
+++ VirtualBox-5.1.2/Config.kmk
@@ -2542,7 +2542,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
Index: VirtualBox-5.1.2/configure
===================================================================
--- VirtualBox-5.1.2.orig/configure
+++ VirtualBox-5.1.2/configure
@@ -431,8 +431,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