[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/39] include failed source file in config.log
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 06/39] include failed source file in config.log |
Date: |
Tue, 12 Oct 2010 15:00:24 +0200 |
Also clean config.log from distclean.
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 2 +-
configure | 21 +++++++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index d9971c3..34c2a6c 100644
--- a/Makefile
+++ b/Makefile
@@ -160,7 +160,7 @@ clean:
done
distclean: clean
- rm -f config-host.mak config-host.h* config-host.ld $(DOCS)
qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
+ rm -f config-host.mak config-host.h* config-host.ld $(DOCS)
qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi config.log
rm -f qemu-options.def
rm -f config-all-devices.mak
rm -f roms/seabios/config.mak roms/vgabios/config.mak
diff --git a/configure b/configure
index 8cd034a..a8738db 100755
--- a/configure
+++ b/configure
@@ -20,16 +20,26 @@ TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.exe"
trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
rm -f config.log
+run_cc() {
+ echo "$cc $@" >&5
+ if $cc "$@" >&5 2>&5; then
+ return 0
+ else
+ echo exit status is $? >&5
+ echo failed program was: >&5
+ sed 's/^/| /' $TMPC >&5
+ return 1
+ fi
+}
+
compile_object() {
- echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log
- $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1
+ run_cc $QEMU_CFLAGS -c -o $TMPO $TMPC
}
compile_prog() {
local_cflags="$1"
local_ldflags="$2"
- echo $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
>> config.log
- $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >>
config.log 2>&1
+ run_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
}
# check whether a command is available to this shell (may be either an
@@ -906,6 +916,9 @@ echo "NOTE: The object files are built at the place where
configure is launched"
exit 1
fi
+# create config.log file
+exec 5>config.log
+
# check that the C compiler works.
cat > $TMPC <<EOF
int main(void) {}
--
1.7.2.3
- [Qemu-devel] [PATCH 00/39] Make configure command line autoconf-compatible, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 02/39] default make and install to environment variables, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 01/39] default compilation tools to environment variables, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 03/39] move feature variables to the top, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 04/39] fix sparse support (?), Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 06/39] include failed source file in config.log,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 05/39] test cc with the complete set of chosen flags, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 09/39] fix spelling of $pkg_config, move default together with other cross tools, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 07/39] do not pass bogus $(SRC_PATH) include paths to cc during configure, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 10/39] do not default to non-prefixed pkg-config when cross compiling, Paolo Bonzini, 2010/10/12
- [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test, Paolo Bonzini, 2010/10/12