aboutsummaryrefslogtreecommitdiffstats
path: root/main/Makefile
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-02 18:57:58 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-02 18:57:58 +0000
commita321328986a6b0ae2a6988326fdd12d44b4dbd75 (patch)
tree617eb61593a42ffe9e08c245fa183358073bbf84 /main/Makefile
parentf98d7537857848e6657487294a85995076177c47 (diff)
Allow symbol export filtering to work properly on platforms that have symbol prefixes.
Some platforms prefix externally-visible symbols in object files generated from C sources (most commonly, '_' is the prefix). On these platforms, the existing symbol export filtering process ends up suppressing all the symbols that are supposed to be left visible. This patch allows the prefix string to be supplied to the top-level Makefile in the LINKER_SYMBOL_PREFIX variable, and then generates the linker scripts as required to include the prefix supplied. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@255906 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/Makefile')
-rw-r--r--main/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/main/Makefile b/main/Makefile
index a019a0855..ada40fe61 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -167,7 +167,7 @@ endif
$(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\"
-$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) asterisk.exports
+$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
$(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
@@ -176,9 +176,16 @@ else
$(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS)
endif
+ifeq ($(GNU_LD),1)
+$(MAIN_TGT): asterisk.exports
+asterisk.exports: asterisk.exports.in
+ $(CMD_PREFIX) $(ASTTOPDIR)/build_tools/make_linker_version_script asterisk $(LINKER_SYMBOL_PREFIX)
+endif
+
clean::
rm -f asterisk
rm -f db1-ast/.*.d
+ rm -f asterisk.exports
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
@$(MAKE) -C db1-ast clean
@$(MAKE) -C stdtime clean