Revision 328a4240
b/configure | ||
---|---|---|
22 | 22 |
static="no" |
23 | 23 |
cross_prefix="" |
24 | 24 |
cc="gcc" |
25 |
gcc3_search="yes" |
|
26 |
gcc3_list="gcc-3.4 gcc34 gcc-3.3 gcc33 gcc-3.2 gcc32" |
|
25 | 27 |
host_cc="gcc" |
26 | 28 |
ar="ar" |
27 | 29 |
make="make" |
... | ... | |
178 | 180 |
--cross-prefix=*) cross_prefix="$optarg" |
179 | 181 |
;; |
180 | 182 |
--cc=*) cc="$optarg" |
183 |
gcc3_search="no" |
|
181 | 184 |
;; |
182 | 185 |
--host-cc=*) host_cc="$optarg" |
183 | 186 |
;; |
... | ... | |
314 | 317 |
fi |
315 | 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 | 360 |
# Solaris specific configure tool chain decisions |
319 | 361 |
# |
... | ... | |
416 | 458 |
have_gcc3_options="yes" |
417 | 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 | 462 |
# SDL probe |
438 | 463 |
|
Also available in: Unified diff