linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rong Chen <rong.a.chen@intel.com>
To: Nathan Chancellor <nathan@kernel.org>, kernel test robot <lkp@intel.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [kbuild-all] Re: [PATCH] riscv: Use $(LD) instead of $(CC) to link vDSO
Date: Mon, 29 Mar 2021 15:41:32 +0800	[thread overview]
Message-ID: <39afa2f7-c925-c1dd-669a-6c019b11cbdf@intel.com> (raw)
In-Reply-To: <20210326235839.zgfvmtfxrb3hy6i4@archlinux-ax161>

Hi Nathan,

On 3/27/21 7:58 AM, Nathan Chancellor wrote:
> 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.

Sorry for the inconvenience, we'll fix both asap.

Best Regards,
Rong Chen

>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> 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
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org


  parent reply	other threads:[~2021-03-29  7:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 21:51 [PATCH] riscv: Use $(LD) instead of $(CC) to link vDSO Nathan Chancellor
2021-03-26 16:05 ` kernel test robot
2021-03-26 23:58   ` Nathan Chancellor
2021-03-27  1:56     ` Fangrui Song
2021-03-29  7:41     ` Rong Chen [this message]
2021-03-27  2:02 ` Fangrui Song
2021-04-11 21:20 ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39afa2f7-c925-c1dd-669a-6c019b11cbdf@intel.com \
    --to=rong.a.chen@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=nathan@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).