From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 8FC503858D33 for ; Tue, 7 Feb 2023 15:30:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FC503858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 82DF6106F; Tue, 7 Feb 2023 07:31:38 -0800 (PST) Received: from [10.2.78.76] (unknown [10.2.78.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B43F3F703; Tue, 7 Feb 2023 07:30:55 -0800 (PST) Message-ID: <14ae15a1-eff1-4771-78a9-6556ae62e29e@foss.arm.com> Date: Tue, 7 Feb 2023 15:30:54 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] libc: arm: fix setjmp abi non-conformance Content-Language: en-GB To: Victor Do Nascimento , Mike Frysinger Cc: newlib@sourceware.org, richard.earnshaw@arm.com References: <1b261916-e9f8-b90a-829a-c7b831aaa1cd@arm.com> From: Richard Earnshaw In-Reply-To: <1b261916-e9f8-b90a-829a-c7b831aaa1cd@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3490.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Newlib doesn't maintain branches (we just tag the repo and make a snapshot public based on that), so there's nowhere this can be backported to. Ultimately this is Jeff's (or Corinna's) call though. R. On 07/02/2023 15:24, Victor Do Nascimento wrote: > Dear Richard (now also CCing the mailing list), > > One of the folks over at the Gentoo bug discussion inquired about > getting the patch back-ported to the latest source snapshot (where the > problem originally presented itself), newlib-4.3.0.20230120. > > Is that an option at all? > > Cheers, > Victor > > On 2/3/23 13:09, Richard Earnshaw wrote: >> >> >> On 25/01/2023 13:30, Mike Frysinger wrote: >>> On 13 Dec 2022 14:51, Victor L. Do Nascimento wrote: >>>> As per the arm Procedure Call Standard for the Arm Architecture >>>> section 6.1.2 [1], VFP registers s16-s31 (d8-d15, q4-q7) must be >>>> preserved across subroutine calls. >>>> >>>> The current setjmp/longjmp implementations preserve only the core >>>> registers, with the jump buffer size too small to store the required >>>> co-processor registers. >>>> >>>> In accordance with the C Library ABI for the Arm Architecture >>>> section 6.11 [2], this patch sets _JBTYPE to long long adjusting >>>> _JBLEN to 20. >>>> >>>> It also emits vfp load/store instructions depending on architectural >>>> support, predicated at compile time on ACLE feature-test macros. >>> >>> this breaks building with GCC 11 and older: >>> https://bugs.gentoo.org/891589#c7 >>> >>> i don't think it was intentional that this only work with GCC 12+, or if >>> it was, that we want such requirements.  GCC 12 is less than a year old. >>> -mike >> >> This has been fixed with commit c6e601de84ea9f2be2b026c609cc3c1fe82a3103.