- Timestamp:
- Mar 16, 2012 4:38:06 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r40383 r40504 2163 2163 $(APPEND) '$@' 'endif' 2164 2164 endif 2165 ifeq ($(KBUILD_TARGET),solaris) 2166 $(APPEND) '$@' 'VBOX_GCC_msave-args ?= $(call VBOX_GCC_CHECK_CXX,-msave-args,)' 2167 $(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: *//' )' 2168 $(APPEND) '$@' 'if "$$(VBOX_AS_VERSION)" == "Sun Compiler Common 12 SunOS_i386 snv_174 08/25/2011"' 2169 $(APPEND) '$@' ' VBOX_SOLARS_AS_IS_CRAP=1' 2170 $(APPEND) '$@' 'endif' 2171 $(APPEND) '$@' 'ifndef VBOX_SOLARS_AS_IS_CRAP' 2172 $(APPEND) '$@' ' VBOX_GCC_pipe ?= -pipe' 2173 $(APPEND) '$@' 'endif' 2174 else 2175 $(APPEND) '$@' 'VBOX_GCC_pipe ?= -pipe' 2176 endif 2165 2177 # Find the compiler includes for IPRT no-crt. 2166 2178 # Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host. … … 2656 2668 ifeq ($(VBOX_LDR_FMT32),elf) 2657 2669 TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL) 2658 TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti2659 TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)2670 TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti 2671 TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) 2660 2672 ifeq ($(KBUILD_TARGET),solaris) 2661 2673 TEMPLATE_VBoxRc_LDFLAGS = -r … … 2675 2687 TEMPLATE_VBoxRc_TOOL = GXX4MACHO 2676 2688 TEMPLATE_VBoxRc_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) 2677 TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti2678 TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing2689 TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti 2690 TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing 2679 2691 TEMPLATE_VBoxRc_LDFLAGS = $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -m32 -nostdlib 2680 2692 #TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ??? … … 2683 2695 ifeq ($(VBOX_LDR_FMT32),lx) 2684 2696 TEMPLATE_VBoxRc_TOOL = GXX3OMF 2685 TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti2686 TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions2697 TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti 2698 TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions 2687 2699 TEMPLATE_VBoxRc_LDFLAGS = -Zdll -nostdlib 2688 2700 TEMPLATE_VBoxRc_LIBS = \ … … 2789 2801 ifeq ($(VBOX_LDR_FMT),elf) 2790 2802 TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL) 2791 TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) -std=gnu992792 TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti2803 TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) -std=gnu99 2804 TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti 2793 2805 TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding 2794 2806 TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables … … 2813 2825 TEMPLATE_VBoxR0_TOOL = GXX4MACHO 2814 2826 TEMPLATE_VBoxR0_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) 2815 TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \2827 TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \ 2816 2828 -fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \ 2817 2829 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) 2818 2830 TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables 2819 2831 TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32 2820 TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \2832 TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \ 2821 2833 -fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \ 2822 2834 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_fno-stack-protector) … … 2831 2843 ifeq ($(VBOX_LDR_FMT),lx) 2832 2844 TEMPLATE_VBoxR0_TOOL = GXX3OMF 2833 TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions2834 TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g -pipe$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti2845 TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions 2846 TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti 2835 2847 TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Zdll 2836 2848 TEMPLATE_VBoxR0_LIBS = \ … … 2903 2915 ifeq ($(KBUILD_TARGET),os2) 2904 2916 TEMPLATE_VBOXR0DRV_TOOL = GXX3OMF 2905 TEMPLATE_VBOXR0DRV_CXXFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti2906 TEMPLATE_VBOXR0DRV_CFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions2917 TEMPLATE_VBOXR0DRV_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti 2918 TEMPLATE_VBOXR0DRV_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions 2907 2919 TEMPLATE_VBOXR0DRV_LIBS = $(VBOX_GCC_LIBGCC) 2908 2920 # wlink thinks physdevice doesn't need fixups and should have a stack - stupid! … … 2916 2928 ## @todo try use VBOX_GCC_PEDANTIC_CXX 2917 2929 TEMPLATE_VBOXR0DRV_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) \ 2918 -g -pipe$(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \2930 -g $(VBOX_GCC_pipe) $(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \ 2919 2931 -fno-keep-inline-functions -fno-exceptions -msoft-float \ 2920 2932 -fapple-kext -fno-rtti -fcheck-new -force_cpusubtype_ALL \ … … 2923 2935 TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = -m32 -static 2924 2936 TEMPLATE_VBOXR0DRV_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) \ 2925 -g -pipe$(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \2937 -g $(VBOX_GCC_pipe) $(VBOX_GCC_WARN) -Wno-long-long -fno-common -nostdinc -fno-builtin -finline \ 2926 2938 -fno-keep-inline-functions -fno-exceptions -msoft-float \ 2927 2939 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations \ … … 2952 2964 -O2 -fno-omit-frame-pointer -ffreestanding -nodefaultlibs -fno-strict-aliasing -fno-common -std=c99 2953 2965 TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 2954 TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $( if $(VBOX_SOLARIS_10),,-msave-args) -mno-red-zone -mcmodel=kernel \2966 TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_msave-args) -mno-red-zone -mcmodel=kernel \ 2955 2967 -fno-reorder-blocks -fno-asynchronous-unwind-tables -funit-at-a-time 2956 TEMPLATE_VBOXR0DRV_CXXFLAGS = -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign)\2968 TEMPLATE_VBOXR0DRV_CXXFLAGS = -Wpointer-arith -Winline \ 2957 2969 -Wshadow -Wuninitialized -Wunused-function -Wunused-label -Wunused-value -Wunused-variable \ 2958 2970 -Wformat \ … … 3149 3161 else # the gcc guys 3150 3162 TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_GCC_TOOL) 3151 TEMPLATE_VBOXR3EXE_CXXFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)3163 TEMPLATE_VBOXR3EXE_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) 3152 3164 TEMPLATE_VBOXR3EXE_CXXFLAGS.x86 = -m32 3153 3165 TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64 = -m64 … … 3159 3171 $(DEBUG_L4) 3160 3172 TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -finstrument-functions 3161 TEMPLATE_VBOXR3EXE_CFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden)3173 TEMPLATE_VBOXR3EXE_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) 3162 3174 TEMPLATE_VBOXR3EXE_CFLAGS.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.x86) 3163 3175 TEMPLATE_VBOXR3EXE_CFLAGS.amd64 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.amd64) … … 3667 3679 3668 3680 TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_GCC_TOOL) 3669 TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g -pipe\3681 TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g $(VBOX_GCC_pipe) \ 3670 3682 $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) -Wno-long-long -Wno-non-virtual-dtor -Wshadow \ 3671 3683 -fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ … … 3674 3686 TEMPLATE_VBOXMAINEXE_CXXFLAGS.amd64 = -m64 3675 3687 TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -finstrument-functions 3676 TEMPLATE_VBOXMAINEXE_CFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \3688 TEMPLATE_VBOXMAINEXE_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \ 3677 3689 $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) 3678 3690 TEMPLATE_VBOXMAINEXE_CFLAGS.x86 = -m32 … … 4085 4097 ## @todo Use VBOX_GCC_PEDANTIC_CXX? 4086 4098 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS = \ 4087 -g -pipe$(filter-out -Wno-unused,$(VBOX_GCC_WARN)) -frtti -fno-exceptions -Wno-non-virtual-dtor \4099 -g $(VBOX_GCC_pipe) $(filter-out -Wno-unused,$(VBOX_GCC_WARN)) -frtti -fno-exceptions -Wno-non-virtual-dtor \ 4088 4100 -Wno-long-long -fshort-wchar -fno-strict-aliasing \ 4089 4101 $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) … … 4091 4103 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64 = -m64 4092 4104 TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread 4093 TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) -Wno-long-long -fno-exceptions4105 TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) -Wno-long-long -fno-exceptions 4094 4106 TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS.x86 = $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86) 4095 4107 TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS.amd64 = $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.amd64) 4096 4108 TEMPLATE_VBOXQT4GUIEXE_OBJCXXFLAGS = \ 4097 -g -pipe$(VBOX_GCC_PEDANTIC_CXX) -Wno-non-virtual-dtor -Wno-long-long \4109 -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) -Wno-non-virtual-dtor -Wno-long-long \ 4098 4110 -frtti -fno-exceptions $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) 4099 4111 TEMPLATE_VBOXQT4GUIEXE_OBJCXXFLAGS.x86 = $(TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.x86) … … 4263 4275 # (gcc of some kind ) 4264 4276 TEMPLATE_VBOXBLDPROG_TOOL = GXX3 4265 TEMPLATE_VBOXBLDPROG_CFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros)4277 TEMPLATE_VBOXBLDPROG_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) 4266 4278 TEMPLATE_VBOXBLDPROG_CFLAGS.x86 = -m32 4267 4279 TEMPLATE_VBOXBLDPROG_CFLAGS.sparc32 = -m32 … … 4271 4283 TEMPLATE_VBOXBLDPROG_CFLAGS.profile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.profile) 4272 4284 TEMPLATE_VBOXBLDPROG_CFLAGS.kprofile = $(TEMPLATE_VBOXBLDPROG_CXXFLAGS.kprofile) 4273 TEMPLATE_VBOXBLDPROG_CXXFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros)4285 TEMPLATE_VBOXBLDPROG_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) 4274 4286 TEMPLATE_VBOXBLDPROG_CXXFLAGS.x86 = -m32 4275 4287 TEMPLATE_VBOXBLDPROG_CXXFLAGS.sparc32 = -m32 … … 4420 4432 TEMPLATE_VBOXLNXHOSTR3EXE_DLLSUFF = .so 4421 4433 TEMPLATE_VBOXLNXHOSTR3EXE_DEFS = IN_RING3 $(ARCH_BITS_DEFS) 4422 TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_fno-stack-protector)4434 TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_fno-stack-protector) 4423 4435 TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.debug = -fno-inline 4424 4436 TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing … … 4429 4441 TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.profile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.profile) 4430 4442 TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXLNXHOSTR3EXE_CXXFLAGS.kprofile) 4431 TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS = -g -pipe$(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_fno-stack-protector)4443 TEMPLATE_VBOXLNXHOSTR3EXE_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_fno-stack-protector) 4432 4444 TEMPLATE_VBOXLNXHOSTR3EXE_LIBS = pthread m rt dl 4433 4445 -
trunk/include/iprt/asm.h
r39037 r40504 189 189 /** @def ASMBreakpoint 190 190 * Debugger Breakpoint. 191 * @remark In the gnu world we add a nop instruction after the int3 to 192 * force gdb to remain at the int3 source line. 193 * @remark The L4 kernel will try make sense of the breakpoint, thus the jmp. 194 * @internal 195 */ 196 #if RT_INLINE_ASM_GNU_STYLE 197 # if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 198 # ifndef __L4ENV__ 199 # define ASMBreakpoint() do { __asm__ __volatile__("int3\n\tnop"); } while (0) 200 # else 201 # define ASMBreakpoint() do { __asm__ __volatile__("int3; jmp 1f; 1:"); } while (0) 202 # endif 203 # elif defined(RT_ARCH_SPARC64) 204 # define ASMBreakpoint() do { __asm__ __volatile__("illtrap 0\n\t") } while (0) /** @todo Sparc64: this is just a wild guess. */ 205 # elif defined(RT_ARCH_SPARC) 206 # define ASMBreakpoint() do { __asm__ __volatile__("unimp 0\n\t"); } while (0) /** @todo Sparc: this is just a wild guess (same as Sparc64, just different name). */ 207 # else 208 # error "PORTME" 209 # endif 210 #else 211 # define ASMBreakpoint() __debugbreak() 212 #endif 191 * @deprecated Use RT_BREAKPOINT instead. 192 * @internal 193 */ 194 #define ASMBreakpoint() RT_BREAKPOINT() 213 195 214 196 -
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp
r39374 r40504 57 57 static uint32_t volatile g_cUsers = 0; 58 58 /** VBoxUSB Device handle. */ 59 static RTFILE g_ File = NIL_RTFILE;59 static RTFILE g_hFile = NIL_RTFILE; 60 60 /** List of tasks handled by the USB helper. */ 61 61 typedef enum USBHELPER_OP … … 93 93 return rc; 94 94 } 95 g_ File = File;95 g_hFile = File; 96 96 97 97 ASMAtomicIncU32(&g_cUsers); … … 112 112 113 113 RTFileClose(File); 114 g_ File = NIL_RTFILE;114 g_hFile = NIL_RTFILE; 115 115 ASMAtomicDecU32(&g_cUsers); 116 116 return rc; … … 121 121 LogRel((USBLIBR3 ":USBMonitor driver version query failed. rc=%Rrc\n", rc)); 122 122 RTFileClose(File); 123 g_ File = NIL_RTFILE;123 g_hFile = NIL_RTFILE; 124 124 ASMAtomicDecU32(&g_cUsers); 125 125 return rc; … … 142 142 * We're the last guy, close down the connection. 143 143 */ 144 RTFILE File = g_ File;145 g_ File = NIL_RTFILE;144 RTFILE File = g_hFile; 145 g_hFile = NIL_RTFILE; 146 146 if (File == NIL_RTFILE) 147 147 return VERR_INTERNAL_ERROR; … … 238 238 static int usblibDoIOCtl(unsigned iFunction, void *pvData, size_t cbData) 239 239 { 240 if (g_ File == NIL_RTFILE)240 if (g_hFile == NIL_RTFILE) 241 241 { 242 242 LogRel((USBLIBR3 ":IOCtl failed, device not open.\n")); … … 249 249 Hdr.pvDataR3 = pvData; 250 250 251 int rc = ioctl( (int)g_File, iFunction, &Hdr);251 int rc = ioctl(RTFileToNative(g_hFile), iFunction, &Hdr); 252 252 if (rc < 0) 253 253 { 254 254 rc = errno; 255 LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, (int)g_File));255 LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, RTFileToNative(g_hFile))); 256 256 return RTErrConvertFromErrno(rc); 257 257 } -
trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp
r36090 r40504 24 24 #include <fcntl.h> 25 25 #include <kstat.h> 26 #include <unistd.h> 26 27 #include <sys/sysinfo.h> 27 28 #include <sys/time.h> … … 71 72 } 72 73 73 if ((mSysPages = kstat_lookup(mKC, "unix", 0,"system_pages")) == 0)74 if ((mSysPages = kstat_lookup(mKC, (char *)"unix", 0, (char *)"system_pages")) == 0) 74 75 { 75 76 Log(("kstat_lookup(system_pages) -> %d\n", errno)); … … 77 78 } 78 79 79 if ((mZFSCache = kstat_lookup(mKC, "zfs", 0,"arcstats")) == 0)80 if ((mZFSCache = kstat_lookup(mKC, (char *)"zfs", 0, (char *)"arcstats")) == 0) 80 81 { 81 82 Log(("kstat_lookup(system_pages) -> %d\n", errno)); … … 180 181 return VERR_INTERNAL_ERROR; 181 182 } 182 if ((kn = (kstat_named_t *)kstat_data_lookup(mSysPages, "freemem")) == 0)183 if ((kn = (kstat_named_t *)kstat_data_lookup(mSysPages, (char *)"freemem")) == 0) 183 184 { 184 185 Log(("kstat_data_lookup(freemem) -> %d\n", errno)); … … 191 192 if (mZFSCache) 192 193 { 193 if ((kn = (kstat_named_t *)kstat_data_lookup(mZFSCache, "size")))194 if ((kn = (kstat_named_t *)kstat_data_lookup(mZFSCache, (char *)"size"))) 194 195 { 195 196 ulong_t ulSize = kn->value.ul; 196 197 197 if ((kn = (kstat_named_t *)kstat_data_lookup(mZFSCache, "c_min")))198 if ((kn = (kstat_named_t *)kstat_data_lookup(mZFSCache, (char *)"c_min"))) 198 199 { 199 200 /* … … 215 216 } 216 217 217 if ((kn = (kstat_named_t *)kstat_data_lookup(mSysPages, "physmem")) == 0)218 if ((kn = (kstat_named_t *)kstat_data_lookup(mSysPages, (char *)"physmem")) == 0) 218 219 { 219 220 Log(("kstat_data_lookup(physmem) -> %d\n", errno)); -
trunk/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp
r37631 r40504 247 247 struct stat st; 248 248 if (fstat(fd, &st) == 0) 249 return st.st_size < ~(size_t)0 ? (size_t)st.st_size : ~(size_t)0; 249 { 250 if (st.st_size <= 0) 251 return 0; 252 size_t cbFile = (size_t)st.st_size; 253 return (off_t)cbFile == st.st_size ? cbFile : ~(size_t)0; 254 } 250 255 251 256 CORELOGRELSYS((CORELOG_NAME "GetFileSizeByFd: fstat failed rc=%Rrc\n", RTErrConvertFromErrno(errno))); … … 1806 1811 } 1807 1812 1808 1809 /** 1810 * Write a prepared core file using a user-passed in writer function, requires all threads 1811 * to be in suspended state (i.e. called after CreateCore). 1812 * 1813 * @param pSolCore Pointer to the core object. 1814 * @param pfnWriter Pointer to the writer function to override default writer (NULL uses default). 1815 * 1816 * @remarks Resumes all suspended threads, unless it's an invalid core. This 1817 * function must be called only -after- rtCoreDumperCreateCore(). 1818 * @return IPRT status. 1819 */ 1820 static int rtCoreDumperWriteCore(PRTSOLCORE pSolCore, PFNRTCOREWRITER pfnWriter) 1821 { 1822 AssertReturn(pSolCore, VERR_INVALID_POINTER); 1823 1824 if (!pSolCore->fIsValid) 1825 return VERR_INVALID_STATE; 1826 1827 if (pfnWriter) 1828 pSolCore->pfnWriter = pfnWriter; 1829 1830 PRTSOLCOREPROCESS pSolProc = &pSolCore->SolProc; 1831 char szPath[PATH_MAX]; 1832 int rc = VINF_SUCCESS; 1833 1834 /* 1835 * Open the process address space file. 1836 */ 1837 RTStrPrintf(szPath, sizeof(szPath), "/proc/%d/as", (int)pSolProc->Process); 1838 int fd = open(szPath, O_RDONLY); 1839 if (fd < 0) 1840 { 1841 rc = RTErrConvertFromErrno(fd); 1842 CORELOGRELSYS((CORELOG_NAME "WriteCore: Failed to open address space, %s. rc=%Rrc\n", szPath, rc)); 1843 goto WriteCoreDone; 1844 } 1845 1846 pSolProc->fdAs = fd; 1847 1848 /* 1849 * Create the core file. 1850 */ 1851 fd = open(pSolCore->szCorePath, O_CREAT | O_TRUNC | O_RDWR, S_IRUSR); 1852 if (fd < 0) 1853 { 1854 rc = RTErrConvertFromErrno(fd); 1855 CORELOGRELSYS((CORELOG_NAME "WriteCore: failed to open %s. rc=%Rrc\n", pSolCore->szCorePath, rc)); 1856 goto WriteCoreDone; 1857 } 1858 1859 pSolCore->fdCoreFile = fd; 1860 1813 /** 1814 * Inner worker for rtCoreDumperWriteCore, which purpose is to 1815 * squash cleanup gotos. 1816 */ 1817 static int rtCoreDumperWriteCoreDoIt(PRTSOLCORE pSolCore, PFNRTCOREWRITER pfnWriter, 1818 PRTSOLCOREPROCESS pSolProc) 1819 { 1861 1820 pSolCore->offWrite = 0; 1862 uint32_t cProgHdrs 1821 uint32_t cProgHdrs = pSolProc->cMappings + 2; /* two PT_NOTE program headers (old, new style) */ 1863 1822 1864 1823 /* … … 1889 1848 ElfHdr.e_phentsize = sizeof(Elf_Phdr); 1890 1849 ElfHdr.e_shentsize = sizeof(Elf_Shdr); 1891 rc = pSolCore->pfnWriter(pSolCore->fdCoreFile, &ElfHdr, sizeof(ElfHdr));1850 int rc = pSolCore->pfnWriter(pSolCore->fdCoreFile, &ElfHdr, sizeof(ElfHdr)); 1892 1851 if (RT_FAILURE(rc)) 1893 1852 { 1894 1853 CORELOGRELSYS((CORELOG_NAME "WriteCore: pfnWriter failed writing ELF header. rc=%Rrc\n", rc)); 1895 goto WriteCoreDone;1854 return rc; 1896 1855 } 1897 1856 … … 1914 1873 { 1915 1874 CORELOGRELSYS((CORELOG_NAME "WriteCore: pfnWriter failed writing old-style ELF program Header. rc=%Rrc\n", rc)); 1916 goto WriteCoreDone;1875 return rc; 1917 1876 } 1918 1877 … … 1927 1886 { 1928 1887 CORELOGRELSYS((CORELOG_NAME "WriteCore: pfnWriter failed writing new-style ELF program header. rc=%Rrc\n", rc)); 1929 goto WriteCoreDone;1888 return rc; 1930 1889 } 1931 1890 … … 1938 1897 { 1939 1898 CORELOGRELSYS((CORELOG_NAME "Write: ElfWriteMappings failed. rc=%Rrc\n", rc)); 1940 goto WriteCoreDone;1899 return rc; 1941 1900 } 1942 1901 … … 1948 1907 { 1949 1908 CORELOGRELSYS((CORELOG_NAME "WriteCore: ElfWriteNoteSection old-style failed. rc=%Rrc\n", rc)); 1950 goto WriteCoreDone;1909 return rc; 1951 1910 } 1952 1911 … … 1958 1917 { 1959 1918 CORELOGRELSYS((CORELOG_NAME "WriteCore: ElfWriteNoteSection new-style failed. rc=%Rrc\n", rc)); 1960 goto WriteCoreDone;1919 return rc; 1961 1920 } 1962 1921 … … 1968 1927 { 1969 1928 CORELOGRELSYS((CORELOG_NAME "WriteCore: ElfWriteMappings failed. rc=%Rrc\n", rc)); 1970 goto WriteCoreDone; 1971 } 1972 1973 1974 WriteCoreDone: 1975 if (pSolCore->fdCoreFile != -1) /* Initialized in rtCoreDumperCreateCore() */ 1976 { 1977 close(pSolCore->fdCoreFile); 1978 pSolCore->fdCoreFile = -1; 1979 } 1980 1981 if (pSolProc->fdAs != -1) /* Initialized in rtCoreDumperCreateCore() */ 1982 { 1929 return rc; 1930 } 1931 1932 return rc; 1933 } 1934 1935 1936 /** 1937 * Write a prepared core file using a user-passed in writer function, requires all threads 1938 * to be in suspended state (i.e. called after CreateCore). 1939 * 1940 * @param pSolCore Pointer to the core object. 1941 * @param pfnWriter Pointer to the writer function to override default writer (NULL uses default). 1942 * 1943 * @remarks Resumes all suspended threads, unless it's an invalid core. This 1944 * function must be called only -after- rtCoreDumperCreateCore(). 1945 * @return IPRT status. 1946 */ 1947 static int rtCoreDumperWriteCore(PRTSOLCORE pSolCore, PFNRTCOREWRITER pfnWriter) 1948 { 1949 AssertReturn(pSolCore, VERR_INVALID_POINTER); 1950 1951 if (!pSolCore->fIsValid) 1952 return VERR_INVALID_STATE; 1953 1954 if (pfnWriter) 1955 pSolCore->pfnWriter = pfnWriter; 1956 1957 PRTSOLCOREPROCESS pSolProc = &pSolCore->SolProc; 1958 char szPath[PATH_MAX]; 1959 int rc; 1960 1961 /* 1962 * Open the process address space file. 1963 */ 1964 RTStrPrintf(szPath, sizeof(szPath), "/proc/%d/as", (int)pSolProc->Process); 1965 int fd = open(szPath, O_RDONLY); 1966 if (fd >= 0) 1967 { 1968 pSolProc->fdAs = fd; 1969 1970 /* 1971 * Create the core file. 1972 */ 1973 fd = open(pSolCore->szCorePath, O_CREAT | O_TRUNC | O_RDWR, S_IRUSR); 1974 if (fd >= 0) 1975 { 1976 pSolCore->fdCoreFile = fd; 1977 1978 /* 1979 * Do the actual writing. 1980 */ 1981 rc = rtCoreDumperWriteCoreDoIt(pSolCore, pfnWriter, pSolProc); 1982 1983 close(pSolCore->fdCoreFile); 1984 pSolCore->fdCoreFile = -1; 1985 } 1986 else 1987 { 1988 rc = RTErrConvertFromErrno(fd); 1989 CORELOGRELSYS((CORELOG_NAME "WriteCore: failed to open %s. rc=%Rrc\n", pSolCore->szCorePath, rc)); 1990 } 1983 1991 close(pSolProc->fdAs); 1984 1992 pSolProc->fdAs = -1; 1993 } 1994 else 1995 { 1996 rc = RTErrConvertFromErrno(fd); 1997 CORELOGRELSYS((CORELOG_NAME "WriteCore: Failed to open address space, %s. rc=%Rrc\n", szPath, rc)); 1985 1998 } 1986 1999 -
trunk/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
r30238 r40504 167 167 168 168 pReqInt->AioCB.aio_lio_opcode = uTransferDirection; 169 pReqInt->AioCB.aio_fildes = (int)hFile;169 pReqInt->AioCB.aio_fildes = RTFileToNative(hFile); 170 170 pReqInt->AioCB.aio_offset = off; 171 171 pReqInt->AioCB.aio_nbytes = cbTransfer; … … 202 202 203 203 pReqInt->fFlush = true; 204 pReqInt->AioCB.aio_fildes = (int)hFile;204 pReqInt->AioCB.aio_fildes = RTFileToNative(hFile); 205 205 pReqInt->AioCB.aio_offset = 0; 206 206 pReqInt->AioCB.aio_nbytes = 0; -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_util.c
r4837 r40504 55 55 } 56 56 57 #if defined(XP_MAC) || defined(XP_SOLARIS)58 static char *strdup(const char *c)59 {60 char *newStr = malloc(strlen(c) + 1);61 if (newStr)62 {63 strcpy(newStr, c);64 }65 return newStr;66 }67 #endif68 69 57 char * 70 58 xpidl_strdup(const char *s) 71 59 { 60 #if defined(XP_MAC) || defined(XP_SOLARIS) /* bird: dunno why this is required, but whatever*/ 61 size_t len = strlen(s); 62 char *ns = malloc(len + 1); 63 if (ns) 64 memcpy(ns, s, len + 1); 65 #else 72 66 char *ns = strdup(s); 67 #endif 73 68 if (!ns) { 74 69 fputs(OOM, stderr); -
trunk/src/recompiler/Sun/testmath.c
r33540 r40504 86 86 printf("%llx:%04x instead of %llx:%04x\n", *(unsigned long long *)&lrd2, ((unsigned short *)&lrd2)[4], ull, us); 87 87 #endif 88 __asm__("int 3\n");88 __asm__("int $3\n"); 89 89 } 90 90 return lrd; … … 115 115 { 116 116 printf("get_cw() -> %#x expected %#x\n", get_cw(), cw); 117 __asm__("int 3\n");117 __asm__("int $3\n"); 118 118 } 119 119 return check_lrd(lrd, ull, us); … … 205 205 #endif 206 206 207 // __asm__("int 3");207 // __asm__("int $3"); 208 208 CHECKL(lrintl(make_lrd_cw(000000000000000000ULL,000000,0x027f)), 0L); 209 209 CHECKL(lrintl(make_lrd_cw(0x8000000000000000ULL,0x3ffe,0x027f)), 0L);
Note:
See TracChangeset
for help on using the changeset viewer.