From owner-svn-src-head@FreeBSD.ORG Tue Mar 13 18:59:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4154106566C; Tue, 13 Mar 2012 18:59:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 939A58FC1D; Tue, 13 Mar 2012 18:59:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2DIxJNG057962; Tue, 13 Mar 2012 18:59:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2DIxJwB057959; Tue, 13 Mar 2012 18:59:19 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203131859.q2DIxJwB057959@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 13 Mar 2012 18:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232932 - head/lib/csu/powerpc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 18:59:19 -0000 Author: nwhitehorn Date: Tue Mar 13 18:59:19 2012 New Revision: 232932 URL: http://svn.freebsd.org/changeset/base/232932 Log: Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini(). Reviewed by: kib Pointy hat to: kib Modified: head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Tue Mar 13 18:53:28 2012 (r232931) +++ head/lib/csu/powerpc64/Makefile Tue Mar 13 18:59:19 2012 (r232932) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS}