Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbdHKKRF (ORCPT ); Fri, 11 Aug 2017 06:17:05 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:34553 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbdHKKRD (ORCPT ); Fri, 11 Aug 2017 06:17:03 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170811092213.mdmzqtm2lp6ltlxt@armageddon.cambridge.arm.com> From: Ard Biesheuvel Date: Fri, 11 Aug 2017 11:17:02 +0100 Message-ID: Subject: Re: New assembler warnings with binutils 2.29 To: Arnd Bergmann Cc: Catalin Marinas , Laura Abbott , Will Deacon , Linux Kernel Mailing List , linux-arm-kernel , Michael Collison Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 46 On 11 August 2017 at 10:34, Arnd Bergmann wrote: > On Fri, Aug 11, 2017 at 11:26 AM, Ard Biesheuvel > wrote: >> On 11 August 2017 at 10:22, Catalin Marinas wrote: >>> On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote: >>>> Fedora rawhide recently upgraded to binutils 2.29 and this seems >>>> to produce new warnings: >>>> >>>> ./arch/arm64/include/asm/assembler.h: Assembler messages: >>>> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr' >>>> >>>> This is >>>> >>>> /* >>>> * Register aliases. >>>> */ >>>> lr .req x30 // link register >>> >>> Strange, does gas now think 'lr' is a general purpose register (aliased >>> to x30)? It never was and IIRC the toolchain people many years ago >>> refused to add it, hence the alias above in the kernel. I wonder if they >>> added 'fp' as well... >>> >>> We could remove the alias and replace all 'lr' instances with 'x30' >>> throughout the kernel (no too many) or we add some #ifdef around the >>> above based on the binutils version. >>> >> >> This is annoying. Replacing x30 with lr achieves the opposite of the Of course, I meant replacing lr with x30 in our code. >> intent of the binutils change. And using #ifdefs is inaccurate, >> because you can't really test the binutils version only the GCC >> version, and those are not tightly coupled. >> >> Can you .unreq it? > > adding the author of the change to cc > > https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=62e20ed45e3da5f3ba695e4ee109317668180fe6 > > There probably was some reasoning behind the change and an > intended method for using it. > > Arnd