VirtualBox

Changeset 85048 in vbox for trunk


Ignore:
Timestamp:
Jul 3, 2020 9:34:16 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138951
Message:

*.kmk: Replaced $(int-* ) with $(expr ). bugref:9790

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r85046 r85048  
    234234
    235235# Force the additions.sh script to get an exact additions build when we're doing the release.
    236 ifeq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
     236if $(VBOX_VERSION_BUILD) % 2 == 0
    237237  ifeq ($(VBOX_VERSION_PRERELEASE),)
    238238    VBOX_RELEASE_EXACT_MATCH=1
     
    27022702endif
    27032703
    2704 ifeq ($(KBUILD_HOST),win) ## @todo can drop this now, we're not using cygwin.
    2705  # This isn't important (yet) on windows, so cook the result until
    2706  # cygwin is feeling better.
    2707  VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3)
     2704ifeq ($(KBUILD_HOST),win)
     2705 # We're not using gcc on windows anymore, just cook the result.
     2706 VBOX_GCC_VERSION := $(expr 10000 * 3 + 100 * 3 + 3)
    27082707else
    27092708 # This is kind of bad, the returned string needs to be re-evaluated before use.
     
    27122711 # gcc-5 of openSUSE42.1 only returns the major version on `gcc -dumpversion`!
    27132712 VBOX_GCC_VERSION = $(shell ($(1) -dumpfullversion 2>/dev/null || $(1) -dumpversion) | \
    2714     $(SED_EXT) 's|\([0-9][0-9]*\)\.\{0,1\}\([0-9]\{0,\}\)\.\{0,1\}\([0-9]\{0,\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, $$(firstword \2 0)), $$(firstword \3 0))|' )
     2713    $(SED_EXT) 's|\([0-9][0-9]*\)\.\{0,1\}\([0-9]\{0,\}\)\.\{0,1\}\([0-9]\{0,\}\).*|$$(expr 10000 * \1 + 100 * $$(firstword \2 0) + $$(firstword \3 0))|' )
    27152714 ifeq ($(KBUILD_TARGET), darwin)
    27162715  VBOX_CLANG_VERSION = $(shell $(1) --version | \
    2717     $(SED_EXT) -n 's|.*version \([0-9][0-9]*\)\.\{0,1\}\([0-9]\{0,\}\)\.\{0,1\}\([0-9]\{0,\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, $$(firstword \2 0)), $$(firstword \3 0))|p' )
     2716    $(SED_EXT) -n 's|.*version \([0-9][0-9]*\)\.\{0,1\}\([0-9]\{0,\}\)\.\{0,1\}\([0-9]\{0,\}\).*|$$(expr 10000 * \1) + 100 * $$(firstword \2 0) + $$(firstword \3 0))|p' )
    27182717 endif
    27192718endif
     
    28632862        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wextra                ?= $(call VBOX_GCC_CHECK_CC,-Wextra,)'
    28642863        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
    2865         $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40500),)'
     2864        $(QUIET)$(APPEND) '$@' ' if $$(VBOX_GCC_VERSION_CC) >= 40500'
    28662865        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_Wlogical-op         ?= $(call VBOX_GCC_CHECK_CC,-Wlogical-op,)'
    28672866        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_Wno-logical-op      ?= $$(subst -Wlogical-op,-Wno-logical-op,$$(VBOX_GCC_Wlogical-op))
     
    29032902        $(QUIET)$(APPEND) '$@' 'VBOX_LD_as_needed              ?= $(call VBOX_GCC_CHECK_LD,--as-needed,)'
    29042903        $(QUIET)$(APPEND) '$@' 'VBOX_LD_hash_style_sysv        ?= $(call VBOX_GCC_CHECK_LD,--hash-style=sysv,)'
    2905 # gcc version < 3.4 has a bug in handling __attribute__((regparm(3))).
    2906 # See http://osdir.com/ml/gcc.prs/2002-08/msg00223.html and probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20004
    2907         $(QUIET)$(APPEND) '$@' 'VBOX_GCC_BUGGY_REGPARM         ?= $$(int-lt $$(VBOX_GCC_VERSION_CC),30400)'
    29082904# Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number
    29092905# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
    29102906        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
    2911         $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)'
     2907        $(QUIET)$(APPEND) '$@' ' if $$(VBOX_GCC_VERSION_CC) >= 40000'
    29122908        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_fvisibility-hidden  ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT,)'
    29132909        $(QUIET)$(APPEND) '$@' ' endif'
     
    29172913# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
    29182914        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
    2919         $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)'
     2915        $(QUIET)$(APPEND) '$@' ' if $$(VBOX_GCC_VERSION_CXX) >= 40000'
    29202916        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
    29212917        $(QUIET)$(APPEND) '$@' ' endif'
     
    29342930# C++ Std settings
    29352931        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
    2936         $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40800),)'
     2932        $(QUIET)$(APPEND) '$@' ' if $$(VBOX_GCC_VERSION_CXX) >= 40800'
    29372933        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_std ?= -std=c++11'
    2938         $(QUIET)$(APPEND) '$@' ' else ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40600),)'
     2934        $(QUIET)$(APPEND) '$@' ' else if $$(VBOX_GCC_VERSION_CXX) >= 40600'
    29392935        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_std ?= -std=c++0x'
    29402936# darwin Xcode 5 allegedly knows what C++11 is
    29412937ifeq ($(KBUILD_HOST),darwin)
    2942         $(QUIET)$(APPEND) '$@' ' else ifneq ($$(int-ge $$(VBOX_CLANG_VERSION_CXX),50000),)'
     2938        $(QUIET)$(APPEND) '$@' ' else if $$(VBOX_CLANG_VERSION_CXX) >= 50000'
    29432939        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_std ?= -std=c++11'
    29442940endif
  • trunk/Makefile.kmk

    r84954 r85048  
    223223  ifndef VBOX_ONLY_BUILD
    224224   ifneq ($(VBOX_GCC_VERSION_CXX),)
    225     ifeq ($(int-ge $(VBOX_GCC_VERSION_CXX),40400),)
     225    if $(VBOX_GCC_VERSION_CXX) < 40400
    226226     $(error gcc >= 4.4 required when compiling against Qt5!)
    227227    endif
  • trunk/src/VBox/NetworkServices/NAT/Makefile.kmk

    r84540 r85048  
    7777 ifeq ($(KBUILD_TARGET),solaris)
    7878  ifneq ($(VBOX_GCC_VERSION_CXX),)
    79    ifneq ($(int-ge $(VBOX_GCC_VERSION_CXX),40600),)
     79   if $(VBOX_GCC_VERSION_CXX) >= 40600
    8080# we compile C++ code with -std=c++0x / -std=c++11
    8181VBoxNetNAT_CFLAGS.solaris += -std=c99
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette