From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CA28C54EE9 for ; Thu, 8 Sep 2022 17:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbiIHRSe (ORCPT ); Thu, 8 Sep 2022 13:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbiIHRS3 (ORCPT ); Thu, 8 Sep 2022 13:18:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AD9BCCD6F for ; Thu, 8 Sep 2022 10:18:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A9B6D61DBB for ; Thu, 8 Sep 2022 17:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96103C433C1; Thu, 8 Sep 2022 17:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662657508; bh=BKMcAQ3vYiv+Ylfeo5rUhNpJPYy2W6lJL3dQjdOBQtM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p15oEeIpato/8FuclAgFIU8NnBmaj9g7/2fL318qIGl7W9JRzRLW5hgKL8KXmNW61 myVk1IvIDYKaht3RqxAh2hGpmOUG7E3dOG7GPrIi524J/1YEoaUbpYjjBD4H9cIBXf 7gohqijJ10318MqLYAV/986QoSw/GIxnT8aYLM+9MGLga7Ll5Ajd/uQWnA8mKnLXnh FSn+Ea5GOQzWra/K3AZfYaGo4bSlRWnWknwMsQ99Dx7caJssLjsSWg+b2PicmB8IVl eRD6C+xohQRj1KWvecXz0OYIqSjNc6O2vCLPE/LduOyfOuE06//gT/FHovnjRb8cbb /l3Wq6GJO57cg== Date: Thu, 8 Sep 2022 10:18:25 -0700 From: Nathan Chancellor To: Palmer Dabbelt Cc: Paul Walmsley , Albert Ou , linux-riscv@lists.infradead.org, Khem Raj , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Fangrui Song Subject: Re: [PATCH] riscv: Pass -mno-relax only on lld < 15.0.0 Message-ID: References: <20220710071117.446112-1-maskray@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220710071117.446112-1-maskray@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It does not look like this ever got picked up? Would it be possible to pick it up for 6.1? The original patch is at: https://lore.kernel.org/20220710071117.446112-1-maskray@google.com/ Cheers, Nathan On Sun, Jul 10, 2022 at 12:11:17AM -0700, Fangrui Song wrote: > lld since > https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985 > (milestone: 15.0.0) has implemented some RISC-V linker relaxation. > -mno-relax is no longer needed in KBUILD_CFLAGS/KBUILD_AFLAGS to > suppress R_RISCV_ALIGN which older lld can not handle: > > ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax > > Signed-off-by: Fangrui Song > --- > arch/riscv/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile > index 34cf8a598617..7e4ceb2a0981 100644 > --- a/arch/riscv/Makefile > +++ b/arch/riscv/Makefile > @@ -37,6 +37,7 @@ else > endif > > ifeq ($(CONFIG_LD_IS_LLD),y) > +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0) > KBUILD_CFLAGS += -mno-relax > KBUILD_AFLAGS += -mno-relax > ifndef CONFIG_AS_IS_LLVM > @@ -44,6 +45,7 @@ ifndef CONFIG_AS_IS_LLVM > KBUILD_AFLAGS += -Wa,-mno-relax > endif > endif > +endif > > # ISA string setting > riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima > -- > 2.37.0.144.g8ac04bfd2-goog > >