VirtualBox

Changeset 63351 in vbox for trunk/Config.kmk


Ignore:
Timestamp:
Aug 11, 2016 9:48:30 PM (8 years ago)
Author:
vboxsync
Message:

Config.kmk: VBOXR0DRV template for NetBSD.
XXX: The handling of kernel includes needs to be improved.

From Haomai Wang GSoC project with additional changes by Arto Huusko.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r63335 r63351  
    42614261endif # FreeBSD
    42624262
     4263ifeq ($(KBUILD_TARGET),netbsd)
     4264
     4265## The location of the NetBSD kernel headers.
     4266VBOX_NETBSD_SRC ?= /usr/src/sys
     4267
     4268ifeq ($(KBUILD_TARGET_ARCH),amd64)
     4269VBOX_NETBSD_MACHINE_SRC=$(VBOX_NETBSD_SRC)/arch/amd64
     4270else
     4271VBOX_NETBSD_MACHINE_SRC=$(VBOX_NETBSD_SRC)/arch/i386
     4272endif
     4273
     4274TEMPLATE_VBOXR0DRV_TOOL                = $(VBOX_GCC_TOOL)
     4275TEMPLATE_VBOXR0DRV_DEFS               += _KERNEL _MODULE
     4276TEMPLATE_VBOXR0DRV_INCS                = \
     4277        $(VBOX_NETBSD_SRC) \
     4278        $(VBOX_NETBSD_SRC)/../common/include \
     4279        $(PATH_OBJ)/netbsd/include
     4280
     4281TEMPLATE_VBOXR0DRV_CFLAGS              =  \
     4282        $(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) \
     4283        $(VBOX_GCC_fdiagnostics-show-option) \
     4284        -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \
     4285        -Wimplicit-function-declaration -Werror-implicit-function-declaration \
     4286        -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \
     4287        $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
     4288        -nostdinc -std=c99 -msoft-float
     4289TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -m32 \
     4290    -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -mno-avx \
     4291    -mno-fp-ret-in-387
     4292TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 --param inline-unit-growth=100 \
     4293    --param large-function-growth=1000 -fno-omit-frame-pointer \
     4294    -mcmodel=kernel -mno-red-zone -mno-sse -mno-mmx -mno-avx \
     4295        -fno-asynchronous-unwind-tables -mno-fp-ret-in-387
     4296TEMPLATE_VBOXR0DRV_CXXFLAGS            = -fno-exceptions -fno-rtti \
     4297        $(VBOX_GCC_WARN) -Wpointer-arith -Winline \
     4298        -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \
     4299        $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
     4300        -nostdinc -msoft-float
     4301TEMPLATE_VBOXR0DRV_CXXFLAGS.x86        = $(TEMPLATE_VBOXR0DRV_CFLAGS.x86)
     4302TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64      = $(TEMPLATE_VBOXR0DRV_CFLAGS.amd64)
     4303TEMPLATE_VBOXR0DRV_SYSSUFF             = .kmod
     4304TEMPLATE_VBOXR0DRV_LDFLAGS             = -d --warn-common
     4305TEMPLATE_VBOXR0DRV_LDFLAGS.x86         = -m elf_i386
     4306TEMPLATE_VBOXR0DRV_LDFLAGS.amd64       = -m elf_x86_64
     4307
     4308TEMPLATE_VBOXR0DRV_ORDERDEPS = \
     4309        $(PATH_OBJ)/netbsd/include/machine/cdefs.h \
     4310        $(PATH_OBJ)/netbsd/include/i386/cpu.h \
     4311        $(PATH_OBJ)/netbsd/include/x86/cpu.h
     4312
     4313$$(PATH_OBJ)/netbsd/include/machine/cdefs.h: $(VBOX_NETBSD_MACHINE_SRC)/include/cdefs.h
     4314        $(QUIET)$(MKDIR) -p $(@D)
     4315        $(QUIET)cp $(VBOX_NETBSD_MACHINE_SRC)/include/*.h $(@D)/
     4316
     4317# XXX: uwe: the "machine" above should be a symlink to "i386" here
     4318$$(PATH_OBJ)/netbsd/include/i386/cpu.h: $(VBOX_NETBSD_SRC)/arch/i386/include/cpu.h
     4319        $(QUIET)$(MKDIR) -p $(@D)
     4320        $(QUIET)cp $(VBOX_NETBSD_MACHINE_SRC)/include/*.h $(@D)/
     4321
     4322$$(PATH_OBJ)/netbsd/include/x86/cpu.h: $(VBOX_NETBSD_SRC)/arch/x86/include/cpu.h
     4323        $(QUIET)$(MKDIR) -p $(@D)
     4324        $(QUIET)cp $(VBOX_NETBSD_SRC)/arch/x86/include/*.h $(@D)/
     4325
     4326endif # NetBSD
     4327
    42634328ifeq ($(KBUILD_TARGET),haiku)
    42644329## The Haiku include directories
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