Changeset 96589 in vbox
- Timestamp:
- Sep 3, 2022 2:54:22 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r96585 r96589 6331 6331 endif 6332 6332 ifdef VBOX_WITH_NOCRT_STATIC 6333 TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_CFLAGS)) -Zl -EHc-s- -Gy -GR- 6334 TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -Zl -EHc-s- -Gy -GR- 6335 TEMPLATE_VBOXR3STATIC_PCHFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_PCHFLAGS)) -Zl -EHc-s- -Gy -GR- 6333 TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_CFLAGS)) \ 6334 -Zl -EHc-s- -Gy -GR- 6335 TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_CXXFLAGS)) \ 6336 -Zl -EHc-s- -Gy -GR- 6337 TEMPLATE_VBOXR3STATIC_PCHFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE) -EHsc -GR, $(TEMPLATE_VBOXR3EXE_PCHFLAGS)) \ 6338 -Zl -EHc-s- -Gy -GR- 6336 6339 else 6337 TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE) -Gy 6338 TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -MT$(VBOX_VCC_CRT_TYPE) -Gy 6339 TEMPLATE_VBOXR3STATIC_PCHFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_PCHFLAGS)) -MT$(VBOX_VCC_CRT_TYPE) -Gy 6340 endif 6340 TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) \ 6341 -MT$(VBOX_VCC_CRT_TYPE) -Gy 6342 TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CXXFLAGS)) \ 6343 -MT$(VBOX_VCC_CRT_TYPE) -Gy 6344 TEMPLATE_VBOXR3STATIC_PCHFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_PCHFLAGS)) \ 6345 -MT$(VBOX_VCC_CRT_TYPE) -Gy 6346 endif 6347 6341 6348 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120" # Do not use SSE so valkit stuff can run on NT4 w/o needing a separate runtime library. 6342 TEMPLATE_VBOXR3STATIC_CFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) /arch:IA32 6343 TEMPLATE_VBOXR3STATIC_CXXFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) /arch:IA32 6344 TEMPLATE_VBOXR3STATIC_PCHFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) /arch:IA32 6349 TEMPLATE_VBOXR3STATIC_CFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) \ 6350 /arch:IA32 -FI$(PATH_ROOT)/include/iprt/vcc-use-rodata.h # The -FI is explained down in VBOXGUESTR3EXE. 6351 TEMPLATE_VBOXR3STATIC_CXXFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) \ 6352 /arch:IA32 -FI$(PATH_ROOT)/include/iprt/vcc-use-rodata.h 6353 TEMPLATE_VBOXR3STATIC_PCHFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) \ 6354 /arch:IA32 -FI$(PATH_ROOT)/include/iprt/vcc-use-rodata.h 6345 6355 TEMPLATE_VBOXR3STATIC_CFLAGS += -Gw 6346 6356 TEMPLATE_VBOXR3STATIC_CXXFLAGS += -Gw … … 8393 8403 TEMPLATE_VBOXGUESTR3EXE_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK_GST) VBOX_NTDLL 8394 8404 endif 8395 # Hack for running on NT3x, NT4, W2K and XP w/o SP: Change OS and subsystem version in the image. 8396 # The .bss section trick is for NT 3.1 which doesn't support merging initialized and uninitialized 8397 # section because it doesn't recognize Misc.VirtualSize. VBOX_PE_SET_VERSION will unset the !K flag. 8405 # Hack for running on NT3x, NT4, W2K and XP w/o SP: 8406 # 1. Change OS and subsystem version in the image. 8407 # 2. NT 3.1 requires the IAT to be writable, so we end up marking .rdata as writable. 8408 # 3. A follow up to (2) is to split as much out of .rdata as we can by compiling the 8409 # code with a different .rdata section name. This is done in VBOXR3STATIC because 8410 # of the validation kit. (Currently VBOX_WITH_NOCRT_STATIC only, for no particular 8411 # reason.) 8412 # 4. NT 3.1 doesn't support merging initialized and uninitialized section because it 8413 # doesn't recognize Misc.VirtualSize. So, we set the uncached flag (!K) on the 8414 # .bss section make it incompatible with .data. VBOX_PE_SET_VERSION will clear the !K flag. 8398 8415 # HACK ALERT! Double expansion of $$(NLTAB). 8399 8416 TEMPLATE_VBOXGUESTR3EXE_POST_CMDS.win.x86 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) $(out)$$(NLTAB)$(TEMPLATE_$(TEMPLATE_VBOXGUESTR3EXE_EXTENDS)_POST_CMDS)) 8400 8417 TEMPLATE_VBOXGUESTR3EXE_LNK_DEPS.win.x86 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION)) 8401 TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.win.x86 = -Section:.bss,RW!K $(TEMPLATE_$(TEMPLATE_VBOXGUESTR3EXE_EXTENDS)_LDFLAGS.win.x86) 8418 ifndef VBOX_WITH_NOCRT_STATIC 8419 TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.win.x86 = -Section:.bss,RW!K $(TEMPLATE_$(TEMPLATE_VBOXGUESTR3EXE_EXTENDS)_LDFLAGS.win.x86) 8420 endif 8402 8421 8403 8422 if defined(VBOX_WITH_MORE_NT4_COMPAT_BINARIES) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86" … … 8553 8572 TEMPLATE_VBoxGuestR3DllMinW2K_EXTENDS = VBoxGuestR3Dll 8554 8573 ifeq ($(KBUILD_TARGET),win) 8555 TEMPLATE_VBoxGuestR3DllMinW2K_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_VBoxGuestR3Dll_LDFLAGS.win.x86)) 8574 ifndef VBOX_WITH_NOCRT_STATIC # Not present here 8575 TEMPLATE_VBoxGuestR3DllMinW2K_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_VBoxGuestR3Dll_LDFLAGS.win.x86)) 8576 endif 8556 8577 TEMPLATE_VBoxGuestR3DllMinW2K_POST_CMDS.win.x86 = $(subst $(VBOX_PE_SET_VERSION), $(VBOX_PE_SET_VERSION) --w2k,$(TEMPLATE_VBoxGuestR3Dll_POST_CMDS.win.x86)) 8557 8578 TEMPLATE_VBoxGuestR3DllMinW2K_POST_CMDS.win.amd64 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) --w2k3 $(out)$$(NLTAB)$(TEMPLATE_VBoxGuestR3Dll_POST_CMDS.win.amd64)) … … 8565 8586 TEMPLATE_VBoxGuestR3DllMinVista_EXTENDS = VBoxGuestR3Dll 8566 8587 ifeq ($(KBUILD_TARGET),win) 8567 TEMPLATE_VBoxGuestR3DllMinVista_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_VBoxGuestR3Dll_LDFLAGS.win.x86)) 8588 ifndef VBOX_WITH_NOCRT_STATIC # Not present here 8589 TEMPLATE_VBoxGuestR3DllMinVista_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_VBoxGuestR3Dll_LDFLAGS.win.x86)) 8590 endif 8568 8591 TEMPLATE_VBoxGuestR3DllMinVista_POST_CMDS.win.x86 = $(subst $(VBOX_PE_SET_VERSION), $(VBOX_PE_SET_VERSION) --vista,$(TEMPLATE_VBoxGuestR3Dll_POST_CMDS.win.x86)) 8569 8592 TEMPLATE_VBoxGuestR3DllMinVista_POST_CMDS.win.amd64 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) --vista $(out)$$(NLTAB)$(TEMPLATE_VBoxGuestR3Dll_POST_CMDS.win.amd64)) … … 8609 8632 TEMPLATE_NewerVccVBoxGuestR3DllMinVista_EXTENDS = NewerVccVBoxGuestR3Dll 8610 8633 ifeq ($(KBUILD_TARGET),win) 8611 TEMPLATE_NewerVccVBoxGuestR3DllMinVista_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_NewerVccVBoxGuestR3Dll_LDFLAGS.win.x86)) 8634 ifndef VBOX_WITH_NOCRT_STATIC # Not present here 8635 TEMPLATE_NewerVccVBoxGuestR3DllMinVista_LDFLAGS.win.x86 = $(filter-out -Section:.bss$(COMMA)RW!K,$(TEMPLATE_NewerVccVBoxGuestR3Dll_LDFLAGS.win.x86)) 8636 endif 8612 8637 TEMPLATE_NewerVccVBoxGuestR3DllMinVista_POST_CMDS.win.x86 = $(subst $(VBOX_PE_SET_VERSION), $(VBOX_PE_SET_VERSION) --vista,$(TEMPLATE_NewerVccVBoxGuestR3Dll_POST_CMDS.win.x86)) 8613 8638 TEMPLATE_NewerVccVBoxGuestR3DllMinVista_POST_CMDS.win.amd64 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) --vista $(out)$$(NLTAB)$(TEMPLATE_NewerVccVBoxGuestR3Dll_POST_CMDS.win.amd64)) -
trunk/src/VBox/Runtime/common/compiler/vcc/initializers-c-cpp-vcc.cpp
r96407 r96589 81 81 82 82 /* Tell the linker to merge the .CRT* sections into .rdata */ 83 #pragma comment(linker, "/merge:.CRT=.rdata ") 83 #ifdef IPRT_VCC_USING_RODATA_AS_CONST_SEG 84 # pragma comment(linker, "/merge:.CRT=.rodata ") 85 #else 86 # pragma comment(linker, "/merge:.CRT=.rdata ") 87 #endif 84 88 /** @} */ 85 89 -
trunk/src/VBox/Runtime/common/compiler/vcc/tlsdir-vcc.c
r96407 r96589 65 65 66 66 /* Tell the linker to merge the .CRT* sections into .rdata */ 67 #pragma comment(linker, "/merge:.CRT=.rdata ") 67 #ifdef IPRT_VCC_USING_RODATA_AS_CONST_SEG 68 # pragma comment(linker, "/merge:.CRT=.rodata ") 69 #else 70 # pragma comment(linker, "/merge:.CRT=.rdata ") 71 #endif 68 72 /** @} */ 69 73
Note:
See TracChangeset
for help on using the changeset viewer.