summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJuan Quintela2009-08-03 14:45:59 +0200
committerAnthony Liguori2009-08-10 20:05:33 +0200
commite86ecd4bd919f76a21c6276a26b9cfc1c82f47f5 (patch)
tree103578018bc61aac70bc11c4b9bddb9d2d8f0dce /configure
parentmove checks for bswap32/bswap_32 sooner than starting of printing variables (diff)
downloadqemu-e86ecd4bd919f76a21c6276a26b9cfc1c82f47f5.tar.gz
qemu-e86ecd4bd919f76a21c6276a26b9cfc1c82f47f5.tar.xz
qemu-e86ecd4bd919f76a21c6276a26b9cfc1c82f47f5.zip
move general CFLAGS/LDFLAGS definitions after last $cc run
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure63
1 files changed, 33 insertions, 30 deletions
diff --git a/configure b/configure
index 1cde620d54..643edd28f7 100755
--- a/configure
+++ b/configure
@@ -530,36 +530,6 @@ for opt do
esac
done
-# default flags for all hosts
-CFLAGS="$CFLAGS -g -fno-strict-aliasing"
-if test "$debug" = "no" ; then
- CFLAGS="$CFLAGS -O2"
-fi
-CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
-LDFLAGS="$LDFLAGS -g"
-
-# Consult white-list to determine whether to enable werror
-# by default. Only enable by default for git builds
-if test -z "$werror" ; then
- z_version=`cut -f3 -d. $source_path/VERSION`
- if test "$z_version" = "50" -a \
- "$linux" = "yes" ; then
- werror="yes"
- else
- werror="no"
- fi
-fi
-
-if test "$werror" = "yes" ; then
- CFLAGS="$CFLAGS -Werror"
-fi
-
-if test "$solaris" = "no" ; then
- if ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
- LDFLAGS="$LDFLAGS -Wl,--warn-common"
- fi
-fi
-
#
# If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right
# ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit)
@@ -1441,6 +1411,39 @@ else
exit 1
fi
+# End of CC checks
+# After here, no more $cc or $ld runs
+
+# default flags for all hosts
+CFLAGS="$CFLAGS -g -fno-strict-aliasing"
+if test "$debug" = "no" ; then
+ CFLAGS="$CFLAGS -O2"
+fi
+CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
+LDFLAGS="$LDFLAGS -g"
+
+# Consult white-list to determine whether to enable werror
+# by default. Only enable by default for git builds
+if test -z "$werror" ; then
+ z_version=`cut -f3 -d. $source_path/VERSION`
+ if test "$z_version" = "50" -a \
+ "$linux" = "yes" ; then
+ werror="yes"
+ else
+ werror="no"
+ fi
+fi
+
+if test "$werror" = "yes" ; then
+ CFLAGS="$CFLAGS -Werror"
+fi
+
+if test "$solaris" = "no" ; then
+ if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then
+ LDFLAGS="$LDFLAGS -Wl,--warn-common"
+ fi
+fi
+
if test "$mingw32" = "yes" ; then
if test -z "$prefix" ; then
prefix="c:/Program Files/Qemu"