diff --git a/config/rules.mk b/config/rules.mk index 0011d37f98f2..0cce2d704844 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -282,10 +282,12 @@ ifdef CPPSRCS CPP_PROG_LINK = 1 endif +# +# This will strip out symbols that the component shouldnt be +# exporting from the .dynsym section. +# ifdef IS_COMPONENT -ifdef MOZ_LOW_FAT -EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_LOW_FAT_LDFLAGS) -endif # MOZ_LOW_FAT +EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) endif # IS_COMPONENT # diff --git a/configure.in b/configure.in index 62ba68303b08..457a55cc3a97 100644 --- a/configure.in +++ b/configure.in @@ -2478,14 +2478,19 @@ dnl = MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS dnl = dnl = Flags to strip unused symbols from .so components dnl = +dnl = On on Linux non debug builds by default +dnl = dnl ======================================================== MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS= -case "$host" in -*-linux*) - MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(topsrcdir)/build/unix/gnu-ld-scripts/components-version-script' - ;; -esac +if test ! "$MOZ_DEBUG" +then + case "$host" in + *-linux*) + MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(topsrcdir)/build/unix/gnu-ld-scripts/components-version-script' + ;; + esac +fi dnl ======================================================== dnl ========================================================