FS-6406: --resolve add a way to specify build compiler for cross compile

This commit is contained in:
Michael Jerris 2014-03-26 17:15:24 -04:00
parent d40615267e
commit 1681b04129
2 changed files with 9 additions and 1 deletions

View File

@ -410,7 +410,7 @@ $(OUR_MODULES): $(switch_builddir)/modules.conf libfreeswitch.la
test -z "$$fail"
build/print_git_revision: build/print_git_revision.c
$(CC) -o $@ $<
$(CC_FOR_BUILD) -o $@ $<
src/switch_version.lo: src/include/switch_version.h

View File

@ -218,6 +218,14 @@ AC_PROG_LIBTOOL
#Check for compiler vendor
AX_COMPILER_VENDOR
# Set CC_FOR_BUILD
if test "x${cross_compiling}" = "xyes"; then
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
else
CC_FOR_BUILD='$(CC)'
fi
AC_SUBST(CC_FOR_BUILD)
# Optimize
AC_ARG_ENABLE(optimization,
[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])