From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2986 invoked by alias); 24 Jan 2014 13:17:37 -0000 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 Received: (qmail 2976 invoked by uid 89); 24 Jan 2014 13:17:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f172.google.com Received: from mail-ig0-f172.google.com (HELO mail-ig0-f172.google.com) (209.85.213.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 24 Jan 2014 13:17:36 +0000 Received: by mail-ig0-f172.google.com with SMTP id k19so2502080igc.5 for ; Fri, 24 Jan 2014 05:17:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=G9JvZHAE0sXhQTWGpfYEi9vMsFe/8brhLhlZAqdIWZc=; b=Wrp2n1ccsQNVFaGEHMiyrd/J0bMubNPSoKT1vzpuVd0bLlY0yi6apFm02X28ZZv78B zzeru/kiKN/FUTA7Fw7Tmu8+ZeP08/XhQyFmO2wQo3Ah0sy/7aGRVQSRN9kkh53a4Ull LnPRuDnwXkODrcc792pXRi4wKyud8SlAOyBs6b5442C9DeZdVdvldfGsMyMCzC/7Ms6c 5IwNQ90bUBB3OWIXp2UnEoXciLSnpBZdz0LJPdJ6rPYORG65LezArz/gJl6SzAZrnMML c0O1J/jsXl9+bk7qRXRL+L9HVZZO7WufggeYKBpHUpl7MGb+gp7UUfTdwyrZqnk5OBw0 j5DA== X-Gm-Message-State: ALoCoQmqXqKvc16Fx+1UOp0pe3cAiRu9KoU2ryi6y/sKIubwGgUn0K6VBb5LiCg/Y/qsJ6zls4cp MIME-Version: 1.0 X-Received: by 10.42.66.134 with SMTP id p6mr49042ici.85.1390569454054; Fri, 24 Jan 2014 05:17:34 -0800 (PST) Received: by 10.64.20.52 with HTTP; Fri, 24 Jan 2014 05:17:33 -0800 (PST) In-Reply-To: References: <1390477771-30826-1-git-send-email-will.newton@linaro.org> <52E151CE.20103@redhat.com> Date: Fri, 24 Jan 2014 13:17:00 -0000 Message-ID: Subject: Re: [PATCH] ARM: Fix clone build for ARMv4 From: Will Newton To: "Carlos O'Donell" Cc: "libc-ports@sourceware.org" , Patch Tracking , Mike Frysinger Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00056.txt.bz2 On 23 January 2014 18:22, Will Newton wrote: > On 23 January 2014 17:30, Carlos O'Donell wrote: >> On 01/23/2014 06:49 AM, Will Newton wrote: >>> ARMv4 does not have the blx instruction, so use the BLX macro which >>> handles abstracting this for us. >>> >>> ports/ChangeLog.arm: >>> >>> 2014-01-23 Will Newton >>> >>> [BZ #16499] >>> * sysdeps/unix/sysv/linux/arm/clone.S: Use BLX macro instead >>> of blx instruction directly. >>> --- >>> ports/sysdeps/unix/sysv/linux/arm/clone.S | 8 +------- >>> 1 file changed, 1 insertion(+), 7 deletions(-) >>> >>> diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S >>> index 44286a5..03fe9ab 100644 >>> --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S >>> +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S >>> @@ -88,14 +88,8 @@ PSEUDO_END (__clone) >>> #endif >>> @ pick the function arg and call address off the stack and execute >>> ldr r0, [sp, #4] >>> -#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__) >>> ldr ip, [sp], #8 >>> - mov lr, pc >>> - bx ip >>> -#else >>> - ldr lr, [sp], #8 >>> - blx lr >>> -#endif >>> + BLX (ip) >> >> Looks good. >> >>> >>> @ and we are done, passing the return value through r0 >>> b PLTJMP(HIDDEN_JUMPTARGET(_exit)) >>> >> >> Did you test this or ask the submitter to test it? >> >> If he says it works then OK to commit. > > I have tested this on armv7, I don't have an armv4 capable toolchain > at the moment to test it for that arch. I figured out the correct value of CFLAGS to get a build for armv4 (and armv4t) and the patch fixes the issue, so I have committed it. -- Will Newton Toolchain Working Group, Linaro