Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-24 Thread Thomas Huth
On 24.04.2018 19:58, Ian Jackson wrote: > This makes it much easier to find a particular thing in config.log. > > We have to use the ${BASH_LINENO[*]} syntax which is a syntax error in > other shells, so test what shell we are running and use eval. > > The extra output is only printed if configur

[Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-24 Thread Ian Jackson
This makes it much easier to find a particular thing in config.log. We have to use the ${BASH_LINENO[*]} syntax which is a syntax error in other shells, so test what shell we are running and use eval. The extra output is only printed if configure is run with bash. On systems where /bin/sh is not

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-24 Thread Ian Jackson
Eric Blake writes ("Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash"): > That's still fork-heavy. You could do: > > test -n "$BASH_VERSION" && eval ' > echo >>config.log " > funcs:

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-23 Thread Eric Blake
On 04/23/2018 11:38 AM, Ian Jackson wrote: > You are right. Perhaps my testing was inadequate. I wrote this a > long while ago, and if there was a syntax along these lines that DTRT > in both bash and dash in my tests it is long gone. Starting de novo, > the following code works for me: > >

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-23 Thread Ian Jackson
Daniel P. Berrangé writes ("Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash"): > Personally I'd suggest we add informative messages throughout the > configure script for each check being run. If people really hate the > idea

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-23 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH 16/16] configure: do_compiler: Dump some extra info under bash"): > On Thu, Apr 19, 2018 at 05:45:19PM +0100, Ian Jackson wrote: > > +funcs: ${FUNCNAME} > > +lines: ${BASH_LINENO} > > +files: ${BASH_SOURCE}" > > echo $compiler "$@" >> config.log > > $co

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-23 Thread Daniel P . Berrangé
On Mon, Apr 23, 2018 at 05:21:42PM +0100, Anthony PERARD wrote: > On Thu, Apr 19, 2018 at 05:45:19PM +0100, Ian Jackson wrote: > > This makes it much easier to find a particular thing in config.log. > > > > The information may be lacking in other shells, resulting in harmless > > empty output. (T

Re: [Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-23 Thread Anthony PERARD
On Thu, Apr 19, 2018 at 05:45:19PM +0100, Ian Jackson wrote: > This makes it much easier to find a particular thing in config.log. > > The information may be lacking in other shells, resulting in harmless > empty output. (This is why we don't use the proper ${FUNCNAME[*]} > array syntax - other s

[Qemu-devel] [PATCH 16/16] configure: do_compiler: Dump some extra info under bash

2018-04-19 Thread Ian Jackson
This makes it much easier to find a particular thing in config.log. The information may be lacking in other shells, resulting in harmless empty output. (This is why we don't use the proper ${FUNCNAME[*]} array syntax - other shells will choke on that.) The extra output is only printed if configu