From 18031c49dcf0317b1f0690b3bb2941a6a94db38f Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Fri, 20 Jul 2012 22:22:41 +0100 Subject: build: support non-standard replacements for -E flag This allows using non-standard flags for running the C preprocessor. The -o flag must be included in this setting due to strange syntax required by some compilers. Set the correct flags for tms470. Signed-off-by: Mans Rullgard --- configure | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 7e2f6baebc..42a53e5e8b 100755 --- a/configure +++ b/configure @@ -622,6 +622,10 @@ cc_o(){ eval printf '%s\\n' $CC_O } +cc_e(){ + eval printf '%s\\n' $CC_E +} + check_cc(){ log check_cc "$@" cat > $TMPC @@ -633,7 +637,7 @@ check_cpp(){ log check_cpp "$@" cat > $TMPC log_file $TMPC - check_cmd $cc $CPPFLAGS $CFLAGS "$@" -E -o $TMPO $TMPC + check_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC } check_as(){ @@ -1733,6 +1737,7 @@ cflags_filter=echo ldflags_filter=echo AS_O='-o $@' +CC_E='-E -o $@' CC_O='-o $@' LD_O='-o $@' HOSTCC_O='-o $@' @@ -2051,7 +2056,8 @@ probe_cc(){ pfx=$1 _cc=$2 - unset _type _ident _cc_o _flags _cflags _ldflags _depflags _DEPCMD _DEPFLAGS + unset _type _ident _cc_e _cc_o _flags _cflags _ldflags + unset _depflags _DEPCMD _DEPFLAGS _flags_filter=echo if $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then @@ -2114,6 +2120,7 @@ probe_cc(){ _ident=$($_cc -version | head -n1 | tr -s ' ') _flags='--gcc --abi=eabi -me' _cflags='-D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=' + _cc_e='-ppl -fe=$@' _cc_o='-fe=$@' as_default="${cross_prefix}gcc" ld_default="${cross_prefix}gcc" @@ -2165,6 +2172,7 @@ probe_cc(){ } set_ccvars(){ + eval ${1}_E=\${_cc_e-\${${1}_E}} eval ${1}_O=\${_cc_o-\${${1}_O}} if [ -n "$_depflags" ]; then -- cgit v1.2.3