summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac@gentoo.org>2023-06-03 13:24:59 +0300
committerViorel Munteanu <ceamac@gentoo.org>2023-06-03 14:45:14 +0300
commitcd25a2bea10cd8673939b0e5b95d5df3a0802531 (patch)
tree1549dbdd541119af61d9a87678d0935a17ef6ddd /app-emulation
parentsci-geosciences/opencpn: drop 5.6.2-r2, 5.8.2-r1 (diff)
downloadgentoo-cd25a2bea10cd8673939b0e5b95d5df3a0802531.tar.gz
gentoo-cd25a2bea10cd8673939b0e5b95d5df3a0802531.tar.bz2
gentoo-cd25a2bea10cd8673939b0e5b95d5df3a0802531.zip
app-emulation/virtualbox-guest-additions: fix building with gcc-13
Closes: https://bugs.gentoo.org/907597 Closes: https://github.com/gentoo/gentoo/pull/31283 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch24
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.44-r1.ebuild8
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.8-r2.ebuild1
3 files changed, 33 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
new file mode 100644
index 000000000000..8e53107aedbc
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
@@ -0,0 +1,24 @@
+This file ends up included in
+src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp which
+is compiled with -ffreestanding, so it shouldn't include math.h
+
+See also: https://bugs.gentoo.org/907597
+
+--- a/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
++++ b/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
+@@ -169,6 +169,7 @@
+ #ifndef IN_MODULE
+ /* XXX Not for modules */
+ #include <limits.h>
++#if defined __STDC_HOSTED__ && __STDC_HOSTED__ == 1
+ #if !defined(MAXSHORT) || !defined(MINSHORT) || \
+ !defined(MAXINT) || !defined(MININT)
+ /*
+@@ -178,6 +179,7 @@
+
+ #include <math.h>
+ #endif
++#endif // defined __STDC_HOSTED__ && __STDC_HOSTED__ == 1
+ #undef MAXSHORT
+ #define MAXSHORT SHRT_MAX
+ #undef MINSHORT
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.44-r1.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.44-r1.ebuild
index ea083a8adc9f..a40865cf1fec 100644
--- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.44-r1.ebuild
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.44-r1.ebuild
@@ -57,12 +57,20 @@ PDEPEND="
X? ( x11-drivers/xf86-video-vboxvideo )
"
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-kernel-6.4-patch-1.patch
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-kernel-6.4-patch-2.patch
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
+
DOCS=() # Don't install the default README file during einstalldocs
VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
CONFIG_CHECK="DRM_TTM"
src_prepare() {
+ eapply "${PATCHES[@]}"
+
# Remove shipped binaries (kBuild,yasm), see bug #232775
rm -r kBuild/bin tools || die
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.8-r2.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.8-r2.ebuild
index 5657fcc424a6..3ae573b7e126 100644
--- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.8-r2.ebuild
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.8-r2.ebuild
@@ -64,6 +64,7 @@ PDEPEND="
PATCHES=(
"${FILESDIR}"/virtualbox-guest-additions-7.0.8-kernel-6.4-patch-1.patch
"${FILESDIR}"/virtualbox-guest-additions-7.0.8-kernel-6.4-patch-2.patch
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
)
DOCS=() # Don't install the default README file during einstalldocs