VirtualBox

Changeset 66070 in vbox for trunk


Ignore:
Timestamp:
Mar 13, 2017 8:01:22 PM (8 years ago)
Author:
vboxsync
Message:

Config.kmk: remove TEMPLATE_VBOXR0DRV_TOOL for Linux. The hack for getting VBOX_LINUX_INCLUDE was evil!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r66064 r66070  
    37423742
    37433743#
    3744 # The linux kernel headers(/sources).
    3745 #
    3746 if1of ($(KBUILD_TARGET), linux)
    3747  ifeq ($(origin VBOX_LINUX_SRC),undefined)
    3748   ifneq ($(wildcard /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h  /lib/modules/$(shell uname -r)/build/include/generated/autoconf.h),)
    3749    export VBOX_LINUX_SRC := /lib/modules/$(shell uname -r)/build
    3750   else
    3751    export VBOX_LINUX_SRC := /usr/src/linux
    3752   endif
    3753  endif
    3754  ifneq ($(VBOX_LINUX_SRC),)
    3755   ifeq ($(origin VBOX_LINUX_INCS),undefined)
    3756    export VBOX_LINUX_INCS := $(VBOX_LINUX_SRC)/include
    3757    # XXX hack alert! Support split Linux kernels (make O=<build directory>). kernelpath points to
    3758    #                 the obj directory while VBOX_LINUX_SRC points to the virgin source directory.
    3759    # XXX put this crap elsewhere
    3760    kernelpath := $(shell $(SED_EXT) -ne 's+^KERNELSRC.*= *\(.*\)+\1+p' $(VBOX_LINUX_SRC)/Makefile)
    3761    ifeq ($(kernelpath),)
    3762     # Linux >= 2.6.25
    3763     kernelpath := $(shell $(SED_EXT) -ne 's+^MAKEARGS *:= *-C *\(\S*\).*+\1+p' $(VBOX_LINUX_SRC)/Makefile)
    3764    endif
    3765    ifneq ($(kernelpath),)
    3766     # absolute path?
    3767     ifneq ($(patsubst /%,,$(kernelpath)),)
    3768      # no, relative path
    3769      kernelpath := $(realpath $(VBOX_LINUX_SRC)/$(kernelpath))
    3770     endif
    3771    endif
    3772    ifneq ($(kernelpath),)
    3773     VBOX_LINUX_INCS += $(VBOX_LINUX_SRC)/include2 $(kernelpath)/include
    3774    else
    3775     kernelpath := $(VBOX_LINUX_SRC)
    3776    endif
    3777    #
    3778    VBOX_LINUX_INCS  += $(kernelpath)/include/asm-i386/mach-default \
    3779                        $(kernelpath)/include/asm-x86/mach-default \
    3780                        $(kernelpath)/include/drm \
    3781                        $(kernelpath)/arch/x86/include \
    3782                        $(kernelpath)/arch/x86/include/asm/mach-default \
    3783                        $(kernelpath)/arch/x86/include/uapi \
    3784                        $(VBOX_LINUX_SRC)/arch/x86/include/generated \
    3785                        $(VBOX_LINUX_SRC)/arch/x86/include/generated/uapi \
    3786                        $(kernelpath)/include/uapi \
    3787                        $(VBOX_LINUX_SRC)/include/generated/uapi \
    3788                        $(kernelpath)/include
    3789   endif
    3790  endif
    3791  # Since Linux 2.6.15, <linux/autoconf.h> is included like this. It cannot hurt to do the
    3792  # same for older Linux kernels
    3793  ifneq ($(wildcard $(kernelpath)/include/linux/kconfig.h),)
    3794   # Linux >= 3.1
    3795   export VBOX_LINUX_INCLUDE := -include $(kernelpath)/include/linux/kconfig.h
    3796  else ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/generated/autoconf.h),)
    3797   # Linux >= 2.6.33
    3798   export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/generated/autoconf.h
    3799  else ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/linux/autoconf.h),)
    3800   # Linux < 2.6.33
    3801   export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/linux/autoconf.h
    3802  endif
    3803 endif
    3804 
    3805 #
    38063744# Determine Solaris version.
    38073745#
     
    41814119
    41824120ifeq ($(KBUILD_TARGET),linux)
    4183 TEMPLATE_VBOXR0DRV_TOOL                = $(VBOX_GCC_TOOL)
    4184 TEMPLATE_VBOXR0DRV_INSTTYPE.linux      = none
    4185 TEMPLATE_VBOXR0DRV_DEFS               += __KERNEL__ MODULE
    4186 TEMPLATE_VBOXR0DRV_INCS                = $(VBOX_LINUX_INCS)
    4187 TEMPLATE_VBOXR0DRV_CFLAGS              = -fno-pie -nostdinc -iwithprefix include $(VBOX_LINUX_INCLUDE) \
    4188         $(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare $(VBOX_GCC_fdiagnostics-show-option) \
    4189         $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \
    4190         -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
    4191 TEMPLATE_VBOXR0DRV_CFLAGS.x86          = -mpreferred-stack-boundary=2 -msoft-float
    4192 TEMPLATE_VBOXR0DRV_CFLAGS.amd64        = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
    4193         -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time -Wno-sign-compare
    4194 TEMPLATE_VBOXR0DRV_CXXFLAGS            = $(filter-out -Wstrict-prototypes -Wno-pointer-sign -ffreestanding -Werror-implicit-function-declaration,$(TEMPLATE_VBOXR0DRV_CFLAGS) $(TEMPLATE_VBOXR0DRV_CFLAGS.$(KBUILD_TARGET_ARCH))) -fno-exceptions -fno-rtti
    4195   ifndef VBOX_LINUX_VERSION_2_4
    4196 # 2.6
    4197 TEMPLATE_VBOXR0DRV_SYSSUFF             = .ko
    4198 TEMPLATE_VBOXR0DRV_LDFLAGS.x86         = -m elf_i386 -r
    4199 TEMPLATE_VBOXR0DRV_LDFLAGS.amd64       = -m elf_x86_64 -r
    4200   else
    4201 # 2.4
    4202 TEMPLATE_VBOXR0DRV_SYSSUFF             = .o
    4203 TEMPLATE_VBOXR0DRV_LDFLAGS             = -r -s
    4204   endif
     4121TEMPLATE_VBOXR0DRV_TOOL                = $(NO_SUCH_VARIABLE)
    42054122endif
    42064123
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