aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-09-16 22:03:08 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-09-23 11:51:05 -0500
commit87751797c707092108700159b570e917bae346b9 (patch)
tree70b65a713f038ac2d7570f4642759f7aa4e7c87e /configure
parentf8b72754c21789293eb655641459ab43ebd69c66 (diff)
Fix and clean code which tests the gcc version
The code which tests whether gcc supports warn_unused_result was wrong. Remove the wrong test from configure and replace it by code using macro QEMU_GNUC_PREREQ in compiler.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 0 insertions, 20 deletions
diff --git a/configure b/configure
index 8507846483..24b8df4385 100755
--- a/configure
+++ b/configure
@@ -2359,23 +2359,6 @@ if compile_prog "" "" ; then
need_offsetof=no
fi
-##########################################
-# check if the compiler understands attribute warn_unused_result
-#
-# This could be smarter, but gcc -Werror does not error out even when warning
-# about attribute warn_unused_result
-
-gcc_attribute_warn_unused_result=no
-cat > $TMPC << EOF
-#if defined(__GNUC__) && (__GNUC__ < 4) && defined(__GNUC_MINOR__) && (__GNUC__ < 4)
-#error gcc 3.3 or older
-#endif
-int main(void) { return 0;}
-EOF
-if compile_prog "" ""; then
- gcc_attribute_warn_unused_result=yes
-fi
-
# spice probe
if test "$spice" != "no" ; then
cat > $TMPC << EOF
@@ -2998,9 +2981,6 @@ fi
if test "$need_offsetof" = "yes" ; then
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
fi
-if test "$gcc_attribute_warn_unused_result" = "yes" ; then
- echo "CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT=y" >> $config_host_mak
-fi
if test "$fdatasync" = "yes" ; then
echo "CONFIG_FDATASYNC=y" >> $config_host_mak
fi