Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 160627 | Differences between
and this patch

Collapse All | Expand All

(-)configure (-17 / +42 lines)
Lines 22-27 Link Here
22
static="no"
22
static="no"
23
cross_prefix=""
23
cross_prefix=""
24
cc="gcc"
24
cc="gcc"
25
gcc3_search="yes"
26
gcc3_list="gcc-3.4 gcc34 gcc-3.3 gcc33 gcc-3.2 gcc32"
25
host_cc="gcc"
27
host_cc="gcc"
26
ar="ar"
28
ar="ar"
27
make="make"
29
make="make"
Lines 178-183 Link Here
178
  --cross-prefix=*) cross_prefix="$optarg"
180
  --cross-prefix=*) cross_prefix="$optarg"
179
  ;;
181
  ;;
180
  --cc=*) cc="$optarg"
182
  --cc=*) cc="$optarg"
183
  gcc3_search="no"
181
  ;;
184
  ;;
182
  --host-cc=*) host_cc="$optarg"
185
  --host-cc=*) host_cc="$optarg"
183
  ;;
186
  ;;
Lines 314-319 Link Here
314
    fi
317
    fi
315
fi
318
fi
316
319
320
# Check for gcc4, error if pre-gcc4 
321
if test "$check_gcc" = "yes" ; then
322
    cat > $TMPC <<EOF
323
#if __GNUC__ < 4
324
#error gcc3
325
#endif
326
int main(){return 0;}
327
EOF
328
    check_cc() {
329
	which "$1" >&/dev/null
330
	return $?
331
    }
332
333
    if "$cc" -o $TMPE $TMPC 2>/dev/null ; then
334
	echo "WARNING: \"$cc\" looks like gcc 4.x"
335
	found_compat_cc="no"
336
	if test "$gcc3_search" = "yes" ; then
337
	    echo "Looking for gcc 3.x"
338
	    for compat_cc in $gcc3_list ; do
339
		if check_cc "$compat_cc" ; then
340
		    echo "Found \"$compat_cc\""
341
		    cc="$compat_cc"
342
		    found_compat_cc="yes"
343
		    break
344
		fi
345
	    done
346
	    if test "$found_compat_cc" = "no" ; then
347
		echo "gcc 3.x not found!"
348
	    fi
349
	fi
350
	if test "$found_compat_cc" = "no" ; then
351
	    echo "QEMU is known to have problems when compiled with gcc 4.x"
352
	    echo "It is recommended that you use gcc 3.x to build QEMU"
353
	    echo "To use this compiler anyway, configure with --disable-gcc-check"
354
	    exit 1;
355
	fi
356
    fi
357
fi
358
317
#
359
#
318
# Solaris specific configure tool chain decisions
360
# Solaris specific configure tool chain decisions
319
#
361
#
Lines 416-438 Link Here
416
   have_gcc3_options="yes"
458
   have_gcc3_options="yes"
417
fi
459
fi
418
460
419
# Check for gcc4, error if pre-gcc4 
420
if test "$check_gcc" = "yes" ; then
421
    cat > $TMPC <<EOF
422
#if __GNUC__ < 4
423
#error gcc3
424
#endif
425
int main(){return 0;}
426
EOF
427
    if $cc -o $TMPO $TMPC 2>/dev/null ; then
428
        echo "ERROR: \"$cc\" looks like gcc 4.x"
429
        echo "QEMU is known to have problems when compiled with gcc 4.x"
430
        echo "It is recommended that you use gcc 3.x to build QEMU"
431
        echo "To use this compiler anyway, configure with --disable-gcc-check"
432
        exit 1;
433
    fi
434
fi
435
436
##########################################
461
##########################################
437
# SDL probe
462
# SDL probe
438
463

Return to bug 160627