Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1840975pxf; Fri, 26 Mar 2021 17:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBRIMw1rLGYDadyboPd/jczsw7u2PwpE2T6nSAobGB8QslT1FGYqbgHW4LG93EfEIgmSY6 X-Received: by 2002:a17:906:3b99:: with SMTP id u25mr17974324ejf.277.1616803218462; Fri, 26 Mar 2021 17:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616803218; cv=none; d=google.com; s=arc-20160816; b=FEQlBKUWQLYk73XVvsTtY65H5REHiqDNi5W67dJm+DiJF7b6p9B1Qiq6ugYfIFWBIx MWh0pyfET68mFPEnwI5ubfF77yLT2wA4pU8UeEIaD2FXHgE02qQhbOGVVk8UmIiwv5MP OG/vr27KeKajhYv+d/FAj13mCeqTcOb/HE0nDbnXtcYshIFcCCS3TL7BjtGcvw0O2Bgy AI0qhPblaF0NU2GXwDrWH/R0ldA1Xlu3lwtbwNE+5/yDUJHn9OX00u5HLFJG24YTDsBv pPOp0b3Qsp5fJQ3zs2NyIHr8xxKZvABsZwlLpiUUGsfmaARQT3tgaAspYN+zHDR+zfbA HIHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pmupqfzagp27SYGvfrejkkRlYHATrPNl9G/8s/QA+RE=; b=jup9909ETx1Ty5/2GHC/32RgZNzOMP9o+UxJ/nN/118Zlde6/+WeiWiehYhXPFiA0L /138KO3zPcek8+ReUC/Sw+s1nPvcMLXOp2i6WAM12wcRf0BoCkDOCEhr0g/SgSF2jq33 nUhf1YHGfAFOXpQzvyp6NFZ4b/IkwAMHfAOauQEA/eU6Nd9pFnfnLPl/oFzmR02Typ9J KLy7sbSHiwD8diQ7rkqBH64vdFnco0aDKWitX301xNTCUr2ALa4EewDxxqmf8YlXI7Ts 6coz0RFMjznH2yIdviwUrvNJfrQUWWIE5pIsxjt9wp/8PmSuVB2pblM+emQdOJOuTzXl meRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c909TIJ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj20si7474022edb.500.2021.03.26.16.59.55; Fri, 26 Mar 2021 17:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c909TIJ9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbhCZX65 (ORCPT + 99 others); Fri, 26 Mar 2021 19:58:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:53184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230027AbhCZX6o (ORCPT ); Fri, 26 Mar 2021 19:58:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C58BC619E4; Fri, 26 Mar 2021 23:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616803124; bh=a3dDdnXrrs57TfBaTl7alXhup2BDKH4a64f3EAdGZ+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c909TIJ9AdLcTMo/bkPIQREacj+dvK3KSQI6QXYhjlSl5QWnBCWVqptHiAhH6J2tU VvgRzqOAdyRO6Pl6IxAl9TvzFYXdDGYQOvVjJtPeYiFIU2GwXhBWDlTfhlt6/4MWg7 I44G03OXSDu8zRn7XTIgdo5qR6WLO3Ya+ceqtxOC0XdPmDmbeADv8qmBKim3GEe5D+ /KpSsdmIIoZuQeHA9/bYvLtNVigAT86kNiFyyZE0bSFmKwDq8fSDGYZiaa6VnTPIC+ qAdoSouUBBt4QQcAKlH0anFFzuehabZ3g4b+nXNekEnfe9t2G19ciwwQjJ3RMrSb3u fDzOj0pil/xYQ== Date: Fri, 26 Mar 2021 16:58:39 -0700 From: Nathan Chancellor To: kernel test robot Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: Use $(LD) instead of $(CC) to link vDSO Message-ID: <20210326235839.zgfvmtfxrb3hy6i4@archlinux-ax161> References: <20210325215156.1986901-1-nathan@kernel.org> <202103262325.9ejJuOqf-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202103262325.9ejJuOqf-lkp@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 27, 2021 at 12:05:34AM +0800, kernel test robot wrote: > Hi Nathan, > > I love your patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v5.12-rc4 next-20210326] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch] > > url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/riscv-Use-LD-instead-of-CC-to-link-vDSO/20210326-055421 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 002322402dafd846c424ffa9240a937f49b48c42 > config: riscv-randconfig-r032-20210326 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f490a5969bd52c8a48586f134ff8f02ccbb295b3) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://github.com/0day-ci/linux/commit/dfdcaf93f40f0d15ffc3f25128442c1688e612d6 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Nathan-Chancellor/riscv-Use-LD-instead-of-CC-to-link-vDSO/20210326-055421 > git checkout dfdcaf93f40f0d15ffc3f25128442c1688e612d6 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv For the record, I tried to use this script to reproduce but it has a couple of bugs: 1. It does not download the right version of clang. This report says that it is clang-13 but the one that the script downloaded is clang-12. 2. It does not download it to the right location. The script expects ~/0day/clang-latest but it is downloaded to ~/0day/clang it seems. I symlinked it to get around it. > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > > >> riscv64-linux-gnu-objcopy: 'arch/riscv/kernel/vdso/vdso.so.dbg': No such file This error only occurs because of errors before it that are not shown due to a denylist: ld.lld: error: arch/riscv/kernel/vdso/rt_sigreturn.o:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax ld.lld: error: arch/riscv/kernel/vdso/getcpu.o:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax ld.lld: error: arch/riscv/kernel/vdso/flush_icache.o:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax My patch only adds another occurrence of this error because we move from $(CC)'s default linker (in clang's case, ld.bfd) to $(LD), which in the case of 0day appears to be ld.lld. ld.lld should not be used with RISC-V in its current form due to errors of this nature, which happen without my patch as well: https://github.com/ClangBuiltLinux/linux/issues/1020 Linker relaxation in ld.lld for RISC-V is an ongoing debate/process. Please give RISC-V the current treatment as s390 with ld.lld for the time being to get meaningful reports. We will reach out once that issue has been resolved. TL;DR: Patch exposes existing issue with LD=ld.lld that would have happened without it in different areas, the report can be ignored. Cheers! Nathan