Changeset 5902 in vbox
- Timestamp:
- Dec 2, 2007 9:50:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r5898 r5902 935 935 endif 936 936 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. 939 ifeq ($(BUILD_PLATFORM),win) 940 VBOX_GCC_CHECK_CC = $(2) 941 VBOX_GCC_CHECK_CXX = $(2) 942 VBOX_GCC32_CHECK_CXX = $(2) 943 else 937 944 VBOX_GCC_CHECK_CC = $(shell \ 938 945 if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \ … … 949 956 then echo "$(1)"; \ 950 957 else echo "$(2)"; fi; ) 951 958 endif 959 960 ifeq ($(BUILD_PLATFORM),win) 961 # This isn't important (yet) on windows, so cook the result until 962 # cygwin is feeling better. 963 VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3) 964 else 952 965 # This is kind of bad, the returned string needs to be re-evaluated before use. 953 966 # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). 954 967 VBOX_GCC_VERSION = $(shell \ 955 968 $(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\([0-9]\)|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), \3)|' ) 969 endif 956 970 957 971 # No $(QUIET) here as it's interesting to see what goes into the file. … … 961 975 $(QUIET)$(MKDIR) -p $(@D) 962 976 963 @# HC compiler switch detection.977 # HC compiler switch detection. 964 978 $(APPEND) '$@' 'VBOX_GCC_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))' 965 979 $(APPEND) '$@' 'VBOX_GCC_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))' … … 970 984 $(APPEND) '$@' 'VBOX_GCC_Wno-extra ?= $(call VBOX_GCC_CHECK_CXX,-Wno-extra)' 971 985 $(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. 973 987 $(APPEND) '$@' 'VBOX_GCC_mtune-generic ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)' 974 988 ifneq ($(BUILD_TARGET),l4) 975 @# Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number976 @# 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. 977 991 $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)' 978 992 $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)' … … 982 996 endif 983 997 ifneq ($(BUILD_TARGET),l4) 984 @# Set default attribute for inline functions to ``hidden'' to reduce the number985 @# 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. 986 1000 $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)' 987 1001 $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)' … … 990 1004 $(APPEND) '$@' 'endif' 991 1005 endif 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. 1008 ifeq ($(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 ?= ' 1011 else 994 1012 $(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.1013 endif 1014 # 32-bit (GC) compiler switch detection. 997 1015 $(APPEND) '$@' 'VBOX_GCC32_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))' 998 1016 $(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))' … … 2606 2624 $(call MSG_GENERATE,,$@) 2607 2625 $(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) 2610 2628 2611 2629 $(VBOX_VERSION_HEADER): $(VBOX_VERSION_STAMP) … … 2640 2658 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right. 2641 2659 VBOX_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. 2642 2662 VBOX_LICENSE_VER := $(shell grep Version $(VBOX_LICENSE_SRC)|sed -e 's/.*Version \([0-9.]*\),.*/\1/g') 2643 2663 VBOX_LICENSE_BIN := $(PATH_BIN)/License-$(VBOX_LICENSE_VER).html … … 2652 2672 # Force building of the version header file as the first thing anywhere in 2653 2673 # the tree. This eliminates the need for manual dependencies on it. 2674 ## @todo there gotta be a better way of doing this. 2654 2675 Makefile.kmk: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) 2655 2676 Makefile: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) … … 2669 2690 VBOX_SVN_REV_FALLBACK := $(patsubst %:,, $Rev$ ) 2670 2691 VBOX_SVN_DEP := $(wildcard $(PATH_ROOT)/.svn/entries) 2692 ifeq ($(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 $@ [email protected] 2701 $(QUIET)$(MKDIR) -p $(@D) 2702 ifneq ($(VBOX_SVN_DEP),) 2703 $(REDIRECT) -E 'LC_ALL=C' -- $(SVN) info $(PATH_ROOT) [email protected] 2704 $(SED) -e '/^Revision/!d' -e 's/Revision\: */export VBOX_SVN_REV=/' --output $@ [email protected] 2705 $(QUIET)$(RM) -f [email protected] 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 2711 else ## tmp, remove later. 2671 2712 ifneq ($(USERNAME),bird) # Wastes nearly half a second on windows, very annoying. TODO: $(which ). 2672 ## @todo with 0.1.2: ifeq ($(which (SVN)),)2673 2713 ifneq ($(shell $(SVN) --version > /dev/null 2>&1 || echo 'svn not installed'),) 2674 2714 VBOX_SVN_DEP := … … 2678 2718 # Rule for generating a timestamp and updating the real thing on change. 2679 2719 ifneq ($(VBOX_SVN_DEP),) 2680 # fixed in svn - $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(VBOX_SVN_DEP)2681 2720 $(VBOX_SVN_REV_KMK).ts: $(VBOX_SVN_DEP) 2682 2721 else 2683 # fixed in svn - $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(PATH_ROOT)/Config.kmk2684 2722 $(VBOX_SVN_REV_KMK).ts: $(PATH_ROOT)/Config.kmk 2685 2723 endif … … 2693 2731 $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)' 2694 2732 endif 2695 ## @todo When --update is implemented, replace with: $(QUIET)$(CP) --update -fv $@ $(VBOX_SVN_REV_KMK)2696 2733 $(QUIET)if test ! -f $(VBOX_SVN_REV_KMK) \ 2697 2734 || test ! "`$(CAT_EXT) $@`" = "`$(CAT_EXT) $(VBOX_SVN_REV_KMK)`"; \ … … 2706 2743 2707 2744 $(VBOX_SVN_REV_KMK): $(VBOX_SVN_REV_KMK).ts # remove when kBuild is updated. 2745 endif ## tmp, remove later 2708 2746 2709 2747 include $(VBOX_SVN_REV_KMK)
Note:
See TracChangeset
for help on using the changeset viewer.