VirtualBox

Changeset 41633 in vbox


Ignore:
Timestamp:
Jun 8, 2012 6:14:39 PM (13 years ago)
Author:
vboxsync
Message:

Config.kmk: make the generating of GCCConfig.kmk less noisy and more readable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r41567 r41633  
    21712171
    21722172# HC compiler switch detection.
    2173         $(APPEND) '$@' 'VBOX_GCC_PATH_CC               ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CC))'
    2174         $(APPEND) '$@' 'VBOX_GCC_PATH_CXX              ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CXX))'
    2175         $(APPEND) '$@' 'VBOX_GCC_VERSION_CC            ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))'
    2176         $(APPEND) '$@' 'VBOX_GCC_VERSION_CXX           ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))'
    2177         $(APPEND) '$@' 'VBOX_GCC_LIBGCC                ?= $(shell $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-libgcc-file-name)'
    2178         $(APPEND) '$@' 'VBOX_GCC_Wno-pointer-sign      ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-sign,)'
    2179         $(APPEND) '$@' 'VBOX_GCC_Wno-array_bounds      ?= $$(if $$(int-ge $$(VBOX_GCC_VERSION_CXX),40300),-Wno-array-bounds,)'
     2173        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_PATH_CC               ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CC))'
     2174        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_PATH_CXX              ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CXX))'
     2175        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_VERSION_CC            ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))'
     2176        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_VERSION_CXX           ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))'
     2177        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_LIBGCC                ?= $(shell $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-libgcc-file-name)'
     2178        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-pointer-sign      ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-sign,)'
     2179        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-array_bounds      ?= $$(if $$(int-ge $$(VBOX_GCC_VERSION_CXX),40300),-Wno-array-bounds,)'
    21802180# -Wextra produces additional useful warnings but includes -Wno-missing-field-initializers (too noisy)
    2181         $(APPEND) '$@' 'VBOX_GCC_Wextra                ?= $(call VBOX_GCC_CHECK_CC,-Wextra,)'
    2182         $(APPEND) '$@' 'VBOX_GCC_Wlogical-op           ?= $(call VBOX_GCC_CHECK_CC,-Wlogical-op,)'
    2183         $(APPEND) '$@' 'VBOX_GCC_Wno-missing-field-initializers ?= $(call VBOX_GCC_CHECK_CC,-Wno-missing-field-initializers,)'
    2184         $(APPEND) '$@' 'VBOX_GCC_Wno-pointer-to-int-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-to-int-cast,)'
    2185         $(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
    2186         $(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros   ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
    2187         $(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof  ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
    2188         $(APPEND) '$@' 'VBOX_GCC_fno-stack-protector   ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
    2189         $(APPEND) '$@' 'VBOX_GCC_fdiagnostics-show-option ?= $(call VBOX_GCC_CHECK_CC,-fdiagnostics-show-option,)'
     2181        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wextra                ?= $(call VBOX_GCC_CHECK_CC,-Wextra,)'
     2182        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wlogical-op           ?= $(call VBOX_GCC_CHECK_CC,-Wlogical-op,)'
     2183        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-missing-field-initializers ?= $(call VBOX_GCC_CHECK_CC,-Wno-missing-field-initializers,)'
     2184        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-pointer-to-int-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-to-int-cast,)'
     2185        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast        ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
     2186        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros   ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
     2187        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof  ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
     2188        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector   ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
     2189        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_fdiagnostics-show-option ?= $(call VBOX_GCC_CHECK_CC,-fdiagnostics-show-option,)'
    21902190# Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2.
    2191         $(APPEND) '$@' 'VBOX_GCC_mtune-generic         ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)'
    2192         $(APPEND) '$@' 'VBOX_LD_as_needed              ?= $(call VBOX_GCC_CHECK_LD,--as-needed,)'
     2191        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_mtune-generic         ?= $(call VBOX_GCC_CHECK_CC,-mtune=generic,)'
     2192        $(QUIET)$(APPEND) '$@' 'VBOX_LD_as_needed              ?= $(call VBOX_GCC_CHECK_LD,--as-needed,)'
    21932193# gcc version < 3.4 has a bug in handling __attribute__((regparm(3))).
    21942194# See http://osdir.com/ml/gcc.prs/2002-08/msg00223.html and probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20004
    2195         $(APPEND) '$@' 'VBOX_GCC_BUGGY_REGPARM         ?= $$(int-lt $$(VBOX_GCC_VERSION_CC),30400)'
     2195        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_BUGGY_REGPARM         ?= $$(int-lt $$(VBOX_GCC_VERSION_CC),30400)'
    21962196ifneq ($(KBUILD_TARGET),l4)
    21972197# Set default attribute for ELF and MACH-O symbols to ``hidden'' to reduce the number
    21982198# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
    2199         $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
    2200         $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)'
    2201         $(APPEND) '$@' '  VBOX_GCC_fvisibility-hidden  ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT,)'
    2202         $(APPEND) '$@' ' endif'
    2203         $(APPEND) '$@' 'endif'
     2199        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CC),)'
     2200        $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CC),40000),)'
     2201        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_fvisibility-hidden  ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT,)'
     2202        $(QUIET)$(APPEND) '$@' ' endif'
     2203        $(QUIET)$(APPEND) '$@' 'endif'
    22042204endif
    22052205ifneq ($(KBUILD_TARGET),l4)
    22062206# Set default attribute for inline functions to ``hidden'' to reduce the number
    22072207# of relocation entries and PLT indirections in shared libraries. Don't allow for gcc version < 4.
    2208         $(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
    2209         $(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)'
    2210         $(APPEND) '$@' '  VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
    2211         $(APPEND) '$@' ' endif'
    2212         $(APPEND) '$@' 'endif'
     2208        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
     2209        $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40000),)'
     2210        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
     2211        $(QUIET)$(APPEND) '$@' ' endif'
     2212        $(QUIET)$(APPEND) '$@' 'endif'
    22132213endif
    22142214ifeq ($(KBUILD_TARGET),solaris)
    2215         $(APPEND) '$@' 'VBOX_GCC_msave-args            ?= $(call VBOX_GCC_CHECK_CXX,-msave-args,)'
     2215        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_msave-args            ?= $(call VBOX_GCC_CHECK_CXX,-msave-args,)'
    22162216# Detect the solaris assembler. It is used by the the 4.x gcc compilers,
    22172217# apparently. It will not be able to handle IEMAll via a -pipe, only when
    22182218# passed a file. The solaris assmbler rulez ... not!
    2219         $(APPEND) '$@' 'VBOX_AS_VERSION                ?= $(shell `gcc -print-prog-name=as` -V -o /dev/null < /dev/null 2>&1 | kmk_sed -e '1!d' -e 's/^as: *//' )'
    2220         $(APPEND) '$@' 'if $$(pos Sun Compiler Common,$$(VBOX_AS_VERSION)) > 0'
    2221         $(APPEND) '$@' ' VBOX_GCC_USING_SOLARIS_AS=1'
    2222         $(APPEND) '$@' 'endif'
    2223         $(APPEND) '$@' 'ifndef VBOX_GCC_USING_SOLARIS_AS'
    2224         $(APPEND) '$@' ' VBOX_GCC_pipe                 ?= -pipe'
    2225         $(APPEND) '$@' 'endif'
    2226 else
    2227         $(APPEND) '$@' 'VBOX_GCC_pipe                  ?= -pipe'
     2219        $(QUIET)$(APPEND) '$@' 'VBOX_AS_VERSION                ?= $(shell `gcc -print-prog-name=as` -V -o /dev/null < /dev/null 2>&1 | kmk_sed -e '1!d' -e 's/^as: *//' )'
     2220        $(QUIET)$(APPEND) '$@' 'if $$(pos Sun Compiler Common,$$(VBOX_AS_VERSION)) > 0'
     2221        $(QUIET)$(APPEND) '$@' ' VBOX_GCC_USING_SOLARIS_AS=1'
     2222        $(QUIET)$(APPEND) '$@' 'endif'
     2223        $(QUIET)$(APPEND) '$@' 'ifndef VBOX_GCC_USING_SOLARIS_AS'
     2224        $(QUIET)$(APPEND) '$@' ' VBOX_GCC_pipe                 ?= -pipe'
     2225        $(QUIET)$(APPEND) '$@' 'endif'
     2226else
     2227        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_pipe                  ?= -pipe'
    22282228endif
    22292229# Find the compiler includes for IPRT no-crt.
     
    22312231ifeq ($(KBUILD_HOST),win)
    22322232# With the cygwin issues and gcc on windows returning a useless path, just skip this on windows.
    2233         $(APPEND) '$@' 'VBOX_PATH_GCC_INCS             ?= '
    2234 else
    2235         $(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'
     2233        $(QUIET)$(APPEND) '$@' 'VBOX_PATH_GCC_INCS             ?= '
     2234else
     2235        $(QUIET)$(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'
    22362236endif
    22372237# 32-bit (GC) compiler switch detection.
    2238         $(APPEND) '$@' 'VBOX_GCC32_PATH_CC             ?= $(which $(TOOL_$(VBOX_GCC32_TOOL)_CC))'
    2239         $(APPEND) '$@' 'VBOX_GCC32_PATH_CXX            ?= $(which $(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
    2240         $(APPEND) '$@' 'VBOX_GCC32_VERSION_CC          ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))'
    2241         $(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX         ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
    2242         $(APPEND) '$@' 'VBOX_GCC32_LIBGCC              ?= $(shell $(TOOL_$(VBOX_GCC32_TOOL)_CC) -print-libgcc-file-name)'
    2243         $(APPEND) '$@' 'VBOX_GCC32_Wno-variadic-macros ?= $(call VBOX_GCC32_CHECK_CXX,-Wno-variadic-macros,)'
     2238        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_PATH_CC             ?= $(which $(TOOL_$(VBOX_GCC32_TOOL)_CC))'
     2239        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_PATH_CXX            ?= $(which $(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
     2240        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_VERSION_CC          ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))'
     2241        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX         ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
     2242        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_LIBGCC              ?= $(shell $(TOOL_$(VBOX_GCC32_TOOL)_CC) -print-libgcc-file-name)'
     2243        $(QUIET)$(APPEND) '$@' 'VBOX_GCC32_Wno-variadic-macros ?= $(call VBOX_GCC32_CHECK_CXX,-Wno-variadic-macros,)'
    22442244# darwin no_compact_linkedit starting at Xcode 3.2
    22452245ifeq ($(KBUILD_HOST),darwin)
    2246         $(APPEND) '$@' 'VBOX_LD_no_compact_linkedit    ?= $(call VBOX_GCC_CHECK_LD,-no_compact_linkedit,)'
    2247 endif
     2246        $(QUIET)$(APPEND) '$@' 'VBOX_LD_no_compact_linkedit    ?= $(call VBOX_GCC_CHECK_LD,-no_compact_linkedit,)'
     2247endif
     2248        $(QUIET)$(ECHO) '========= START OF $@ ========='
     2249        $(CAT) $@
     2250        $(QUIET)$(ECHO) '=========== END OF $@ ========='
    22482251
    22492252include $(PATH_OUT)/GCCConfig.kmk
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