From e8cd23de30a6c818a3fb1360c2b94549c25ef8fc Mon Sep 17 00:00:00 2001 From: bellard Date: Wed, 25 Jun 2003 16:08:13 +0000 Subject: fixed compilation for gcc 2.96 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@271 c046a42c-6fe2-441c-8c8c-71466251a162 --- configure | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'configure') diff --git a/configure b/configure index b09487de93..e56c603d04 100755 --- a/configure +++ b/configure @@ -153,20 +153,15 @@ fi fi -# check gcc version +# check gcc options support cat > $TMPC < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) -return 0; -#else -#error gcc < 3.2 -#endif } EOF -gcc_major="2" -if $cc -o $TMPO $TMPC 2> /dev/null ; then - gcc_major="3" +have_gcc3_options="no" +if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then + have_gcc3_options="yes" fi if test "$target_bigendian" = "default" ; then @@ -224,7 +219,9 @@ echo "prefix=$prefix" >> config.mak echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix\"" >> $TMPH echo "MAKE=$make" >> config.mak echo "CC=$cc" >> config.mak -echo "GCC_MAJOR=$gcc_major" >> config.mak +if test "$have_gcc3_options" = "yes" ; then + echo "HAVE_GCC3_OPTIONS=yes" >> config.mak +fi echo "HOST_CC=$host_cc" >> config.mak echo "AR=$ar" >> config.mak echo "STRIP=$strip -s -R .comment -R .note" >> config.mak -- cgit v1.2.3