Changeset 63432 in vbox
- Timestamp:
- Aug 14, 2016 12:51:03 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r63428 r63432 1573 1573 USES += dtrace 1574 1574 1575 1576 #1577 # Compiler warning control.1578 #1579 VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs \1580 $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-unused-parameter) $(VBOX_GCC_Wno-language-extension-token) \1581 $(VBOX_GCC_Wno-extended-offsetof) $(VBOX_GCC_Wno-gnu-folding-constant) $(VBOX_GCC_Wlogical-op) \1582 $(VBOX_GCC_Wno-string-plus-int) $(VBOX_GCC_Wno-nested-anon-types)1583 VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long1584 VBOX_GCC_WARN_MASOCHISTIC ?= -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter1585 if1of ($(KBUILD_TARGET),linux)1586 VBOX_GCC_WARN_PEDANTIC += $(VBOX_GCC_WARN_MASOCHISTIC)1587 endif1588 1589 VBOX_GCC_PEDANTIC_CXX ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) $(VBOX_GCC_Wno-return-type-c-linkage)1590 VBOX_GCC_PEDANTIC_C ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration1591 1592 VBOX_GCC_NON_PEDANTIC_CXX ?= -Wno-sign-compare1593 VBOX_GCC_NON_PEDANTIC_C ?= -Wno-sign-compare -Werror-implicit-function-declaration1594 1595 # Disabled Visual C++ warnings, W4:1596 # -wd4065: switch statement contains 'default' but no 'case' labels1597 # -wd4996: deprecated / insecure.1598 # -wd4127: conditional expression is constant [level 4]1599 # -wd4706: assignment within conditional expression [level 4]1600 # -wd4201: nonstandard extension used : nameless struct/union [level 4]1601 # -wd4214: nonstandard extension used : bit field types other than int [level 4]1602 # -wd4510: 'VM::<unnamed-tag>' : default constructor could not be generated1603 # -wd4512: 'VM' : assignment operator could not be generated1604 # -wd4610: union 'VM::<unnamed-tag>' can never be instantiated - user defined constructor required1605 # Disabled Visual C++ warnings, Wall:1606 # -wd4514: unreferenced inline function has been removed1607 # -wd4820: 'RTSTRSPACECORE' : '7' bytes padding added after data member 'RTSTRSPACECORE::uchHeight'1608 # -wd4365: '=' : conversion from 'unsigned char' to 'char', signed/unsigned mismatch1609 # -wd4987: nonstandard extension used: 'throw (...)' (setjmp.h + our stuff)1610 # -wd4710: 'std::string std::_Narrow_str(std::wstring)' : function not inlined1611 # -wd4061: enumerator 'RTASN1TYPE_END' in switch of enum 'RTASN1TYPE' is not explicitly handled by a case label1612 # Note! C4062 checks for the same but includes the 'default' case, just like gcc. So, no trouble disabling this.1613 # -wd4986: 'operator new[]': exception specification does not match previous declaration (crtdbg.h vs new, exception specification only)1614 # -wd4191: 'type cast' : unsafe conversion from 'int (__cdecl *)(gzFile)' to 'PFNRT'1615 # -wd4574: 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0': did you mean to use '#if INCL_WINSOCK_API_TYPEDEFS'?1616 # -wd4917: 'OLE_XPOS_HIMETRIC' : a GUID can only be associated with a class, interface or namespace1617 # -wd4711: function 'void __cdecl rtMemCacheFreeOne(struct RTMEMCACHEINT * __ptr64,void * __ptr64)' selected for automatic inline expansion1618 # -wd4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught1619 # -wd4611: interaction between '_setjmp' and C++ object destruction is non-portable1620 # -wd4324: '_TDI_PNP_CONTEXT_XP' : structure was padded due to __declspec(align())1621 # -wd4505: VBoxNetFltNobj.h(45) : warning C4505: 'VBoxNetFltNobj::Release' : unreferenced local function has been removed1622 # Probably related to http://stackoverflow.com/questions/3051992/compiler-warning-at-c-template-base-class1623 # -wd4263: 'int VRDPChannelClipboard::SendPacket(const void *,uint32_t)' : member function does not override any base class virtual member function1624 # Probably useful, but impractical, just like the next one.1625 # -wd4264: 'int VRDPOutputCtx::SendPacket(void)' : no override available for virtual member function from base 'VRDPOutputCtx'; function is hidden1626 # -wd4738: storing 32-bit float result in memory, possible loss of performance1627 # Want to enable these:1628 # -wd4242: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data1629 # -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data1630 VBOX_VCC_WARN_ALL ?= -W4 -Wall -wd4065 -wd4996 -wd4127 -wd4706 -wd4201 -wd4214 -wd4510 -wd4512 -wd4610 \1631 -wd4514 -wd4820 -wd4365 -wd4987 -wd4710 -wd4061 -wd4986 -wd4191 -wd4574 -wd4917 -wd4711 -wd4611 -wd4571 -wd4324 -wd4505 \1632 -wd4263 -wd4264 -wd47381633 #ifndef VBOX_WITH_MASOCHISTIC_WARNINGS1634 # VBOX_VCC_WARN_ALL +=1635 #endif1636 VBOX_VCC_WARN_ALL += -wd4242 -wd42441637 1638 # Disable pedantic warnings for NP/NonPedantic templates.1639 # -wd4131: 'bi_flush' : uses old-style declarator1640 # -wd4255: 'tr_static_init' : no function prototype given: converting '()' to '(void)'1641 # -wd4668: '_WIN32_WCE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'/1642 # -wd4100: 'cinfo' : unreferenced formal parameter1643 # -wd4189: 'sz' : local variable is initialized but not referenced1644 # -wd4132: 'xmlStringComment' : const object should be initialized1645 # -wd4152: nonstandard extension, function/data pointer conversion in expression1646 # -wd4702: unreachable code1647 # -wd4057: '=' : 'xmlChar *' differs in indirection to slightly different base types from 'char *'1648 # -wd4296: '>=' : expression is always true1649 # -wd4389: '==' : signed/unsigned mismatch1650 # -wd4018: '<=' : signed/unsigned mismatch1651 # -wd4245: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch1652 # -wd4267: '+=' : conversion from 'size_t' to 'long', possible loss of data1653 # -wd4295: 'vendor_string' : array is too small to include a terminating null character1654 VBOX_VCC_NON_PEDANTIC = -wd4131 -wd4255 -wd4668 -wd4100 -wd4189 -wd4132 -wd4152 -wd4702 -wd4057 -wd4296 -wd4389 -wd4018 -wd4245 \1655 -wd4267 -wd42951656 1657 ifeq ($(KBUILD_TARGET),win)1658 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -wd41001659 else1660 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -Wno-unused-parameter1661 endif1662 1663 #1664 # Compiler optimization flags.1665 #1666 ifeq ($(KBUILD_TYPE),debug)1667 VBOX_GCC_FP ?= -fno-omit-frame-pointer1668 VBOX_GCC_OPT ?= -O01669 VBOX_VCC_FP ?= -Oy-1670 VBOX_VCC_OPT ?=1671 VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls1672 VBOX_GCC_R0_OPT ?= -O21673 VBOX_VCC_R0_FP ?= -Oy-1674 VBOX_VCC_R0_OPT ?=1675 VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls1676 VBOX_GCC_GC_OPT ?= -O21677 VBOX_VCC_GC_FP ?= -Oy-1678 VBOX_VCC_GC_OPT ?=1679 else1680 # We should use -fomit-frame-pointer for GCC / -Oy for VCC.1681 # -funwind-tables provides support for backtraces in gdb then.1682 VBOX_GCC_FP ?= -fno-omit-frame-pointer1683 VBOX_GCC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)1684 VBOX_VCC_FP ?= -Oy-1685 VBOX_VCC_OPT ?= -O21686 VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer1687 VBOX_GCC_R0_OPT ?= -O2 $(VBOX_GCC_mtune-generic)1688 VBOX_VCC_R0_FP ?= -Oy-1689 VBOX_VCC_R0_OPT ?= -O21690 VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer1691 VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic)1692 VBOX_VCC_GC_FP ?= -Oy-1693 VBOX_VCC_GC_OPT ?= -O21694 endif1695 ifeq ($(KBUILD_TARGET_ARCH),x86)1696 ifneq ($(KBUILD_TARGET),darwin)1697 # (The '<=' operator is for prepending (kmk specific).)1698 VBOX_GCC_OPT <= -march=i5861699 endif1700 endif1701 1702 1703 #1704 # Select the CRT type we're using with Microsoft Visual C++.1705 #1706 if1of ($(KBUILD_TYPE), debug dbgopt strict)1707 #not yet# VBOX_WITH_DEBUG_VCC_CRT = 11708 endif1709 ifdef VBOX_WITH_DEBUG_VCC_CRT1710 VBOX_VCC_CRT_TYPE = d1711 VBOX_VCC_CRT_TYPE_N =1712 else1713 VBOX_VCC_CRT_TYPE =1714 VBOX_VCC_CRT_TYPE_N = d1715 endif1716 1575 1717 1576 # … … 2845 2704 include $(PATH_OUT)/DynamicConfig.kmk 2846 2705 endif # !VBOX_NOINC_DYNAMIC_CONFIG_KMK 2706 2707 2708 # 2709 # Compiler warning control. 2710 # 2711 VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs \ 2712 $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-unused-parameter) $(VBOX_GCC_Wno-language-extension-token) \ 2713 $(VBOX_GCC_Wno-extended-offsetof) $(VBOX_GCC_Wno-gnu-folding-constant) $(VBOX_GCC_Wlogical-op) \ 2714 $(VBOX_GCC_Wno-string-plus-int) $(VBOX_GCC_Wno-nested-anon-types) 2715 VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long 2716 if $(VBOX_GCC_VERSION_CXX) >= 40200 # gcc 4.2.x+ (4.1.2 is causing trouble with the extpack & add builds) 2717 VBOX_GCC_WARN_MASOCHISTIC ?= -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter 2718 endif 2719 if1of ($(KBUILD_TARGET),linux) 2720 VBOX_GCC_WARN_PEDANTIC += $(VBOX_GCC_WARN_MASOCHISTIC) 2721 endif 2722 2723 VBOX_GCC_PEDANTIC_CXX ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) $(VBOX_GCC_Wno-return-type-c-linkage) 2724 VBOX_GCC_PEDANTIC_C ?= -pedantic $(VBOX_GCC_WARN_PEDANTIC) -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration 2725 2726 VBOX_GCC_NON_PEDANTIC_CXX ?= -Wno-sign-compare 2727 VBOX_GCC_NON_PEDANTIC_C ?= -Wno-sign-compare -Werror-implicit-function-declaration 2728 2729 # Disabled Visual C++ warnings, W4: 2730 # -wd4065: switch statement contains 'default' but no 'case' labels 2731 # -wd4996: deprecated / insecure. 2732 # -wd4127: conditional expression is constant [level 4] 2733 # -wd4706: assignment within conditional expression [level 4] 2734 # -wd4201: nonstandard extension used : nameless struct/union [level 4] 2735 # -wd4214: nonstandard extension used : bit field types other than int [level 4] 2736 # -wd4510: 'VM::<unnamed-tag>' : default constructor could not be generated 2737 # -wd4512: 'VM' : assignment operator could not be generated 2738 # -wd4610: union 'VM::<unnamed-tag>' can never be instantiated - user defined constructor required 2739 # Disabled Visual C++ warnings, Wall: 2740 # -wd4514: unreferenced inline function has been removed 2741 # -wd4820: 'RTSTRSPACECORE' : '7' bytes padding added after data member 'RTSTRSPACECORE::uchHeight' 2742 # -wd4365: '=' : conversion from 'unsigned char' to 'char', signed/unsigned mismatch 2743 # -wd4987: nonstandard extension used: 'throw (...)' (setjmp.h + our stuff) 2744 # -wd4710: 'std::string std::_Narrow_str(std::wstring)' : function not inlined 2745 # -wd4061: enumerator 'RTASN1TYPE_END' in switch of enum 'RTASN1TYPE' is not explicitly handled by a case label 2746 # Note! C4062 checks for the same but includes the 'default' case, just like gcc. So, no trouble disabling this. 2747 # -wd4986: 'operator new[]': exception specification does not match previous declaration (crtdbg.h vs new, exception specification only) 2748 # -wd4191: 'type cast' : unsafe conversion from 'int (__cdecl *)(gzFile)' to 'PFNRT' 2749 # -wd4574: 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0': did you mean to use '#if INCL_WINSOCK_API_TYPEDEFS'? 2750 # -wd4917: 'OLE_XPOS_HIMETRIC' : a GUID can only be associated with a class, interface or namespace 2751 # -wd4711: function 'void __cdecl rtMemCacheFreeOne(struct RTMEMCACHEINT * __ptr64,void * __ptr64)' selected for automatic inline expansion 2752 # -wd4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught 2753 # -wd4611: interaction between '_setjmp' and C++ object destruction is non-portable 2754 # -wd4324: '_TDI_PNP_CONTEXT_XP' : structure was padded due to __declspec(align()) 2755 # -wd4505: VBoxNetFltNobj.h(45) : warning C4505: 'VBoxNetFltNobj::Release' : unreferenced local function has been removed 2756 # Probably related to http://stackoverflow.com/questions/3051992/compiler-warning-at-c-template-base-class 2757 # -wd4263: 'int VRDPChannelClipboard::SendPacket(const void *,uint32_t)' : member function does not override any base class virtual member function 2758 # Probably useful, but impractical, just like the next one. 2759 # -wd4264: 'int VRDPOutputCtx::SendPacket(void)' : no override available for virtual member function from base 'VRDPOutputCtx'; function is hidden 2760 # -wd4738: storing 32-bit float result in memory, possible loss of performance 2761 # Want to enable these: 2762 # -wd4242: '=' : conversion from 'uint32_t' to 'uint8_t', possible loss of data 2763 # -wd4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data 2764 VBOX_VCC_WARN_ALL ?= -W4 -Wall -wd4065 -wd4996 -wd4127 -wd4706 -wd4201 -wd4214 -wd4510 -wd4512 -wd4610 \ 2765 -wd4514 -wd4820 -wd4365 -wd4987 -wd4710 -wd4061 -wd4986 -wd4191 -wd4574 -wd4917 -wd4711 -wd4611 -wd4571 -wd4324 -wd4505 \ 2766 -wd4263 -wd4264 -wd4738 2767 #ifndef VBOX_WITH_MASOCHISTIC_WARNINGS 2768 # VBOX_VCC_WARN_ALL += 2769 #endif 2770 VBOX_VCC_WARN_ALL += -wd4242 -wd4244 2771 2772 # Disable pedantic warnings for NP/NonPedantic templates. 2773 # -wd4131: 'bi_flush' : uses old-style declarator 2774 # -wd4255: 'tr_static_init' : no function prototype given: converting '()' to '(void)' 2775 # -wd4668: '_WIN32_WCE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'/ 2776 # -wd4100: 'cinfo' : unreferenced formal parameter 2777 # -wd4189: 'sz' : local variable is initialized but not referenced 2778 # -wd4132: 'xmlStringComment' : const object should be initialized 2779 # -wd4152: nonstandard extension, function/data pointer conversion in expression 2780 # -wd4702: unreachable code 2781 # -wd4057: '=' : 'xmlChar *' differs in indirection to slightly different base types from 'char *' 2782 # -wd4296: '>=' : expression is always true 2783 # -wd4389: '==' : signed/unsigned mismatch 2784 # -wd4018: '<=' : signed/unsigned mismatch 2785 # -wd4245: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch 2786 # -wd4267: '+=' : conversion from 'size_t' to 'long', possible loss of data 2787 # -wd4295: 'vendor_string' : array is too small to include a terminating null character 2788 VBOX_VCC_NON_PEDANTIC = -wd4131 -wd4255 -wd4668 -wd4100 -wd4189 -wd4132 -wd4152 -wd4702 -wd4057 -wd4296 -wd4389 -wd4018 -wd4245 \ 2789 -wd4267 -wd4295 2790 2791 ifeq ($(KBUILD_TARGET),win) 2792 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -wd4100 2793 else 2794 VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS = -Wno-unused-parameter 2795 endif 2796 2797 # 2798 # Compiler optimization flags. 2799 # 2800 ifeq ($(KBUILD_TYPE),debug) 2801 VBOX_GCC_FP ?= -fno-omit-frame-pointer 2802 VBOX_GCC_OPT ?= -O0 2803 VBOX_VCC_FP ?= -Oy- 2804 VBOX_VCC_OPT ?= 2805 VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls 2806 VBOX_GCC_R0_OPT ?= -O2 2807 VBOX_VCC_R0_FP ?= -Oy- 2808 VBOX_VCC_R0_OPT ?= 2809 VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer -fno-optimize-sibling-calls 2810 VBOX_GCC_GC_OPT ?= -O2 2811 VBOX_VCC_GC_FP ?= -Oy- 2812 VBOX_VCC_GC_OPT ?= 2813 else 2814 # We should use -fomit-frame-pointer for GCC / -Oy for VCC. 2815 # -funwind-tables provides support for backtraces in gdb then. 2816 VBOX_GCC_FP ?= -fno-omit-frame-pointer 2817 VBOX_GCC_OPT ?= -O2 $(VBOX_GCC_mtune-generic) 2818 VBOX_VCC_FP ?= -Oy- 2819 VBOX_VCC_OPT ?= -O2 2820 VBOX_GCC_R0_FP ?= -fno-omit-frame-pointer 2821 VBOX_GCC_R0_OPT ?= -O2 $(VBOX_GCC_mtune-generic) 2822 VBOX_VCC_R0_FP ?= -Oy- 2823 VBOX_VCC_R0_OPT ?= -O2 2824 VBOX_GCC_GC_FP ?= -fno-omit-frame-pointer 2825 VBOX_GCC_GC_OPT ?= -O2 $(VBOX_GCC_mtune-generic) 2826 VBOX_VCC_GC_FP ?= -Oy- 2827 VBOX_VCC_GC_OPT ?= -O2 2828 endif 2829 ifeq ($(KBUILD_TARGET_ARCH),x86) 2830 ifneq ($(KBUILD_TARGET),darwin) 2831 # (The '<=' operator is for prepending (kmk specific).) 2832 VBOX_GCC_OPT <= -march=i586 2833 endif 2834 endif 2835 2836 2837 # 2838 # Select the CRT type we're using with Microsoft Visual C++. 2839 # 2840 if1of ($(KBUILD_TYPE), debug dbgopt strict) 2841 #not yet# VBOX_WITH_DEBUG_VCC_CRT = 1 2842 endif 2843 ifdef VBOX_WITH_DEBUG_VCC_CRT 2844 VBOX_VCC_CRT_TYPE = d 2845 VBOX_VCC_CRT_TYPE_N = 2846 else 2847 VBOX_VCC_CRT_TYPE = 2848 VBOX_VCC_CRT_TYPE_N = d 2849 endif 2847 2850 2848 2851
Note:
See TracChangeset
for help on using the changeset viewer.