From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2218 invoked by alias); 14 Jun 2012 15:21:33 -0000 Received: (qmail 2165 invoked by uid 22791); 14 Jun 2012 15:21:31 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 15:21:11 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1SfBrC-0007jS-QB from joseph_myers@mentor.com for libc-ports@sourceware.org; Thu, 14 Jun 2012 08:21:10 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Jun 2012 16:21:09 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1SfBrA-0007hB-4k for libc-ports@sourceware.org; Thu, 14 Jun 2012 15:21:08 +0000 Date: Thu, 14 Jun 2012 15:21:00 -0000 From: "Joseph S. Myers" To: libc-ports@sourceware.org Subject: Fix MIPS32 frame-pointer forcing for more recent GCC Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00038.txt.bz2 The alloca call in FORCE_FRAME_POINTER in sysdeps/unix/sysv/linux/mips/mips32/sysdep.h is optimized away by GCC 4.7, resulting in failures of nptl/tst-cancel4, tst-cancel5, tst-cancelx4, tst-cancelx5. I've applied this patch that fixes those failures by assigning the result of alloca to a volatile variable, so preventing it from being optimized away. diff --git a/ChangeLog.mips b/ChangeLog.mips index 853f286..9469b5c 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,9 @@ +2012-06-14 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (FORCE_FRAME_POINTER): Assign result of alloca to a volatile + variable. + 2012-06-01 Joseph Myers * sysdeps/mips/mips64/n32/s_fma.c: New file. diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index e51f329..8c024b0 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -194,8 +194,9 @@ /* We need to use a frame pointer for the functions in which we adjust $sp around the syscall, or debug information and unwind information will be $sp relative and thus wrong during the syscall. As - of GCC 3.4.3, this is sufficient. */ -#define FORCE_FRAME_POINTER alloca (4) + of GCC 4.7, this is sufficient. */ +#define FORCE_FRAME_POINTER \ + void *volatile __fp_force __attribute__ ((unused)) = alloca (4) #define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\ ({ \ -- Joseph S. Myers joseph@codesourcery.com