ensure that cross-compiler info is removed from the enviroment before configuring...
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 26 Aug 2006 17:05:38 +0000 (17:05 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 26 Aug 2006 17:05:38 +0000 (17:05 +0000)
ensure that the user's LDFLAGS take precedence when linking the final binary

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41178 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
main/Makefile

index dd6a9ff..e3ef712 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -647,7 +647,7 @@ menuselect: menuselect/menuselect menuselect-tree
        -@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
-       @$(MAKE) -C menuselect
+       @unset CC LD AR RANLIB && $(MAKE) -C menuselect
 
 menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
        @echo "Generating input for menuselect ..."
index f9c4059..ff90809 100644 (file)
@@ -134,7 +134,7 @@ asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
        @rm -f $(ASTTOPDIR)/include/asterisk/build.h.tmp
        @$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
        $(ECHO_PREFIX) echo "   [LD] $^ -> $@"
-       $(CMD_PREFIX) $(CXX) $(LDFLAGS) $(STATIC_BUILD) -o asterisk $(ASTLINK) $(AST_EMBED_LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS)
+       $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o asterisk $(ASTLINK) $(AST_EMBED_LDFLAGS) $(LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS)
 
 clean::
        rm -f asterisk