Accepting request 143481 from home:a_faerber:branches:Virtualization
Update build OOM workaround patch to v3. OBS-URL: https://build.opensuse.org/request/show/143481 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=120
This commit is contained in:
parent
532065e741
commit
7845aa8183
@ -1,37 +1,70 @@
|
||||
From 877b2cbdae68c741bb63d45db17fdc243fc3450a Mon Sep 17 00:00:00 2001
|
||||
From 132be91691913225f5541b66463db6e084221a1b Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Tue, 27 Nov 2012 17:21:03 +0100
|
||||
Subject: [PATCH] build: compile translate.o with -fno-gcse option
|
||||
Date: Wed, 28 Nov 2012 09:40:23 +0100
|
||||
Subject: [PATCH] build: compile translate.o with -fno-gcse option on GCC
|
||||
4.6.x and 4.7.[012]
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some versions of GCC require insane (>2GB) amounts of memory to compile
|
||||
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 is a good thing to do because people will try to compile 1.3 with
|
||||
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: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
||||
---
|
||||
Makefile.target | 6 ++++++
|
||||
1 Datei geändert, 6 Zeilen hinzugefügt(+)
|
||||
Makefile.target | 3 +++
|
||||
configure | 16 ++++++++++++++++
|
||||
2 Dateien geändert, 19 Zeilen hinzugefügt(+)
|
||||
|
||||
diff --git a/Makefile.target b/Makefile.target
|
||||
index 206a232..d1c519f 100644
|
||||
index 206a232..dc7efe9 100644
|
||||
--- a/Makefile.target
|
||||
+++ b/Makefile.target
|
||||
@@ -149,6 +149,12 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
|
||||
@@ -149,6 +149,9 @@ GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
|
||||
|
||||
endif # CONFIG_SOFTMMU
|
||||
|
||||
+# Workaround for http://gcc.gnu.org/PR55489. 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.7.x. We
|
||||
+# should be able to delete this at the end of 2013.
|
||||
+%/translate.o: QEMU_CFLAGS += -fno-gcse
|
||||
+# Workaround for http://gcc.gnu.org/PR55489, see configure.
|
||||
+%/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS)
|
||||
+
|
||||
nested-vars += obj-y
|
||||
ifdef CONFIG_LINUX_USER
|
||||
nested-vars += obj-binfmt-y
|
||||
diff --git a/configure b/configure
|
||||
index 92c010f..401f369 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1185,6 +1185,21 @@ for flag in $gcc_flags; do
|
||||
fi
|
||||
done
|
||||
|
||||
+# Workaround for http://gcc.gnu.org/PR55489. 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; }
|
||||
+#else
|
||||
+#error No bug in this compiler.
|
||||
+#endif
|
||||
+EOF
|
||||
+if compile_prog "-Werror -fno-gcse" "" ; then
|
||||
+ TRANSLATE_OPT_CFLAGS=-fno-gcse
|
||||
+fi
|
||||
+
|
||||
if test "$static" = "yes" ; then
|
||||
if test "$pie" = "yes" ; then
|
||||
echo "static and pie are mutually incompatible"
|
||||
@@ -3664,6 +3679,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
|
||||
+echo "TRANSLATE_OPT_CFLAGS=$TRANSLATE_OPT_CFLAGS" >> $config_host_mak
|
||||
|
||||
# generate list of library paths for linker script
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 28 12:26:39 UTC 2012 - afaerber@suse.de
|
||||
|
||||
- Replace -fno-gcse patch with v3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 27 16:34:29 UTC 2012 - afaerber@suse.de
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user