Changeset 2435
- Timestamp:
- 04/30/07 16:58:17 (2 years ago)
- Files:
-
- trunk/Config.kmk (modified) (8 diffs)
- trunk/include/iprt/cdefs.h (modified) (1 diff)
- trunk/src/libs/xpcom18a4/Makefile.kmk (modified) (8 diffs)
- trunk/src/libs/xpcom18a4/nsprpub/pr/include/prtypes.h (modified) (1 diff)
- trunk/src/libs/xpcom18a4/xpcom/base/nscore.h (modified) (2 diffs)
- trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/public/xptcall.h (modified) (1 diff)
- trunk/src/recompiler/InnoTek/deftoimp.sed (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Config.kmk
r2383 r2435 842 842 export VBOX_GCC_fno-stack-protector := $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,) 843 843 endif 844 # Set default attribute for ELF symbols to ``hidden'' to reduce the number 845 # of relocation entries and PLT indirections in shared libraries. 846 ifeq ($(origin VBOX_GCC_fvisibility-hidden),undefined) 847 export VBOX_GCC_fvisibility-hidden := $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden,) 848 endif 849 # Set default attribute for inline functions to ``hidden'' to reduce the number 850 # of relocation entries and PLT indirections in shared libraries. 851 ifeq ($(origin VBOX_GCC_fvisibility-inlines-hidden),undefined) 852 export VBOX_GCC_fvisibility-inlines-hidden := $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,) 853 endif 844 854 845 855 # 32-bit (GC) compiler switch detection. … … 1094 1104 ifeq ($(VBOX_LDR_FMT32),elf) 1095 1105 TEMPLATE_VBOXGC_TOOL = $(VBOX_GCC32_TOOL) 1096 TEMPLATE_VBOXGC_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-exceptions -fno-rtti $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) 1097 TEMPLATE_VBOXGC_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) 1106 TEMPLATE_VBOXGC_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -fno-exceptions -fno-rtti $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) 1107 TEMPLATE_VBOXGC_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC32_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) 1098 1108 TEMPLATE_VBOXGC_LDFLAGS = -nostdlib -Bsymbolic 1099 1109 # temporarily, must fix the loader. … … 1189 1199 ifeq ($(VBOX_LDR_FMT),elf) 1190 1200 TEMPLATE_VBOXR0_TOOL = $(VBOX_GCC_TOOL) 1191 TEMPLATE_VBOXR0_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) 1192 TEMPLATE_VBOXR0_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) 1201 TEMPLATE_VBOXR0_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) 1202 TEMPLATE_VBOXR0_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -fno-rtti -fno-exceptions $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 1193 1203 TEMPLATE_VBOXR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding 1194 1204 TEMPLATE_VBOXR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables … … 1378 1388 else # the gcc guys 1379 1389 TEMPLATE_VBOXR3EXE_TOOL = $(VBOX_GCC_TOOL) 1380 TEMPLATE_VBOXR3EXE_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 1390 TEMPLATE_VBOXR3EXE_CXXFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 1381 1391 # L4 currently can't handle exception handling. 1382 1392 TEMPLATE_VBOXR3EXE_CXXFLAGS.l4 = -fno-exceptions -nostdinc \ … … 1386 1396 TEMPLATE_VBOXR3EXE_CFLAGS.debug = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug) 1387 1397 TEMPLATE_VBOXR3EXE_CFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile) 1388 TEMPLATE_VBOXR3EXE_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 1398 TEMPLATE_VBOXR3EXE_CFLAGS = -g -Wall -pedantic -Wno-long-long -Wno-trigraphs $(VBOX_GCC_Wno-variadic-macros) -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) 1389 1399 TEMPLATE_VBOXR3EXE_CFLAGS.darwin = -fno-common 1390 1400 TEMPLATE_VBOXR3EXE_CFLAGS.l4 = -nostdinc \ … … 1464 1474 TEMPLATE_VBOXR3NPEXE_TOOL = $(VBOX_GCC_TOOL) 1465 1475 TEMPLATE_VBOXR3NPEXE_CXXFLAGS = $(filter-out -pedantic,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) 1466 TEMPLATE_VBOXR3NPEXE_CFLAGS = $(filter-out -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations ,$(TEMPLATE_VBOXR3EXE_CXXFLAGS))1476 TEMPLATE_VBOXR3NPEXE_CFLAGS = $(filter-out -pedantic -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3EXE_CFLAGS)) 1467 1477 endif 1468 1478 … … 1611 1621 TEMPLATE_VBOXMAINEXE_DEFS += VBOX_WITH_XPCOM 1612 1622 TEMPLATE_VBOXMAINEXE_TOOL = $(VBOX_GCC_TOOL) 1613 TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -Wno-non-virtual-dtor -fshort-wchar -fpermissive $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 1623 TEMPLATE_VBOXMAINEXE_CXXFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -Wno-non-virtual-dtor -fshort-wchar -fpermissive $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 1614 1624 TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -fno-inline 1615 1625 TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -finstrument-functions 1616 TEMPLATE_VBOXMAINEXE_CFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing 1626 TEMPLATE_VBOXMAINEXE_CFLAGS = -g -Wall -Wno-long-long -Wno-trigraphs -pipe -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) 1617 1627 TEMPLATE_VBOXMAINEXE_CFLAGS.debug = -fno-inline 1618 1628 TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile) … … 1772 1782 TEMPLATE_VBOXQTGUIEXE_CXXFLAGS = \ 1773 1783 -pipe -Wall -W -frtti -fno-exceptions -Wno-non-virtual-dtor \ 1774 -Wno-long-long -fshort-wchar -fno-strict-aliasing 1784 -Wno-long-long -fshort-wchar -fno-strict-aliasing \ 1785 $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) 1775 1786 TEMPLATE_VBOXQTGUIEXE_CXXFLAGS.linux = -pthread 1776 1787 ## @todo no $(LIB_QTMAIN) here? trunk/include/iprt/cdefs.h
r2358 r2435 401 401 # define DECLEXPORT(type) __declspec(dllexport) type 402 402 #else 403 # define DECLEXPORT(type) type403 # define DECLEXPORT(type) __attribute__((visibility("default"))) type 404 404 #endif 405 405 trunk/src/libs/xpcom18a4/Makefile.kmk
r2366 r2435 32 32 TEMPLATE_XPCOM_ASDEFS = $(NO_SUCH_VARIABLE) 33 33 TEMPLATE_XPCOM_CXXFLAGS = -pipe -ansi -Wall -Wno-unused -Wno-non-virtual-dtor \ 34 $(VBOX_GCC_Wno-invalid-offsetof) -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy 34 $(VBOX_GCC_Wno-invalid-offsetof) -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy \ 35 $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) 35 36 36 37 TEMPLATE_XPCOM_CXXFLAGS.debug = -fno-inline … … 40 41 TEMPLATE_XPCOM_CXXFLAGS.l4 = -fno-exceptions -nostdinc 41 42 TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread 42 TEMPLATE_XPCOM_CFLAGS = -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized 43 TEMPLATE_XPCOM_CFLAGS = -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized $(VBOX_GCC_fvisibility-hidden) 43 44 TEMPLATE_XPCOM_CFLAGS.debug = -fno-inline 44 45 TEMPLATE_XPCOM_CFLAGS.release = -O … … 46 47 TEMPLATE_XPCOM_CFLAGS.l4 = -nostdinc 47 48 TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi 48 TEMPLATE_XPCOM_DEFS = MOZILLA_CLIENT=1 NDEBUG=1 49 TEMPLATE_XPCOM_DEFS = MOZILLA_CLIENT=1 NDEBUG=1 _IMPL_NS_COM 49 50 TEMPLATE_XPCOM_DEFS.x86 = i386=1 50 51 TEMPLATE_XPCOM_DEFS.amd64 = HAVE_VA_LIST_AS_ARRAY HAVE_VA_COPY VA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\) 51 TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" MOZ_DLL_SUFFIX=\".dylib\" XP_UNIX=1 XP_MACOSX=1 TARGET_CARBON=1 52 TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" MOZ_DLL_SUFFIX=\".so\" XP_UNIX=1 _GNU_SOURCE 53 TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" MOZ_DLL_SUFFIX=\".s.so\" XP_UNIX=1 L4ENV 52 TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" MOZ_DLL_SUFFIX=\".dylib\" XP_UNIX=1 XP_MACOSX=1 TARGET_CARBON=1 HAVE_VISIBILITY_ATTRIBUTE=1 53 TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" MOZ_DLL_SUFFIX=\".so\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1 54 TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" MOZ_DLL_SUFFIX=\".s.so\" XP_UNIX=1 L4ENV HAVE_VISIBILITY_ATTRIBUTE=1 54 55 TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2 4.5\" OSARCH=\"OS/2\" MOZ_DLL_SUFFIX=\".dll\" XP_UNIX=1 55 56 TEMPLATE_XPCOM_LDFLAGS.darwin = $(VBOXR3NP_LDFLAGS.darwin) \ … … 554 555 FORCE_PR_LOG 555 556 VBox-xpcom-nspr_DEFS.darwin = \ 556 HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \557 557 HAVE_BSD_FLOCK=1 \ 558 558 _PR_PTHREADS … … 568 568 _REENTRANT=1 \ 569 569 _LARGEFILE64_SOURCE=1 \ 570 HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \571 HAVE_VISIBILITY_PRAGMA=1 \572 570 HAVE_FCNTL_FILE_LOCKING=1 \ 573 571 HAVE_CVAR_BUILT_ON_SEM \ … … 581 579 _POSIX_SOURCE=1 \ 582 580 _BSD_SOURCE=1 \ 583 HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 \584 HAVE_VISIBILITY_PRAGMA=1 \585 581 HAVE_FCNTL_FILE_LOCKING=1 \ 586 582 HAVE_CVAR_BUILT_ON_SEM … … 725 721 VBox-xpcom-string_TEMPLATE = XPCOM 726 722 VBox-xpcom-string_NOINST = 1 727 VBox-xpcom-string_DEFS = _IMPL_NS_COM728 723 VBox-xpcom-string_SOURCES = \ 729 724 xpcom/string/src/nsAString.cpp \ … … 912 907 # 913 908 VBoxXPCOM_TEMPLATE = XPCOM 914 VBoxXPCOM_DEFS = BUILD_DCONNECT="1" 909 VBoxXPCOM_DEFS = BUILD_DCONNECT="1" _IMPL_NS_COM 915 910 VBoxXPCOM_SOURCES = \ 916 911 xpcom/glue/nsCOMPtr.cpp \ trunk/src/libs/xpcom18a4/nsprpub/pr/include/prtypes.h
r1 r2435 179 179 #else /* Unix */ 180 180 181 #define PR_EXPORT(__type) extern __type182 #define PR_EXPORT_DATA(__type) extern __type181 #define PR_EXPORT(__type) __attribute__((visibility("default"))) extern __type 182 #define PR_EXPORT_DATA(__type) __attribute__((visibility("default"))) extern __type 183 183 #define PR_IMPORT(__type) extern __type 184 184 #define PR_IMPORT_DATA(__type) extern __type 185 185 186 #define PR_EXTERN(__type) extern __type187 #define PR_IMPLEMENT(__type) __ type188 #define PR_EXTERN_DATA(__type) extern __type189 #define PR_IMPLEMENT_DATA(__type) __ type186 #define PR_EXTERN(__type) __attribute__((visibility("default"))) extern __type 187 #define PR_IMPLEMENT(__type) __attribute__((visibility("default"))) __type 188 #define PR_EXTERN_DATA(__type) __attribute__((visibility("default"))) extern __type 189 #define PR_IMPLEMENT_DATA(__type) __attribute__((visibility("default"))) __type 190 190 #define PR_CALLBACK 191 191 #define PR_CALLBACK_DECL trunk/src/libs/xpcom18a4/xpcom/base/nscore.h
r1 r2435 102 102 #ifdef HAVE_VISIBILITY_ATTRIBUTE 103 103 #define NS_VISIBILITY_HIDDEN __attribute__ ((visibility ("hidden"))) 104 #define NS_VISIBILITY_DEFAULT 104 #define NS_VISIBILITY_DEFAULT __attribute__ ((visibility ("default"))) 105 105 106 106 #define NS_HIDDEN_(type) NS_VISIBILITY_HIDDEN type … … 181 181 #define NS_IMPORT 182 182 #define NS_IMPORT_(type) type 183 #define NS_EXPORT 184 #define NS_EXPORT_(type) type183 #define NS_EXPORT __attribute__((visibility("default"))) 184 #define NS_EXPORT_(type) __attribute__((visibility("default"))) type 185 185 #define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL 186 186 #define NS_IMETHODIMP_(type) type trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/public/xptcall.h
r1 r2435 61 61 # define XPTC_EXPORT __declspec(dllexport) 62 62 #else 63 # define XPTC_EXPORT 63 # define XPTC_EXPORT __attribute__((visibility("default"))) 64 64 #endif 65 65 #else trunk/src/recompiler/InnoTek/deftoimp.sed
r2427 r2435 1 # $Id: deftoimp.sed 1 8689 2007-02-16 09:08:04Z klaus$1 # $Id: deftoimp.sed 17147 2007-01-09 09:05:45Z bird $ 2 2 ## @file 3 3 # VBox Runtime - SED script for windows .def file stubs file. … … 31 31 /^$/b end 32 32 33 s/^\(.*\)$/ void \1(void);\nvoid \1(void){}/33 s/^\(.*\)$/__attribute__((visibility("default"))) void \1(void);\nvoid \1(void){}/ 34 34 b end 35 35 }

