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 X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97C46C38A30 for ; Sun, 19 Apr 2020 19:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F2712075E for ; Sun, 19 Apr 2020 19:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587324793; bh=OcvHAdcshVpWjldVSoIDHMvhfszo/7RfH8P7WkEl5/0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=rNx0XX3OjfcAin/GVgiQOI1hl9enZefzZRaeLeIOydkCk0H7nplQ0pCFE0l/ifbbP CHpDFh0uT5J3FKTiHMRpfiW1q2uKY+C6Azt5XeAdrBxTOBAEmLP5x1bmlP+EQrhNgH WLKcNSWOra7AXwHZR8DbRO9C4RKjjcwKToh+D7w0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgDSTdM (ORCPT ); Sun, 19 Apr 2020 15:33:12 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:45120 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSTdL (ORCPT ); Sun, 19 Apr 2020 15:33:11 -0400 Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 03JJWuOP002819; Mon, 20 Apr 2020 04:32:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 03JJWuOP002819 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1587324777; bh=JC4v4U7ZXxpy8Dy/gfPJ3fIYiTG98CoBWO4VVpusmvk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=chliN8+Uk4AOG/eFaO7PX87HQ+eglZ1yoxy1abDOztoO9v5ZJSGyksrSXxBR7Is4S 2/HxHfryZYtRDSZ6vybPXQ4oURdxAyOP7lpmENgousxggC6kuMYQ2N64ovgKEsB5fP 2XypsSI+LmMtQP3CxzBF7qCS4PZfZ430W50MnGUuAVBV5OqX/N58Sah+agDddXRDpv DuM3hYq6L22850/7C2GQTlGPFcPKGIrIogtraQ/s8TWMlkTESQcUFm0RBwyDmv2U2C 2YzkZH4j/PpIi10Gg8dQFO+/BSgdiM03UHukpH1aS9v+e9cQv/HY0Vig96rHIlnmqn +o9unGBFLhklw== X-Nifty-SrcIP: [209.85.222.47] Received: by mail-ua1-f47.google.com with SMTP id s5so2819134uad.4; Sun, 19 Apr 2020 12:32:57 -0700 (PDT) X-Gm-Message-State: AGi0PuZZJGuzfbx54fhM6BqQT2caoL1cVd6rANNlQ8jvQ5/+BX1u5I3m Mru6K/wdxvxxaHt3/I6KGvel/fCF/RGRmq+4K2g= X-Google-Smtp-Source: APiQypL2PG/RoQPvgZjhWTCkYg4AWZyFB1b/JsQCb172Dsjfe7/j8L2OGNzQxE8R8/8Ko4P4+B5oEfzFfBTQ+u2p+90= X-Received: by 2002:ab0:cd:: with SMTP id 71mr4060816uaj.109.1587324775877; Sun, 19 Apr 2020 12:32:55 -0700 (PDT) MIME-Version: 1.0 References: <20200419180445.26722-1-natechancellor@gmail.com> <20200419180445.26722-2-natechancellor@gmail.com> <20200419181715.GA36234@ubuntu-s3-xlarge-x86> In-Reply-To: <20200419181715.GA36234@ubuntu-s3-xlarge-x86> From: Masahiro Yamada Date: Mon, 20 Apr 2020 04:32:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] MIPS: VDSO: Do not disable VDSO when linking with ld.lld To: Nathan Chancellor Cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, Linux Kernel Mailing List , clang-built-linux , Linux Kbuild mailing list , Nick Desaulniers , Sami Tolvanen , Dmitry Golovin , Sedat Dilek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 3:17 AM Nathan Chancellor wrote: > > On Sun, Apr 19, 2020 at 11:04:45AM -0700, Nathan Chancellor wrote: > > Currently, when linking with ld.lld, this warning pops up: > > > > arch/mips/vdso/Makefile:70: MIPS VDSO requires binutils >= 2.25 > > > > ld-ifversion calls ld-version, which calls scripts/ld-version.sh, which > > is specific to GNU ld. ld.lld has a completely different versioning > > scheme (as it follows LLVM's versioning) and it does not have the issue > > mentioned in the comment above this block so it should not be subjected > > to this check. > > > > With this patch, the VDSO successfully links and shows P_MIPS_PC32 in > > vgettimeofday.o. > > > > $ llvm-objdump -Dr arch/mips/vdso/vgettimeofday.o | grep R_MIPS_PC32 > > 00000024: R_MIPS_PC32 _start > > 000000b0: R_MIPS_PC32 _start > > 000002bc: R_MIPS_PC32 _start > > 0000036c: R_MIPS_PC32 _start > > 00000468: R_MIPS_PC32 _start > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/785 > > Link: https://github.com/llvm/llvm-project/commit/e364e2e9ce50c12eb2bf093560e1a1a8544d455a > > Reported-by: Dmitry Golovin > > Signed-off-by: Nathan Chancellor > > --- > > arch/mips/vdso/Makefile | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile > > index d7fe8408603e..f99e583d14a1 100644 > > --- a/arch/mips/vdso/Makefile > > +++ b/arch/mips/vdso/Makefile > > @@ -65,9 +65,11 @@ DISABLE_VDSO := n > > # the comments on that file. > > # > > ifndef CONFIG_CPU_MIPSR6 > > - ifeq ($(call ld-ifversion, -lt, 225000000, y),y) > > - $(warning MIPS VDSO requires binutils >= 2.25) > > - DISABLE_VDSO := y > > + ifndef CONFIG_LD_IS_LLD > > + ifeq ($(call ld-ifversion, -lt, 225000000, y),y) > > + $(warning MIPS VDSO requires binutils >= 2.25) > > + DISABLE_VDSO := y > > + endif > > endif > > endif > > > > -- > > 2.26.1 > > > > Hmmm, I still see this warning when first runing make ... I > assume because this Makefile gets parsed before Kconfig runs. I do not see the warning for 'make '. Could you tell me how to reproduce it? For cleaning, indeed, i see the warning. $ make ARCH=mips LLVM=1 clean arch/mips/vdso/Makefile:70: MIPS VDSO requires binutils >= 2.25 > > Perhaps it would be better to check if ld-version is 0 (since that means > we are not using GNU ld): > > ifneq ($(call ld-ifversion, -eq, 0, y),y) > > I am open to suggestions though. > > Cheers, > Nathan > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200419181715.GA36234%40ubuntu-s3-xlarge-x86. -- Best Regards Masahiro Yamada