VirtualBox

Ignore:
Timestamp:
Aug 21, 2008 5:16:02 PM (17 years ago)
Author:
vboxsync
Message:

API/xpcom: prefix any C symbols in VBoxXPCOM.so, to avoid namespace pollution. Enabled only on Linux at the moment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r11537 r11551  
    2727endif
    2828include $(KBUILD_PATH)/subheader.kmk
     29
     30# File for filtering out C symbols from the XPCOM library. Used to avoid
     31# symbol namespace pollution, causing trouble with system libraries.
     32XPCOM_C_NAMESPACE_MAP=$(VBOX_PATH_XPCOM_SRC)/xpcom-namespace-cleanup.map
     33
     34# @todo check whether VBoxXPCOMIPCC.so or VBoxXPCOMIPCD contain undefined
     35# symbols starting with NS_, PL_, PR_ or XPT. Would move the test time failure
     36# when missing a symbol renaming to a build time failure. Likewise, there
     37# should be a check whether VBoxXPCOM.so contains global C symbols (at least
     38# where the whitelisting of symbols via the map file is not used).
     39
    2940
    3041ifdef VBOX_WITH_PYTHON
     
    7889                                     XPCOM_DLL_BASE=\"$(basename $(notdir $(LIB_XPCOM)))\" \
    7990                                     MOZ_DLL_SUFFIX=\"$(suffix $(LIB_XPCOM))\"
     91ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     92TEMPLATE_XPCOM_DEFS                               += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     93endif
    8094TEMPLATE_XPCOM_DEFS.x86            = i386=1
    8195TEMPLATE_XPCOM_DEFS.amd64          = HAVE_VA_LIST_AS_ARRAY HAVE_VA_COPY VA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
     
    10991113VBoxXPCOM_NAME = $(basename $(notdir $(LIB_XPCOM)))
    11001114VBoxXPCOM_DEFS = BUILD_DCONNECT="1" _IMPL_NS_COM
     1115ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
     1116VBoxXPCOM_LDFLAGS.linux     = -Wl,--version-script=$(XPCOM_C_NAMESPACE_MAP)
     1117VBoxXPCOM_DEPS.linux       += $(XPCOM_C_NAMESPACE_MAP)
     1118VBoxXPCOM_LDFLAGS.solaris   = -Wl,-M,$(XPCOM_C_NAMESPACE_MAP)
     1119VBoxXPCOM_DEPS.solaris     += $(XPCOM_C_NAMESPACE_MAP)
     1120endif
    11011121VBoxXPCOM_SOURCES = \
    11021122        xpcom/build/nsXPComInit.cpp \
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