Bug 809430 - Add symbol versions. r=glandium

This commit is contained in:
Ian Stakenvicius 2013-04-25 15:35:40 -07:00
parent 7fa89a1cba
commit 9c4af6dfd6
4 changed files with 27 additions and 0 deletions

View File

@ -530,6 +530,18 @@ config/nsinstall$(HOST_BIN_SUFFIX): $(srcdir)/config/nsinstall.c $(srcdir)/confi
$(MAKE) -C config/ nsinstall$(HOST_BIN_SUFFIX)
endif
# Ensure symbol versions of shared library on Linux do not conflict
# with those in libxul.
ifeq (Linux,$(OS_TARGET))
EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
symverscript: symverscript.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
-DVERSION="$(subst -,_,$(LIBRARY_NAME))" $< > $@
EXTRA_DEPS += symverscript
endif
include $(topsrcdir)/config/rules.mk
ifdef JS_HAS_CTYPES

4
js/src/symverscript.in Normal file
View File

@ -0,0 +1,4 @@
#filter substitution
@VERSION@ {
global: *;
};

View File

@ -129,6 +129,13 @@ endif
ifeq (Linux,$(OS_ARCH))
ifneq (Android,$(OS_TARGET))
OS_LIBS += -lrt
EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
symverscript: symverscript.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
-DVERSION="$(LIBRARY_NAME)$(MOZILLA_VERSION)" $< > $@
EXTRA_DEPS += symverscript
endif
endif

View File

@ -0,0 +1,4 @@
#filter substitution
@VERSION@ {
global: *;
};