diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-25 16:08:13 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-06-25 16:08:13 +0000 |
commit | e8cd23de30a6c818a3fb1360c2b94549c25ef8fc (patch) | |
tree | a4a905c2ec3ceaa9ea4fe3320d9160cd0d2ae84b /configure | |
parent | 7c2d6a781cb806fdb99837015c773398f582caf1 (diff) |
fixed compilation for gcc 2.96
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@271 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -153,20 +153,15 @@ fi fi -# check gcc version +# check gcc options support cat > $TMPC <<EOF int main(void) { -#if __GNUC__ > 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 |