From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LpBYU-0002w7-Et for qemu-devel@nongnu.org; Wed, 01 Apr 2009 21:17:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LpBYS-0002rg-CO for qemu-devel@nongnu.org; Wed, 01 Apr 2009 21:17:17 -0400 Received: from [199.232.76.173] (port=45158 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LpBYS-0002rO-4F for qemu-devel@nongnu.org; Wed, 01 Apr 2009 21:17:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:53873 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LpBYR-000421-UJ for qemu-devel@nongnu.org; Wed, 01 Apr 2009 21:17:15 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LpBXt-0001bT-2K for qemu-devel@nongnu.org; Thu, 02 Apr 2009 01:16:41 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LpBXs-0001bP-FG for qemu-devel@nongnu.org; Thu, 02 Apr 2009 01:16:40 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Thu, 02 Apr 2009 01:16:40 +0000 Subject: [Qemu-devel] [6967] Temporary workaround for ppc on ppc Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6967 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6967 Author: malc Date: 2009-04-02 01:16:39 +0000 (Thu, 02 Apr 2009) Log Message: ----------- Temporary workaround for ppc on ppc target-ppc/translate.c puts values of type opcode_t into .opcodes section, using GCC extension to do so, and hoping that this will make them appear contiguously and in the source order in the resulting executable. This assumption is not safe and is known to be violated with certain versions of GCC, certain flags passed to it and on certain platforms (gcc 4.3.0, -O and PPC/PPC64 for instance) The workaround consists of adding -fno-unit-at-a-time to the list of GCC command line options while building PPC translate.o on a PPC. Modified Paths: -------------- trunk/Makefile.target Modified: trunk/Makefile.target =================================================================== --- trunk/Makefile.target 2009-04-01 23:10:46 UTC (rev 6966) +++ trunk/Makefile.target 2009-04-02 01:16:39 UTC (rev 6967) @@ -84,6 +84,10 @@ HELPER_CFLAGS+=-fomit-frame-pointer endif +ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc) +translate.o: CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-unit-at-a-time,) +endif + ifeq ($(ARCH),sparc) CFLAGS+=-ffixed-g2 -ffixed-g3 ifneq ($(CONFIG_SOLARIS),yes)