FS-6406: --resolve add a way to specify build compiler for cross compile
This commit is contained in:
parent
d40615267e
commit
1681b04129
|
@ -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
|
||||
|
||||
|
|
|
@ -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"])
|
||||
|
|
Loading…
Reference in New Issue