VirtualBox

Ignore:
Timestamp:
Jan 17, 2022 10:51:43 AM (3 years ago)
Author:
vboxsync
Message:

Add,SUP: x86 build adjustments for /guard:cf. bugref:10162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/driver/Makefile.kmk

    r93251 r93265  
    2121#
    2222# VBoxSF
     23# Note! On X86 this is only used for windows 8 and later.
     24# Note! On X86 we must link against ntoskrnl.lib from the default WDK when /guard:cf is enabled,
     25#       or the linker barfs at loadcfg.obj not containing a large enough load config structure.
    2326#
    2427SYSMODS += VBoxSF
     
    4750        $(VBoxSF_0_OUTDIR)/rdbsslib.lib \
    4851        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/copysup.lib \
     52        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
     53        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib
     54ifneq ($(VBOX_VCC_CC_GUARD_CF),)
     55 VBoxSF_LIBS += \
     56        $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
     57        $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
     58else
     59 VBoxSF_LIBS += \
    4960        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ntoskrnl.lib \
    50         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/hal.lib \
    51         $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/ksecdd.lib \
    52         $(PATH_SDK_$($(if-expr "$(VBOX_VCC_TOOL_STEM)" >= "VCC142" && !defined(VBOX_WITHOUT_CONTROL_FLOW_GUARD),VBOX_WINDDK,VBOX_WINDDK_GST_WLH))_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib \
    53         \
     61        $(PATH_SDK_$(VBOX_WINDDK_GST_WLH)_LIB.$(KBUILD_TARGET_ARCH))/BufferOverflowK.lib
     62endif
     63VBoxSF_LIBS += \
    5464        $(VBOX_LIB_VBGL_R0) \
    5565        $(VBOX_LIB_IPRT_GUEST_R0)
     
    5868        $(VBoxSF_0_OUTDIR)/rdbsslib.lib
    5969
     70VBoxSF_USES.win += vboximportchecker
     71VBoxSF_VBOX_IMPORT_CHECKER.win.x86 = w8/r0
     72VBoxSF_VBOX_IMPORT_CHECKER.win.amd64 = xp64/r0
     73
    6074
    6175ifeq ($(KBUILD_TARGET_ARCH),x86)
     76 #
     77 # This driver version is used for Windows 2000, XP, W2K3, Vista and 7.
     78 #
    6279 SYSMODS += VBoxSFW2K
    63 
    6480 VBoxSFW2K_EXTENDS      := VBoxSF
    6581 VBoxSFW2K_SDKS         = ReorderCompilerIncs $(VBOX_WINDDK_GST_W2K3)
     
    6884        $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib \
    6985        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/copysup.lib \
    70         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
    7186        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/hal.lib \
    7287        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ksecdd.lib \
    73         $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib \
    74         $(PATH_SDK_$($(if-expr "$(VBOX_VCC_TOOL_STEM)" >= "VCC142" && !defined(VBOX_WITHOUT_CONTROL_FLOW_GUARD),VBOX_WINDDK,VBOX_WINDDK_GST_W2K3))_LIB.x86)/BufferOverflowK.lib \
    7588        \
    7689        $(VBOX_LIB_VBGL_R0) \
    7790        $(VBOX_LIB_IPRT_GUEST_R0)
     91 ifneq ($(VBOX_VCC_CC_GUARD_CF),)
     92  VBoxSFW2K_LIBS += \
     93        $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/ntoskrnl.lib \
     94        $(PATH_SDK_$(VBOX_WINDDK_GST)_LIB.x86)/BufferOverflowK.lib
     95 else
     96  VBoxSFW2K_LIBS += \
     97        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/ntoskrnl.lib \
     98        $(PATH_SDK_$(VBOX_WINDDK_GST_W2K3)_LIB.x86)/BufferOverflowK.lib
     99 endif
    78100 VBoxSFW2K_CLEAN = \
    79101        $(VBoxSFW2K_0_OUTDIR)/rdbsslib.lib
     102 VBoxSFW2K_USES.win += vboximportchecker
     103 VBoxSFW2K_VBOX_IMPORT_CHECKER.win.x86 = w2k/r0
    80104endif
    81105
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette