[asterisk-commits] kpfleming: trunk r256428 - in /trunk: ./ build_tools/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 8 11:35:11 CDT 2010


Author: kpfleming
Date: Thu Apr  8 11:35:10 2010
New Revision: 256428

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256428
Log:
Ensure that linker version scripts (used for symbol export control) always exist.
  
Using wildcard matching in the Makefile is not adequate to determine whether
an export file should exist for a module or not, so instead we'll just
create one if the module needs one, or copy the default one if it does not.

Modified:
    trunk/   (props changed)
    trunk/Makefile.rules
    trunk/build_tools/make_linker_version_script

Propchange: trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /be/branches/C.3:256426

Modified: trunk/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/trunk/Makefile.rules?view=diff&rev=256428&r1=256427&r2=256428
==============================================================================
--- trunk/Makefile.rules (original)
+++ trunk/Makefile.rules Thu Apr  8 11:35:10 2010
@@ -55,7 +55,7 @@
 CXX_CFLAGS=$(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(_ASTCFLAGS) $(ASTCFLAGS))
 
 ifeq ($(GNU_LD),1)
-SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(if $(wildcard $(subst .so,.exports,$@)),$(subst .so,.exports,$@),$(ASTTOPDIR)/default.exports),--warn-common
+SO_SUPPRESS_SYMBOLS=-Wl,--version-script,$(subst .so,.exports,$@),--warn-common
 ifneq ($(wildcard $(subst .so,.dynamics,$@)),)
 SO_SUPPRESS_SYMBOLS+=-Wl,--dynamic-list,$(subst .so,.dynamics,$@)
 endif
@@ -118,14 +118,14 @@
 
 %.so: %.o
 ifeq ($(GNU_LD),1)
-	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* $(LINKER_SYMBOL_PREFIX)
+	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* "$(LINKER_SYMBOL_PREFIX)" "$(ASTTOPDIR)"
 endif
 	$(ECHO_PREFIX) echo "   [LD] $^ -> $@"
 	$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
 
 %.so: %.oo
 ifeq ($(GNU_LD),1)
-	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* $(LINKER_SYMBOL_PREFIX)
+	$(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script $* "$(LINKER_SYMBOL_PREFIX)" "$(ASTTOPDIR)"
 endif
 	$(ECHO_PREFIX) echo "   [LDXX] $^ -> $@"
 	$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(CXX_LDFLAGS_SO) $^ $(CXX_LIBS)

Modified: trunk/build_tools/make_linker_version_script
URL: http://svnview.digium.com/svn/asterisk/trunk/build_tools/make_linker_version_script?view=diff&rev=256428&r1=256427&r2=256428
==============================================================================
--- trunk/build_tools/make_linker_version_script (original)
+++ trunk/build_tools/make_linker_version_script Thu Apr  8 11:35:10 2010
@@ -1,4 +1,5 @@
 #!/bin/sh
 
-test -f ${1}.exports.in && ${AWK} "{sub(\"LINKER_SYMBOL_PREFIX\", \"${2}\"); print;}" ${1}.exports.in > ${1}.exports
-test -f ${1}.exports.in || rm -f ${1}.exports
+test -f ${1}.exports.in && ${AWK} "{sub(\"LINKER_SYMBOL_PREFIX\", \"${2}\"); print;}" ${1}.exports.in > ${1}.exports && exit 0
+test -f ${1}.exports.in || rm -f ${1}.exports && cp ${3}/default.exports ${1}.exports && exit 0
+




More information about the asterisk-commits mailing list