Fix gcc 14 build ncpfs

This commit is contained in:
Mario Fetka
2024-12-10 13:55:28 +01:00
parent 96ea326bd7
commit 5f902f1645
30 changed files with 3263 additions and 478 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/python3
# Smoke test for python:
# Test if the python bindings have been built and if python is crashing when creating a manager
def test_module_was_built():
import os
assert os.path.isfile(os.getenv('VBOX_PROGRAM_PATH') + '/VBoxPython3.so')
def test_VirtualBoxManager():
from vboxapi import VirtualBoxManager
try:
manager = VirtualBoxManager()
except:
# if it reaches here, it did not crash
pass

View File

@@ -0,0 +1,18 @@
When compiling with clang we get:
src/VBox/Devices/PC/ipxe/src/core/settings.c:310:8: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
Apply this patch conditionally to disable rebuilding iPxeBiosBin.rom when using clang.
--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
+++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
@@ -45,7 +45,8 @@
iPxeBiosBin_CLEAN = \
$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \
-if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.amd64 darwin.arm64 linux.arm64 os2.x86 solaris.amd64 win.amd64 win.arm64)
+# Disable building on Linux if using clang
+if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.amd64 darwin.arm64 linux.arm64 linux.amd64 os2.x86 solaris.amd64 win.amd64 win.arm64)
$$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $(PATH_SUB_CURRENT)/iPxeBiosBin.rom $(VBOX_BIN2C) | $$(dir $$@)
$(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@)
$(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@