virtualbox/vbox-fpie.diff
Larry Finger d4f0dc43fc Accepting request 1045400 from home:lwfinger:branches:Virtualization
To eliminate some VM failures while using the kernel version of vboxvideo.ko for Leap 15.4,
  the build of this module is turned on again. Fixes boo#1206651 - Leap 15.4 guests running
  VirtualBox 7.0.4 crash when run on hosts with certain Intel graphics cards
  File "fixes_for_leap15.5.patch" added to fix chanes needed for backports to the Leap 15.5 kernel

OBS-URL: https://build.opensuse.org/request/show/1045400
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=670
2022-12-26 17:18:51 +00:00

26 lines
1.5 KiB
Diff

Index: VirtualBox-7.0.4/Config.kmk
===================================================================
--- VirtualBox-7.0.4.orig/Config.kmk
+++ VirtualBox-7.0.4/Config.kmk
@@ -6674,6 +6674,9 @@ TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.darwi
ifeq ($(KBUILD_TARGET),linux)
# not necessary except USE_LIB_PCAP is defined in SUPR3HardenedMain.cpp
# TEMPLATE_VBOXR3HARDENEDEXE_LIBS += cap
+ TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.linux = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.linux) -fPIE
+ TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.linux = $(TEMPLATE_VBOXR3EXE_CFLAGS.linux) -fPIE
+ TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(TEMPLATE_VBOXR3EXE_LDFLAGS.linux) -pie
endif
ifeq ($(KBUILD_TARGET),win) # No CRT!
TEMPLATE_VBOXR3HARDENEDEXE_SDKS = VBOX_NTDLL $(TEMPLATE_VBOXR3EXE_SDKS)
@@ -6706,8 +6709,8 @@ ifeq ($(KBUILD_TARGET),win) # No CRT!
TEMPLATE_VBOXR3HARDENEDEXE_VBOX_IMPORT_CHECKER.win = noimports
else ifn1of ($(KBUILD_TARGET), os2)
ifneq ($(KBUILD_TYPE),asan) # Keep RPATH in asan builds so we can find libasan.so.X and libubsan.so.Y.
- TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
- TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
+ TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -pie
+ TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) -pie
endif
endif