summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac@gentoo.org>2023-08-28 13:00:19 +0300
committerViorel Munteanu <ceamac@gentoo.org>2023-08-28 13:07:06 +0300
commit91c36206566e9aebaa0d374752188acca1e49190 (patch)
tree9ad15dbf2ec0e8616699680429ec0bc0f5702bb5 /app-emulation
parentdev-ruby/vagrant_cloud: update EAPI 7 -> 8, add ruby32 (diff)
downloadgentoo-91c36206566e9aebaa0d374752188acca1e49190.tar.gz
gentoo-91c36206566e9aebaa0d374752188acca1e49190.tar.bz2
gentoo-91c36206566e9aebaa0d374752188acca1e49190.zip
app-emulation/virtualbox: fix building with binutils hardened
Closes: https://bugs.gentoo.org/913109 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch35
-rw-r--r--app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild2
2 files changed, 37 insertions, 0 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch b/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch
new file mode 100644
index 000000000000..1a5f85f89ff8
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch
@@ -0,0 +1,35 @@
+Fix building with sys-devel/binutils-2.41-r1[hardened]: read-only segment has dynamic relocations.
+https://bugs.gentoo.org/913109
+
+--- a/src/VBox/Runtime/Makefile.kmk
++++ b/src/VBox/Runtime/Makefile.kmk
+@@ -3238,6 +3238,7 @@
+ endif
+ endif
+ RuntimeR0_INCS = include
++RuntimeR0_LDFLAGS.linux = -z notext
+ RuntimeR0_SOURCES := \
+ $(if $(VBOX_ONLY_VALIDATIONKIT),,../VMM/VBoxVMM.d) \
+ common/checksum/crc32c.cpp \
+--- a/src/VBox/VMM/Makefile.kmk
++++ b/src/VBox/VMM/Makefile.kmk
+@@ -603,6 +603,8 @@
+ VMMR0_DEFS.darwin.amd64 += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0
+ endif
+
++ VMMR0_LDFLAGS.linux += -z notext
++
+ $(call VBOX_SET_VER_INFO_R0,VMMR0,VirtualBox VMM - ring-0 context parts) # Version info / description.
+
+ if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win"
+--- a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
++++ b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk
+@@ -258,7 +258,7 @@
+ VBoxDTraceR0_TEMPLATE = VBoxR0ExtPackDTrace
+ VBoxDTraceR0_DEFS = IN_VBOXDTRACE_R0 IN_RT_R0
+ ifeq ($(VBOX_LDR_FMT),elf)
+- VBoxDTraceR0_LDFLAGS = -e ModuleInit
++ VBoxDTraceR0_LDFLAGS = -e ModuleInit -z notext
+ endif
+ VBoxDTraceR0_INCS = \
+ include \
diff --git a/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild
index d663f08829a9..e6d12f343761 100644
--- a/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild
+++ b/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild
@@ -206,6 +206,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
"${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
"${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
+ # 913109
+ "${FILESDIR}"/${PN}-7.0.10-fix-binutils-hardened.patch
# Downloaded patchset
"${WORKDIR}"/virtualbox-patches-7.0.8/patches