From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 8 02:10:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AAC03766 for ; Thu, 8 Aug 2013 02:10:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8791F2B88 for ; Thu, 8 Aug 2013 02:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r782A0n4037353 for ; Thu, 8 Aug 2013 02:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r782A0E0037351; Thu, 8 Aug 2013 02:10:00 GMT (envelope-from gnats) Resent-Date: Thu, 8 Aug 2013 02:10:00 GMT Resent-Message-Id: <201308080210.r782A0E0037351@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Justin Hibbits Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EA098675 for ; Thu, 8 Aug 2013 02:03:13 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C91C32B41 for ; Thu, 8 Aug 2013 02:03:13 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7823Dq3053961 for ; Thu, 8 Aug 2013 02:03:13 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7823DfQ053953; Thu, 8 Aug 2013 02:03:13 GMT (envelope-from nobody) Message-Id: <201308080203.r7823DfQ053953@oldred.freebsd.org> Date: Thu, 8 Aug 2013 02:03:13 GMT From: Justin Hibbits To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181126: boost-libs fails to build on ppc64 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2013 02:10:00 -0000 >Number: 181126 >Category: ports >Synopsis: boost-libs fails to build on ppc64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 08 02:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Justin Hibbits >Release: 10-CURRENT >Organization: >Environment: >Description: Bugs in the assembly code in boost cause it to fail to build. Attached patch fixes this. >How-To-Repeat: >Fix: Patch attached with submission follows: --- libs/context/src/asm/make_ppc64_sysv_elf_gas.S.old 2013-08-07 18:45:14.000000000 -0700 +++ libs/context/src/asm/make_ppc64_sysv_elf_gas.S 2013-08-07 18:50:41.000000000 -0700 @@ -92,26 +92,20 @@ .type .make_fcontext,@function .globl .make_fcontext .make_fcontext: - mflr %r0 # save return address into R0 - std %r0, 8(%r1) # save return address on stack, set up stack frame - stdu %r1, -96(%r1) # allocate stack space, SP % 16 == 0 - - std %r5, 64(%r1) # save 3. arg of make_fcontext, pointer to context function - std %r4, 56(%r1) # save 2. arg of make_fcontext, context stack size - std %r3, 48(%r1) # save 1. arg of make_fcontext, pointer to context stack (base) + mflr %r6 # save return address into R6 + mr %r0, %r3 subi %r3, %r3, 352 # reserve space for fcontext_t at top of context stack - bl align_stack@plt # call align_stack, R3 contains address at 16 byte boundary after return - # == pointer to fcontext_t and address of context stack - ld %r4, 48(%r1) # restore pointer to context stack (base) - ld %r5, 56(%r1) # restore context stack size - ld %r6, 64(%r1) # restore pointer to context function - std %r4, 184(%r3) # save address of context stack (base) in fcontext_t + # call align_stack, R3 contains address at 16 byte boundary after return + # == pointer to fcontext_t and address of context stack + clrrdi %r3, %r3, 4 + + std %r0, 184(%r3) # save address of context stack (base) in fcontext_t std %r5, 192(%r3) # save context stack size in fcontext_t std %r6, 176(%r3) # save address of context function in fcontext_t - subf %r0, %r3, 64 # 64 bytes on stack for parameter area (== 8 registers) + subi %r0, %r3, 64 # 64 bytes on stack for parameter area (== 8 registers) std %r0, 152(%r3) # save the stack base mflr %r0 # load LR @@ -123,9 +117,7 @@ std %r4, 168(%r3) # save address of finish as return address for context function # entered after context function returns - addi %r1, %r1, 64 # deallocate stack space - lwz %r0, 8(%r1) # load return address from stack, destroy stack frame - mtlr %r0 # restore return address + mtlr %r6 # restore return address blr @@ -136,5 +128,8 @@ stwu %r1, -32(%r1) # allocate stack space, SP % 16 == 0 li %r3, 0 # set return value to zero - bl _exit@plt # exit application + bl _exit # exit application + nop .size .make_fcontext, .-.make_fcontext + +.section .note.GNU-stack,"",%progbits >Release-Note: >Audit-Trail: >Unformatted: