Hi, On Sun, Jul 22, 2012 at 5:35 PM, Måns Rullgård <m...@mansr.com> wrote: > Diego Biurrun <di...@biurrun.de> writes: > >> On Mon, Jul 23, 2012 at 01:16:07AM +0100, Måns Rullgård wrote: >>> Diego Biurrun <di...@biurrun.de> writes: >>> >>> > On Mon, Jul 23, 2012 at 12:16:41AM +0100, Mans Rullgard wrote: >>> >> 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. >>> >> >>> >> --- a/configure >>> >> +++ b/configure >>> >> @@ -632,7 +636,7 @@ check_cpp(){ >>> >> log_file $TMPC >>> >> - check_cmd $cc $CPPFLAGS $CFLAGS "$@" -E -o $TMPO $TMPC >>> >> + check_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC >>> >> } >>> >> >>> >> @@ -1724,6 +1728,7 @@ cflags_filter=echo >>> >> >>> >> AS_O='-o $@' >>> >> +CC_E='-E -o $@' >>> >> CC_O='-o $@' >>> >> LD_O='-o $@' >>> >> HOSTCC_O='-o $@' >>> >> @@ -2042,7 +2047,8 @@ probe_cc(){ >>> >> >>> >> - 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 >>> >> >>> >> @@ -2105,6 +2111,7 @@ probe_cc(){ >>> >> _flags='--gcc --abi=eabi -me' >>> >> _cflags='-D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__=' >>> >> + _cc_e='-ppl -fe=$@' >>> >> _cc_o='-fe=$@' >>> > >>> > Why not set "CC_E" (or whatever) to "-E", "-ppl" and combine it with >>> > the cc_o function we already have? Something like this: >>> > >>> > for gcc (default): >>> > CC_E='-E' >>> > for that strange beast: >>> > CC_E='-ppl' >>> > >>> > - check_cmd $cc $CPPFLAGS $CFLAGS "$@" -E -o $TMPO $TMPC >>> > + check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_E $(cc_o $TMPO) $TMPC >>> >>> Because there are even stranger beasts in the compiler jungle. For >>> example, the IAR compiler needs CC_E='--preprocess=n $@' (note the lack >>> of -o). It's probably not the only one. >> >> CC_E='--preprocess=n' >> _cc_o='$@' >> >> Why would something like that not work? > > That would break normal compilation, because *then* it wants -o.
How do you intend to use this with MSVC? See: http://msdn.microsoft.com/en-us/library/8z9z0bx6(v=vs.71).aspx and http://msdn.microsoft.com/en-us/library/3xkfswhy(v=vs.71) Note how the second writes to stdout (leading to HUUUUUUGE config.log files), and the first unfortunately does not allow to specify an output file, instead writing to `pwd`/inputfilebasename.i. Using -P is probably useless unless it can be combined with a mv, but maybe -E can be redirected if our configure script supports that? Ronald _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel