On Thu, Sep 13, 2018 at 11:52 PM <xuyon...@gmail.com> wrote:I want build riscv-pk to generate bbl,I use the following commands:./configure --prefix=$RISCV --host=riscv64-unknow-linux-gnumakeAfter execute make command,I encountered the following 2 problems:/home/PKU/riscv/riscv-tools-installed/sysroot/usr/include/gnu/stubs.h:17:11: fatal error: gnu/stubs-lp64.h: No such file or directory# include <gnu/stubs-lp64.h>^~~~~~~~~~~~~~~~~~compilation terminated.
That happens when you use -mabi=lp64 with a linux toolchain that was
not configured with direct support for -mabi=lp64. You probably have
a non-multilibbed lp64d toolchain. You either need to configure a
toolchain with lp64 support, or build a multilib toolchain that
supports lp64 and the default lp64d.
It looks like you are using a compiler from riscv-tools. This is an
old obsolete broken toolchain which is not ABI compatible with the
current toolchain. I would recommend using riscv-gnu-toolchain
instead.
It looks like you didn't give all info necessary to reproduce the
problem, as I don't believe that riscv-pk uses -mabi=lp64. I think
that there was a recent change to the linux kernel to start using it
though, to avoid accidentally generating FP instructions in kernel
code.
Hi, Jim
If riscv-tools is not that good as expected, how about sifive pre-built version:
https://www.sifive.com/products/tools/ for "SiFive GNU Embedded Toolchain v20180629" and openOCD?
Thanks.
-----Original Message-----
From: Jim Wilson <ji...@sifive.com>
Sent: Saturday, September 15, 2018 4:47 AM
To: Michael Clark <michae...@mac.com>
Cc: xuyon...@gmail.com; RISC-V SW Dev <sw-...@groups.riscv.org>
Subject: Re: [sw-dev] The problems when building riscv-pk.
On Fri, Sep 14, 2018 at 10:14 AM Michael Clark <michae...@mac.com> wrote:
> We should fix riscv-tools. Many folk are using this repo. I guess we’ll have to see if anything else breaks with a tools bump.
I'm not willing to upgrade the compiler in riscv-tools, because I don't have time to fix any problems that might cause. Major compiler upgrades always cause problems. It is the people using the compiler that should chose when and where the compiler gets upgraded. Forcing compiler upgrades on people via riscv-tools is a mistake. I'd rather remove the compiler from riscv-tools. But I can't do that either, because there may be people depending on it, and hence removing the compiler may break other things. Basically, I'm screwed no matter what I do, so I do nothing.
> Interesting. Accidental FP instructions by mistake. Curious how Linux avoids this on x86... Oh okay. They are using the one ABI and suppress any extensions that generate float instructions. This would be equivalent to using -march=rv32imac or -march=rv64imac?
If you change the -march to exclude FP, then you also have to change the -mabi to exclude FP. So this is basically the same thing as what I mentioned. But yes, there is concern that the compiler register allocator might use an FP register if it runs out of integer registers. So the safe thing to do is to choose march/mabi that exclude FP registers. I'm not sure about the details though. I don't follow linux kernel development.
> The hardware folk still use riscv-tools, including Berkeley. It is indeed good to know. bbl wants to do avoid accidentally emitting float instructions by mistake because it does softfloat emulation.
I've been told that rocket-chip is being fixed to stop using riscv-tools, because this is causing problems.
I'm not interesting in helping to maintain riscv-tools. I already have more projects than I have time for. If someone else wants to maintain riscv-tools, and do the compiler upgrade, and deal with the problems that it will cause, then I'm fine with that.
Jim
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CAFyWVaYCdRmbsCO7THaUrGG%3DGD-AVExgkuB%2BweNW8QVwsyUidQ%40mail.gmail.com.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to sw-...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/sw-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/CY4PR12MB1221768C9BED44077E91DD6EAD180%40CY4PR12MB1221.namprd12.prod.outlook.com.
Or you can use crosstools-ng to
build a compiler, a patch for riscv64-linux support was just submitted
yesterday, but it already has embedded riscv support. Etc.