On Mon, Jul 23, 2012 at 01:35:06AM +0100, Måns Rullgård wrote: > Diego Biurrun <[email protected]> writes: > > On Mon, Jul 23, 2012 at 01:16:07AM +0100, Måns Rullgård wrote: > >> Diego Biurrun <[email protected]> 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.
Oh, the horrors of inconsistent syntax... Anyway, patch OK. Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
