VirtualBox

Changeset 5902

Show
Ignore:
Timestamp:
12/02/07 10:50:36 (1 year ago)
Author:
vboxsync
Message:

More cygwin avoidance hacking. Some todos as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Config.kmk

    r5898 r5902  
    935935endif 
    936936 
     937# These tests never worked on Windows because of /dev/null, so, there 
     938# can be no harm in just dropping them until cygwin is mp safe. 
     939ifeq ($(BUILD_PLATFORM),win) 
     940VBOX_GCC_CHECK_CC = $(2) 
     941VBOX_GCC_CHECK_CXX = $(2) 
     942VBOX_GCC32_CHECK_CXX = $(2) 
     943else 
    937944VBOX_GCC_CHECK_CC = $(shell \ 
    938945   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \ 
     
    949956   then echo "$(1)"; \ 
    950957   else echo "$(2)"; fi; ) 
    951  
     958endif 
     959 
     960ifeq ($(BUILD_PLATFORM),win) 
     961# This isn't important (yet) on windows, so cook the result until 
     962# cygwin is feeling better. 
     963VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3) 
     964else 
    952965# This is kind of bad, the returned string needs to be re-evaluated before use. 
    953966# The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). 
    954967VBOX_GCC_VERSION = $(shell \ 
    955968  $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\([0-9]\)|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), \3)|' ) 
     969endif 
    956970 
    957971# No $(QUIET) here as it's interesting to see what goes into the file. 
     
    961975        $(QUIET)$(MKDIR) -p $(@D) 
    962976 
    963        @# HC compiler switch detection. 
     977# HC compiler switch detection. 
    964978        $(APPEND) '$@' 'VBOX_GCC_VERSION_CC            ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))' 
    965979        $(APPEND) '$@' 'VBOX_GCC_VERSION_CXX           ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))' 
     
    970984        $(APPEND) '$@' 'VBOX_GCC_Wno-extra             ?= $(call VBOX_GCC_CHECK_CXX,-Wno-extra)' 
    971985        $(APPEND) '$@' 'VBOX_GCC_fno-stack-protector   ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)' 
    972        @# Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2. 
     986# Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2. 
    973987        $(APPEND) '$@' 'VBOX_GCC_mtune-generic         ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)' 
    974988ifneq ($(BUILD_TARGET),l4) 
    975        @# Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number 
    976        @# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4. 
     989# Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number 
     990# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4. 
    977991        $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)' 
    978992        $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)' 
     
    982996endif 
    983997ifneq ($(BUILD_TARGET),l4) 
    984        @# Set default attribute for inline functions to ``hidden'' to reduce the number 
    985        @# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4. 
     998# Set default attribute for inline functions to ``hidden'' to reduce the number 
     999# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4. 
    9861000        $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)' 
    9871001        $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)' 
     
    9901004        $(APPEND) '$@' 'endif' 
    9911005endif 
    992         @# Find the compiler includes for IPRT no-crt. 
    993         @# Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host. 
     1006# Find the compiler includes for IPRT no-crt. 
     1007# Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host. 
     1008ifeq ($(BUILD_PLATFORM),win) 
     1009# With the cygwin issues and gcc on windows returning a useless path, just skip this on windows. 
     1010        $(APPEND) '$@' 'VBOX_PATH_GCC_INCS             ?= ' 
     1011else 
    9941012        $(APPEND) '$@' 'VBOX_PATH_GCC_INCS             ?= $(shell LC_ALL=C $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-search-dirs|$(SED_EXT) -ne 's+^install: \(.*[^/][^/]*\)/+\1+p')/include' 
    995  
    996        @# 32-bit (GC) compiler switch detection. 
     1013endif 
     1014# 32-bit (GC) compiler switch detection. 
    9971015        $(APPEND) '$@' 'VBOX_GCC32_VERSION_CC          ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))' 
    9981016        $(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX         ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))' 
     
    26062624        $(call MSG_GENERATE,,$@) 
    26072625        $(QUIET)$(MKDIR) -p $(@D) 
    2608         $(QUIET)$(RM) -f $(filter-out $@,$(wildcard $(PATH_OUT)/version-stamp-*)
    2609         $(QUIET)$(ECHO_EXT) > $@ 
     2626        $(QUIET)$(RM) -f $(wildcard $(PATH_OUT)/version-stamp-*
     2627        $(QUIET)$(APPEND) $@ $(VBOX_VERSION_STRING) 
    26102628 
    26112629$(VBOX_VERSION_HEADER): $(VBOX_VERSION_STAMP) 
     
    26402658ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right. 
    26412659VBOX_LICENSE_SRC := $(PATH_ROOT)/doc/License.html 
     2660## @todo this can be done by sed alone. Why do we have to do this $(shell ) stuff in *all* make 
     2661# files btw? If this is really necessary, then just do it once for <insert deity of choice>'s sake. 
    26422662VBOX_LICENSE_VER := $(shell grep Version $(VBOX_LICENSE_SRC)|sed -e 's/.*Version \([0-9.]*\),.*/\1/g') 
    26432663VBOX_LICENSE_BIN := $(PATH_BIN)/License-$(VBOX_LICENSE_VER).html 
     
    26522672# Force building of the version header file as the first thing anywhere in 
    26532673# the tree. This eliminates the need for manual dependencies on it. 
     2674## @todo there gotta be a better way of doing this. 
    26542675Makefile.kmk: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) 
    26552676Makefile: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) 
     
    26692690 VBOX_SVN_REV_FALLBACK := $(patsubst %:,,  $Rev$  ) 
    26702691 VBOX_SVN_DEP          := $(wildcard $(PATH_ROOT)/.svn/entries) 
     2692ifeq ($(KBUILD_VERSION_PATCH),2) ## tmp, remove later. 
     2693 ifeq ($(which (SVN)),) 
     2694  VBOX_SVN_DEP         := 
     2695 endif 
     2696 
     2697# Rule for generating a timestamp and updating the real thing on change. 
     2698$(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(PATH_ROOT)/Config.kmk) 
     2699        $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK)) 
     2700        $(QUIET)$(RM) -f $@ $@.tmp 
     2701        $(QUIET)$(MKDIR) -p $(@D) 
     2702 ifneq ($(VBOX_SVN_DEP),) 
     2703        $(REDIRECT) -E 'LC_ALL=C' -- $(SVN) info $(PATH_ROOT) $@.tmp 
     2704        $(SED) -e '/^Revision/!d'  -e 's/Revision\: */export VBOX_SVN_REV=/' --output $@ $@.tmp 
     2705        $(QUIET)$(RM) -f $@.tmp 
     2706 else 
     2707        $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)' 
     2708 endif 
     2709        $(QUIET)$(CP) --changed -fv $@ $(VBOX_SVN_REV_KMK) 
     2710 
     2711else ## tmp, remove later. 
    26712712 ifneq ($(USERNAME),bird) # Wastes nearly half a second on windows, very annoying. TODO: $(which ). 
    2672   ## @todo with 0.1.2: ifeq ($(which (SVN)),) 
    26732713  ifneq ($(shell $(SVN) --version > /dev/null 2>&1 || echo 'svn not installed'),) 
    26742714   VBOX_SVN_DEP         := 
     
    26782718# Rule for generating a timestamp and updating the real thing on change. 
    26792719 ifneq ($(VBOX_SVN_DEP),) 
    2680 # fixed in svn - $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(VBOX_SVN_DEP) 
    26812720$(VBOX_SVN_REV_KMK).ts: $(VBOX_SVN_DEP) 
    26822721 else 
    2683 # fixed in svn - $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(PATH_ROOT)/Config.kmk 
    26842722$(VBOX_SVN_REV_KMK).ts: $(PATH_ROOT)/Config.kmk 
    26852723 endif 
     
    26932731        $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)' 
    26942732 endif 
    2695 ## @todo When --update is implemented, replace with: $(QUIET)$(CP) --update -fv $@ $(VBOX_SVN_REV_KMK) 
    26962733        $(QUIET)if test ! -f $(VBOX_SVN_REV_KMK) \ 
    26972734        || test ! "`$(CAT_EXT) $@`" = "`$(CAT_EXT) $(VBOX_SVN_REV_KMK)`"; \ 
     
    27062743 
    27072744$(VBOX_SVN_REV_KMK): $(VBOX_SVN_REV_KMK).ts # remove when kBuild is updated. 
     2745endif ## tmp, remove later 
    27082746 
    27092747 include $(VBOX_SVN_REV_KMK) 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy