VirtualBox

Changeset 84947 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Jun 25, 2020 11:52:07 AM (4 years ago)
Author:
vboxsync
Message:

/linux/Makefile*,++: BUILD_TYPE -> VBOX_KBUILD_TYPE; BUILD_TARGET_ARCH -> VBOX_KBUILD_TARGET_ARCH

Location:
trunk/src/VBox/Installer/linux
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/Makefile-footer.gmk

    r82968 r84947  
    2727#
    2828VBOXMOD_0_KFLAGS := -D__KERNEL__ -DMODULE -DRT_WITHOUT_PRAGMA_ONCE $(addprefix -D,$(VBOXMOD_DEFS))
    29 ifeq ($(BUILD_TARGET_ARCH),amd64)
     29ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64)
    3030VBOXMOD_0_KFLAGS += -DRT_ARCH_AMD64
    3131else
     
    3333endif
    3434
    35 ifeq ($(BUILD_TYPE),debug)
     35ifeq ($(VBOX_KBUILD_TYPE),debug)
    3636# The -Wno-array-bounds is because of a bug in gcc 4.something, see
    3737# https://sourceware.org/bugzilla/show_bug.cgi?id=10001
     
    5353VBOXMOD_EXT := o
    5454
    55  ifeq ($(BUILD_TARGET_ARCH),amd64)
     55 ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64)
    5656VBOXMOD_0_KFLAGS += -mcmodel=kernel
    5757 endif
  • trunk/src/VBox/Installer/linux/Makefile-header.gmk

    r82968 r84947  
    3737# include $(obj)/Makefile-footer.gmk
    3838#
    39 # The kmk kBuild define KBUILD_TARGET_ARCH is available.
     39# To avoid potential confusion between kmk/kBuild and linux/kbuild,
     40# we use VBOX_KBUILD_TARGET_ARCH instead of KBUILD_TARGET_ARCH and
     41# VBOX_KBUILD_TYPE instead of KBUILD_TYPE.  The VBOX_KBUILD_ variable
     42# variant takes percedence over the kmk/kBuild ones.
    4043#
    4144
     
    4447# First, figure out which architecture we're targeting and the build type.
    4548# (We have to support basic cross building (ARCH=i386|x86_64).)
    46 # While at it, warn about BUILD_* vars found to help with user problems.
    47 #
     49# While at it, warn about *BUILD_* vars found to help with user problems.
     50#
     51
     52# VBOX_KBUILD_TARGET_ARCH = amd64|x86
    4853ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
    49  BUILD_TARGET_ARCH_DEF := amd64
    50 else
    51  BUILD_TARGET_ARCH_DEF := x86
    52 endif
    53 ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
    54  $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
    55  BUILD_TARGET_ARCH :=
    56 endif
    57 ifeq ($(BUILD_TARGET_ARCH),)
     54 VBOX_KBUILD_TARGET_ARCH_DEFAULT := amd64
     55else
     56 VBOX_KBUILD_TARGET_ARCH_DEFAULT := x86
     57endif
     58ifdef VBOX_KBUILD_TARGET_ARCH
     59 ifneq ($(filter-out amd64 x86,$(VBOX_KBUILD_TARGET_ARCH)),)
     60  $(warning Ignoring unknown VBOX_KBUILD_TARGET_ARCH value '$(VBOX_KBUILD_TARGET_ARCH)'.)
     61  VBOX_KBUILD_TARGET_ARCH :=
     62 endif
     63else
     64 ifdef KBUILD_TARGET_ARCH
     65  ifneq ($(filter-out amd64 x86,$(KBUILD_TARGET_ARCH)),)
     66  $(warning Ignoring unknown KBUILD_TARGET_ARCH value '$(KBUILD_TARGET_ARCH)'.)
     67  VBOX_KBUILD_TARGET_ARCH :=
     68  endif
     69  else
     70   ifdef BUILD_TARGET_ARCH
     71    $(warning BUILD_TARGET_ARCH is deprecated, use VBOX_KBUILD_TARGET_ARCH instead.)
     72    ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
     73     $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
     74     VBOX_KBUILD_TARGET_ARCH :=
     75   endif
     76  endif
     77 endif
     78endif
     79ifeq ($(VBOX_KBUILD_TARGET_ARCH),)
    5880 ifeq ($(ARCH),x86_64)
    59   BUILD_TARGET_ARCH := amd64
     81  VBOX_KBUILD_TARGET_ARCH := amd64
    6082 else
    6183  ifeq ($(ARCH),i386)
    62    BUILD_TARGET_ARCH := x86
     84   VBOX_KBUILD_TARGET_ARCH := x86
    6385  else
    64    BUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH_DEF)
    65   endif
    66  endif
    67 else
    68  ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
    69   $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
    70  endif
    71 endif
    72 
    73 ifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
    74  $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
    75  BUILD_TYPE :=
    76 endif
    77 ifeq ($(BUILD_TYPE),)
    78  BUILD_TYPE := release
    79 else
    80  ifneq ($(BUILD_TYPE),release)
     86   VBOX_KBUILD_TARGET_ARCH := $(VBOX_KBUILD_TARGET_ARCH_DEFAULT)
     87  endif
     88 endif
     89else
     90 ifneq ($(VBOX_KBUILD_TARGET_ARCH),$(VBOX_KBUILD_TARGET_ARCH_DEFAULT))
     91  $(warning Using VBOX_KBUILD_TARGET_ARCH='$(VBOX_KBUILD_TARGET_ARCH)' from the $(origin VBOX_KBUILD_TARGET_ARCH).)
     92 endif
     93endif
     94
     95# VBOX_KBUILD_TYPE = release|debug|profile|strict
     96ifdef VBOX_KBUILD_TYPE
     97 VBOX_KBUILD_TYPE_VAR := VBOX_KBUILD_TYPE
     98 ifneq ($(filter-out release profile debug strict,$(VBOX_KBUILD_TYPE)),)
     99  $(warning Ignoring unknown VBOX_KBUILD_TYPE value '$(VBOX_KBUILD_TYPE)'.)
     100  VBOX_KBUILD_TYPE :=
     101 endif
     102else
     103 ifdef KBUILD_TYPE
     104  VBOX_KBUILD_TYPE_VAR := KBUILD_TYPE
     105  VBOX_KBUILD_TYPE := $(KBUILD_TYPE)
     106  ifneq ($(filter-out release profile debug strict,$(KBUILD_TYPE)),)
     107   $(warning Ignoring unknown KBUILD_TYPE value '$(KBUILD_TYPE)'.)
     108   VBOX_KBUILD_TYPE :=
     109  endif
     110 else
     111  ifdef BUILD_TYPE
     112   $(warning BUILD_TYPE is deprecated, use VBOX_KBUILD_TYPE instead.)
     113   VBOX_KBUILD_TYPE_VAR := BUILD_TYPE
     114   VBOX_KBUILD_TYPE := $(BUILD_TYPE)
     115   ifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
     116    $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
     117    VBOX_KBUILD_TYPE :=
     118   endif
     119  endif
     120 endif
     121endif
     122ifeq ($(VBOX_KBUILD_TYPE),)
     123 VBOX_KBUILD_TYPE_VAR = VBOX_KBUILD_TYPE
     124 VBOX_KBUILD_TYPE := release
     125else
     126 ifneq ($(VBOX_KBUILD_TYPE),release)
    81127  ifndef VBOX_KERN_QUIET
    82    $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
    83   endif
    84  endif
    85 endif
     128   $(warning Using VBOX_KBUILD_TYPE='$(VBOX_KBUILD_TYPE)' from the $(origin $(VBOX_KBUILD_TYPE_VAR)) ($(VBOX_KBUILD_TYPE_VAR)).)
     129  endif
     130 endif
     131endif
     132
    86133ifeq ($(USERNAME),)
    87134 USERNAME := noname
  • trunk/src/VBox/Installer/linux/install.sh

    r82968 r84947  
    3636# The "BUILD_" prefixes prevent the variables from being overwritten when we
    3737# read the configuration from the previous installation.
    38 BUILD_BUILDTYPE="_BUILDTYPE_"
     38BUILD_VBOX_KBUILD_TYPE="_BUILDTYPE_"
    3939BUILD_USERNAME="_USERNAME_"
    4040CONFIG_DIR="/etc/vbox"
     
    308308    echo "INSTALL_REV='$SVNREV'" >> $CONFIG_DIR/$CONFIG
    309309    echo "# Build type and user name for logging purposes" >> $CONFIG_DIR/$CONFIG
    310     echo "BUILD_TYPE='$BUILD_BUILDTYPE'" >> $CONFIG_DIR/$CONFIG
     310    echo "VBOX_KBUILD_TYPE='$BUILD_VBOX_KBUILD_TYPE'" >> $CONFIG_DIR/$CONFIG
    311311    echo "USERNAME='$BUILD_USERNAME'" >> $CONFIG_DIR/$CONFIG
    312312
  • trunk/src/VBox/Installer/linux/vboxdrv.sh

    r82968 r84947  
    5858
    5959[ -f /etc/vbox/vbox.cfg ] && . /etc/vbox/vbox.cfg
    60 export BUILD_TYPE
     60export VBOX_KBUILD_TYPE
    6161export USERNAME
    6262export USER=$USERNAME
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