Il 11/09/2013 16:42, Gabriel Kerneis ha scritto: > On Wed, Sep 11, 2013 at 04:01:50PM +0200, Paolo Bonzini wrote: >>> ./configure --extra-cflags="-Dcoroutine_fn='__attribute__((coroutine_fn))'" >> >> Where does the shell read config-host.mak? Make does not need the quotes. > > I might have been confused about the shell vs. make interpreting the > string, but I am positive that without the patch, the following fails: > > mkdir bin/test > cd bin/test > ../../configure \ > --extra-cflags="-Dcoroutine_fn='__attribute__((coroutine_fn))' -w" > make tests/test-coroutine > touch ../../configure > make tests/test-coroutine > > with the following error message: > > config-host.mak is out-of-date, running configure > sh: 1: Syntax error: "(" unexpected > make: *** [config-host.mak] Error 2 > > My patch fixes this issue.
Oh, then it's this line in configure that has to be changed to do proper quoting. printf "# Configured with:" >> $config_host_mak printf " '%s'" "$0" "$@" >> $config_host_mak Something like for arg in "$0" "$@"; do quoted_arg=$(echo "$i" | sed 's/[$\\"]/\\&/g') printf ' "%s"' "$quoted_arg" done >> $config_host_mak could replace the second line. Adding Eric Blake in case he knows some extra trick. Paolo