Minor issue with the wiki instructions for building a RISC-V target and compiler

Dennis Clarke dclarke at blastwave.org
Fri Feb 22 04:40:55 UTC 2019


On 2/21/19 11:25 PM, Dennis Clarke wrote:
> 
> 
> After extensive circles and more confusion and some irc chats I went
> back to https://wiki.freebsd.org/riscv to follow the instructions
> there to the letter.
> 
> First snag is :
> 
> 
> vesta# mv
> ${PREFIX}/lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed ${PR
> EFIX}/lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed.rm
> mv: rename
> /root/riscv/lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed t
> o
> /root/riscv/lib/gcc/riscv64-unknown-freebsd11.2/8.1.0/include-fixed.rm:
> No suc
> h file or directory
> vesta#
> 
> 
> There is no such thing with the gcc 8.2.0 and FreeBSD 12.0 so I can
> guess that we just skip that step.
> 
> I will keep on the path laid on on the wiki with the intention to get
> a bootable QEMU type image *with* a basic gnu toolchain and compiler.
> 
> Been at this for a week now and really need to just start over from
> scratch as nothing I have done allows gcc 8.2.0 to be built for the
> target RISC-V rv64imafdc system in sysroot.
> 
> More to follow.
> 

Eventually "make TARGET_ARCH=riscv64 buildworld" fails also :

.
.
.
/root/riscv/bin/riscv64-unknown-freebsd12.0-gcc
--sysroot=/home/root/obj//root/freebsd-riscv/riscv.riscv64/tmp
-B/root/riscv/riscv64-unknown-freebsd12.0/bin/  -O2 -pipe
-I/root/freebsd-riscv/lib/msun/ld128
-I/root/freebsd-riscv/lib/msun/riscv -I/root/freebsd-riscv/lib/msun/src
-I/root/freebsd-riscv/lib/libc/include
-I/root/freebsd-riscv/lib/libc/riscv64 -march=rv64imafdc -mabi=lp64d
-g -MD  -MF.depend.s_clog.o -MTs_clog.o -std=gnu99
-fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign
-Wno-error=address -Wno-error=array-bounds -Wno-error=attributes
-Wno-error=bool-compare -Wno-error=cast-align -Wno-error=clobbered
-Wno-error=enum-compare -Wno-error=extra -Wno-error=inline
-Wno-error=logical-not-parentheses -Wno-error=strict-aliasing
-Wno-error=uninitialized -Wno-error=unused-but-set-variable
-Wno-error=unused-function -Wno-error=unused-value
-Wno-error=misleading-indentation -Wno-error=nonnull-compare
-Wno-error=shift-negative-value -Wno-error=tautological-compare
-Wno-error=unused-const-variable -Wno-error=bool-operation
-Wno-error=deprecated -Wno-error=expansion-to-defined
-Wno-error=format-overflow -Wno-error=format-truncation
-Wno-error=implicit-fallthrough -Wno-error=int-in-bool-context
-Wno-error=memset-elt-size -Wno-error=noexcept-type -Wno-error=nonnull
-Wno-error=pointer-compare -Wno-error=stringop-overflow
-Wno-error=aggressive-loop-optimizations -Wno-error=cast-function-type
-Wno-error=catch-value -Wno-error=multistatement-macros
-Wno-error=restrict -Wno-error=sizeof-pointer-memaccess
-Wno-error=stringop-truncation -Wno-unknown-pragmas     -c
/root/freebsd-riscv/lib/msun/src/s_clog.c -o s_clog.o
In file included from /root/freebsd-riscv/lib/msun/src/s_clog.c:33:
/root/freebsd-riscv/lib/libc/include/fpmath.h:36:10: fatal error:
_fpmath.h: No such file or directory
 #include "_fpmath.h"
          ^~~~~~~~~~~
compilation terminated.
*** Error code 1

Stop.
make[4]: stopped in /root/freebsd-riscv/lib/msun
*** Error code 1

Stop.
make[3]: stopped in /root/freebsd-riscv
*** Error code 1

Stop.
make[2]: stopped in /root/freebsd-riscv
*** Error code 1

Stop.
make[1]: stopped in /root/freebsd-riscv
*** Error code 1

Stop.
make: stopped in /root/freebsd-riscv
vesta#

so .. there is that.

I was able to build r344143 previously with a toolset that I built
myself however the process was different and I built the cross compilers
also from

https://riscv.org/software-tools/risc-v-gnu-compiler-toolchain/

That gave me a pile of triplet prefixed name tools in /opt/tools :

dclarke at vesta$ /opt/tools/bin/riscv64-unknown-freebsd12.0-gcc --version
riscv64-unknown-freebsd12.0-gcc (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dclarke at vesta$

Shouldn't be any different from the tools in ports .. but they are.

Dennis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-riscv/attachments/20190221/1aff2fe9/attachment.sig>


More information about the freebsd-riscv mailing list