Commit cbdd1999 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Anthony Liguori

build: compile translate.o with -fno-gcse option on GCC 4.6.x and 4.7.[012]

These versions of GCC require insane (>2GB) amounts of memory to compile
translate.o.  As a countermeasure, disable the culprit optimization pass.
This should fix the buildbot failure for default_x86_64_fedora16.  Anyway
this is a good thing to do because people will try to compile 1.3 with
less than 2GB of memory and complain.
Signed-off-by: default avatarPaolo Bonzini <>
Signed-off-by: default avatarAnthony Liguori <>
parent 02c6ccc6
......@@ -143,6 +143,9 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
# Workaround for, see configure.
nested-vars += obj-y
# This resolves all nested paths, so it must come last
......@@ -1183,6 +1183,21 @@ for flag in $gcc_flags; do
# Workaround for Happens with -fPIE/-fPIC and
# large functions that use global variables. The bug is in all releases of
# GCC, but it became particularly acute in 4.6.x and 4.7.x. It is fixed in
# 4.7.3 and 4.8.0. We should be able to delete this at the end of 2013.
cat > $TMPC << EOF
#if __GNUC__ == 4 && (__GNUC_MINOR__ == 6 || (__GNUC_MINOR__ == 7 && __GNUC_PATCHLEVEL__ <= 2))
int main(void) { return 0; }
#error No bug in this compiler.
if compile_prog "-Werror -fno-gcse" "" ; then
if test "$static" = "yes" ; then
if test "$pie" = "yes" ; then
echo "static and pie are mutually incompatible"
......@@ -3662,6 +3677,7 @@ echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
echo "EXESUF=$EXESUF" >> $config_host_mak
echo "LIBS_QGA+=$libs_qga" >> $config_host_mak
echo "POD2MAN=$POD2MAN" >> $config_host_mak
# generate list of library paths for linker script
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment