* [Qemu-devel] [PATCH] build-sys: keep current config.log on --help
@ 2015-06-25 22:38 Marc-André Lureau
2015-06-26 13:18 ` Paolo Bonzini
2015-06-26 13:26 ` Peter Maydell
0 siblings, 2 replies; 4+ messages in thread
From: Marc-André Lureau @ 2015-06-25 22:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Marc-André Lureau
It's nice to keep the config.log used to configure the build.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
---
configure | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/configure b/configure
index 1626c2e..dcd15a9 100755
--- a/configure
+++ b/configure
@@ -29,14 +29,7 @@ TMPL="${TMPDIR1}/${TMPB}.lo"
TMPA="${TMPDIR1}/lib${TMPB}.la"
TMPE="${TMPDIR1}/${TMPB}.exe"
-rm -f config.log
-
-# Print a helpful header at the top of config.log
-echo "# QEMU configure log $(date)" >> config.log
-printf "# Configured with:" >> config.log
-printf " '%s'" "$0" "$@" >> config.log
-echo >> config.log
-echo "#" >> config.log
+CONFIG_LOG="/dev/null"
error_exit() {
echo
@@ -54,8 +47,8 @@ do_compiler() {
# is compiler binary to execute.
local compiler="$1"
shift
- echo $compiler "$@" >> config.log
- $compiler "$@" >> config.log 2>&1 || return $?
+ echo $compiler "$@" >> "$CONFIG_LOG"
+ $compiler "$@" >> "$CONFIG_LOG" 2>&1 || return $?
# Test passed. If this is an --enable-werror build, rerun
# the test with -Werror and bail out if it fails. This
# makes warning-generating-errors in configure test code
@@ -69,8 +62,8 @@ do_compiler() {
return 0
;;
esac
- echo $compiler -Werror "$@" >> config.log
- $compiler -Werror "$@" >> config.log 2>&1 && return $?
+ echo $compiler -Werror "$@" >> "$CONFIG_LOG"
+ $compiler -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $?
error_exit "configure test passed without -Werror but failed with -Werror." \
"This is probably a bug in the configure script. The failing command" \
"will be at the bottom of config.log." \
@@ -117,8 +110,8 @@ do_libtool() {
local mode=$1
shift
# Run the compiler, capturing its output to the log.
- echo $libtool $mode --tag=CC $cc "$@" >> config.log
- $libtool $mode --tag=CC $cc "$@" >> config.log 2>&1 || return $?
+ echo $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG"
+ $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG" 2>&1 || return $?
# Test passed. If this is an --enable-werror build, rerun
# the test with -Werror and bail out if it fails. This
# makes warning-generating-errors in configure test code
@@ -132,8 +125,8 @@ do_libtool() {
return 0
;;
esac
- echo $libtool $mode --tag=CC $cc -Werror "$@" >> config.log
- $libtool $mode --tag=CC $cc -Werror "$@" >> config.log 2>&1 && return $?
+ echo $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG"
+ $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $?
error_exit "configure test passed without -Werror but failed with -Werror." \
"This is probably a bug in the configure script. The failing command" \
"will be at the bottom of config.log." \
@@ -1384,6 +1377,16 @@ EOF
exit 0
fi
+rm -f config.log
+
+# Print a helpful header at the top of config.log
+echo "# QEMU configure log $(date)" >> config.log
+printf "# Configured with:" >> config.log
+printf " '%s'" "$0" "$@" >> config.log
+echo >> config.log
+echo "#" >> config.log
+CONFIG_LOG="config.log"
+
# Now we have handled --enable-tcg-interpreter and know we're not just
# printing the help message, bail out if the host CPU isn't supported.
if test "$ARCH" = "unknown"; then
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help
2015-06-25 22:38 [Qemu-devel] [PATCH] build-sys: keep current config.log on --help Marc-André Lureau
@ 2015-06-26 13:18 ` Paolo Bonzini
2015-06-26 13:26 ` Peter Maydell
1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2015-06-26 13:18 UTC (permalink / raw)
To: Marc-André Lureau, qemu-devel
On 26/06/2015 00:38, Marc-André Lureau wrote:
> It's nice to keep the config.log used to configure the build.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
> ---
> configure | 35 +++++++++++++++++++----------------
> 1 file changed, 19 insertions(+), 16 deletions(-)
>
> diff --git a/configure b/configure
> index 1626c2e..dcd15a9 100755
> --- a/configure
> +++ b/configure
> @@ -29,14 +29,7 @@ TMPL="${TMPDIR1}/${TMPB}.lo"
> TMPA="${TMPDIR1}/lib${TMPB}.la"
> TMPE="${TMPDIR1}/${TMPB}.exe"
>
> -rm -f config.log
> -
> -# Print a helpful header at the top of config.log
> -echo "# QEMU configure log $(date)" >> config.log
> -printf "# Configured with:" >> config.log
> -printf " '%s'" "$0" "$@" >> config.log
> -echo >> config.log
> -echo "#" >> config.log
> +CONFIG_LOG="/dev/null"
>
> error_exit() {
> echo
> @@ -54,8 +47,8 @@ do_compiler() {
> # is compiler binary to execute.
> local compiler="$1"
> shift
> - echo $compiler "$@" >> config.log
> - $compiler "$@" >> config.log 2>&1 || return $?
> + echo $compiler "$@" >> "$CONFIG_LOG"
> + $compiler "$@" >> "$CONFIG_LOG" 2>&1 || return $?
> # Test passed. If this is an --enable-werror build, rerun
> # the test with -Werror and bail out if it fails. This
> # makes warning-generating-errors in configure test code
> @@ -69,8 +62,8 @@ do_compiler() {
> return 0
> ;;
> esac
> - echo $compiler -Werror "$@" >> config.log
> - $compiler -Werror "$@" >> config.log 2>&1 && return $?
> + echo $compiler -Werror "$@" >> "$CONFIG_LOG"
> + $compiler -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $?
> error_exit "configure test passed without -Werror but failed with -Werror." \
> "This is probably a bug in the configure script. The failing command" \
> "will be at the bottom of config.log." \
> @@ -117,8 +110,8 @@ do_libtool() {
> local mode=$1
> shift
> # Run the compiler, capturing its output to the log.
> - echo $libtool $mode --tag=CC $cc "$@" >> config.log
> - $libtool $mode --tag=CC $cc "$@" >> config.log 2>&1 || return $?
> + echo $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG"
> + $libtool $mode --tag=CC $cc "$@" >> "$CONFIG_LOG" 2>&1 || return $?
> # Test passed. If this is an --enable-werror build, rerun
> # the test with -Werror and bail out if it fails. This
> # makes warning-generating-errors in configure test code
> @@ -132,8 +125,8 @@ do_libtool() {
> return 0
> ;;
> esac
> - echo $libtool $mode --tag=CC $cc -Werror "$@" >> config.log
> - $libtool $mode --tag=CC $cc -Werror "$@" >> config.log 2>&1 && return $?
> + echo $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG"
> + $libtool $mode --tag=CC $cc -Werror "$@" >> "$CONFIG_LOG" 2>&1 && return $?
> error_exit "configure test passed without -Werror but failed with -Werror." \
> "This is probably a bug in the configure script. The failing command" \
> "will be at the bottom of config.log." \
> @@ -1384,6 +1377,16 @@ EOF
> exit 0
> fi
>
> +rm -f config.log
> +
> +# Print a helpful header at the top of config.log
> +echo "# QEMU configure log $(date)" >> config.log
> +printf "# Configured with:" >> config.log
> +printf " '%s'" "$0" "$@" >> config.log
> +echo >> config.log
> +echo "#" >> config.log
> +CONFIG_LOG="config.log"
> +
> # Now we have handled --enable-tcg-interpreter and know we're not just
> # printing the help message, bail out if the host CPU isn't supported.
> if test "$ARCH" = "unknown"; then
>
Applied, thanks!
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help
2015-06-25 22:38 [Qemu-devel] [PATCH] build-sys: keep current config.log on --help Marc-André Lureau
2015-06-26 13:18 ` Paolo Bonzini
@ 2015-06-26 13:26 ` Peter Maydell
2015-06-26 14:44 ` Marc-André Lureau
1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2015-06-26 13:26 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: Paolo Bonzini, QEMU Developers
On 25 June 2015 at 23:38, Marc-André Lureau <marcandre.lureau@gmail.com> wrote:
> It's nice to keep the config.log used to configure the build.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
> ---
> configure | 35 +++++++++++++++++++----------------
> 1 file changed, 19 insertions(+), 16 deletions(-)
>
> diff --git a/configure b/configure
> index 1626c2e..dcd15a9 100755
> --- a/configure
> +++ b/configure
> @@ -29,14 +29,7 @@ TMPL="${TMPDIR1}/${TMPB}.lo"
> TMPA="${TMPDIR1}/lib${TMPB}.la"
> TMPE="${TMPDIR1}/${TMPB}.exe"
>
> -rm -f config.log
> -
> -# Print a helpful header at the top of config.log
> -echo "# QEMU configure log $(date)" >> config.log
> -printf "# Configured with:" >> config.log
> -printf " '%s'" "$0" "$@" >> config.log
> -echo >> config.log
> -echo "#" >> config.log
> +CONFIG_LOG="/dev/null"
Doesn't this mean we're now going to just drop a bunch of the
logging on the floor in the case where the user didn't say --help?
That doesn't sound great...
If we want to do this I think we should identify the "--help"
case earlier, not just drop all the logging until we reach
the point in configure where we happen to identify it now.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] build-sys: keep current config.log on --help
2015-06-26 13:26 ` Peter Maydell
@ 2015-06-26 14:44 ` Marc-André Lureau
0 siblings, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2015-06-26 14:44 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]
Hi
On Fri, Jun 26, 2015 at 3:26 PM, Peter Maydell <peter.maydell@linaro.org>
wrote:
> Doesn't this mean we're now going to just drop a bunch of the
> logging on the floor in the case where the user didn't say --help?
> That doesn't sound great...
>
>
It drops a few arch checks before help:
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -c -o
config-temp/qemu-conf.o config-temp/qemu-conf.c
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -c -o
config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __i386__ not defined
#error __i386__ not defined
^
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -c -o
config-temp/qemu-conf.o config-temp/qemu-conf.c
cc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common -c -o
config-temp/qemu-conf.o config-temp/qemu-conf.c
config-temp/qemu-conf.c:2:2: error: #error __ILP32__ not defined
#error __ILP32__ not defined
Probably more on other systems.
If we want to do this I think we should identify the "--help"
> case earlier, not just drop all the logging until we reach
> the point in configure where we happen to identify it now.
>
Imho, that preliminary probing code doesn't have to be in config.log, but
I'll adapt the patch to fit your proposal nonetheless.
cheers
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 2723 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-26 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 22:38 [Qemu-devel] [PATCH] build-sys: keep current config.log on --help Marc-André Lureau
2015-06-26 13:18 ` Paolo Bonzini
2015-06-26 13:26 ` Peter Maydell
2015-06-26 14:44 ` Marc-André Lureau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).