From owner-freebsd-riscv@freebsd.org Wed Mar 13 12:48:46 2019 Return-Path: Delivered-To: freebsd-riscv@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF38915324FB for ; Wed, 13 Mar 2019 12:48:46 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from atl4mhob23.registeredsite.com (atl4mhob23.registeredsite.com [209.17.115.117]) by mx1.freebsd.org (Postfix) with ESMTP id D8C7876099 for ; Wed, 13 Mar 2019 12:48:45 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from mailpod.hostingplatform.com (atl4qobmail02pod2.registeredsite.com [10.30.77.36]) by atl4mhob23.registeredsite.com (8.14.4/8.14.4) with ESMTP id x2DCmfs8017825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 13 Mar 2019 08:48:41 -0400 Received: (qmail 23939 invoked by uid 0); 13 Mar 2019 12:48:41 -0000 X-TCPREMOTEIP: 174.118.245.214 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.3?) (dclarke@blastwave.org@174.118.245.214) by 0 with ESMTPA; 13 Mar 2019 12:48:41 -0000 From: Dennis Clarke Subject: Re: wiki pages https://wiki.freebsd.org/riscv wrong To: Ruslan Bukin Cc: Dinesh Thirumurthy , freebsd-riscv References: <20190224212643.GA67845@bsdpad.com> <4b5341ca-b1f5-a9c5-bdda-0204d37703ae@blastwave.org> <20190312170103.GA9714@bsdpad.com> Openpgp: preference=signencrypt Autocrypt: addr=dclarke@blastwave.org; keydata= mQINBFxoSrYBEAC1M5KicBVclSHf6d81rxTQYgFhIMhNxekNQgNsB39lCWcq3zSZi75Rflb0 Q74b+lIjBi7a5XygweXgFINPNVLpknrG8y7jA/8jrKqVy5qQ/7Mw/uVou4culndNOkXwNyW9 WTNoAzAtKlDEmzIX/pfaqrulAP8se3ci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b DAAKCRCPkWAKX3HO3MYdEACW614cKJJT9/M2wPyYecKj+KR5tv+oTdGdcZl87mG47XWn4fKI kpyTR9EGVHGbSbrCyG8qMvz+vhe+Aj9SbJ4ccr+1KIaNkBcACOSJdU2UC2sqOBxckki0ArbB ds3efHBaAEKCZv4Qfj5sHILLkImaCtR+FjvP0fr5ankJkbOeucqgxPmkKJxFBgiotWQxPp59 Sl5uzNGeLPBmkleYQMQFAOK6Yhrgsh35AmYNgNoPR6KWsfaIh9BPgEOOxc3Zl99fsZogbt1U 2YUj7L0nCa5s1AMTftZDTBsqZyotDO8/TpwSEC0EOHvcg/GAj+ocMgVPTHaTrgCV2Yy2lCVG u1Mu2T7zsCRMDJNvhC7LA3Qo8Fdc7SFJekr7TllTWB4mbQyYj9/vjQINxoKZV6v7Yfw/rYcm xY2fVsSdxZFvDIM/VRryQpoqzPv9YQrDVWDEb139NtvrNEeUnIXv+cRBKFMBxQ0PIHDkwNAb cmXY5/R58QiqnGE23je0WQNg+iBrbJN9P7inp178m6j9SFor+5pW567vYakASRQn5GPqHqt9 fRQvz5E3aa8xDscR6Gs9HQAhsA5kDqvH/XxQRD7Y1jG9T73WMlS6j928qHfMwQ6EvNuIQwqN PToVd6cMhrTJKE5gUVLVs9Oa81zr/5pNCKJ9upm6cU349JNDO/SDKSTtLA== Message-ID: <2848569d-68e4-df5f-9d0f-7e96933450ca@blastwave.org> Date: Wed, 13 Mar 2019 08:48:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <20190312170103.GA9714@bsdpad.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D8C7876099 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.89 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx1.netsolmail.net]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.13)[ipnet: 209.17.112.0/21(0.39), asn: 19871(0.31), country: US(-0.07)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:19871, ipnet:209.17.112.0/21, country:US]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; URL_IN_SUBJECT(1.00)[wiki.freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.88)[0.876,0]; TAGGED_RCPT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-riscv@freebsd.org]; DMARC_NA(0.00)[blastwave.org]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(0.95)[0.953,0]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.95)[0.950,0]; RCVD_IN_DNSWL_NONE(0.00)[117.115.17.209.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FREEMAIL_CC(0.00)[gmail.com] X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 12:48:47 -0000 > > What was your issue? They don't work. Plain and simple. Nope. No one has *really* followed along on that page in a while. On that page are some basic info and status and then "Instructions". None of which really works. Let's go step by step and watch it fail and be WRONG here there and everywhere. vesta# uname -a FreeBSD vesta 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 Note this is recent RELEASE and not 11.2 or anything else. Let's start ... vesta# echo $HOME /root vesta# cd vesta# pwd /root vesta# env | sort BLOCKSIZE=K COLUMNS=132 EDITOR=/usr/bin/vi GROUP=wheel HOME=/root HOST=vesta HOSTTYPE=FreeBSD LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LINES=43 LOGNAME=root MACHTYPE=x86_64 MAIL=/var/mail/root OSTYPE=FreeBSD PAGER=/usr/bin/more PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/schily/bin PWD=/root REMOTEHOST=static-68-179-116-203.ptr.terago.net SHELL=/bin/csh SHLVL=1 TERM=vt100 TMPDIR=/var/tmp/root TZ=GMT0 USER=root VENDOR=amd VISUAL=/usr/bin/vi XTERM_LOCALE=en_US.UTF-8 vesta# vesta# setenv PREFIX $HOME/riscv vesta# vesta# echo $PREFIX /root/riscv vesta# Check for a few packages. vesta# pkg query %n\ %v\ %o | grep -E -e 'bison|gmp|mpc|gawk|gsed' bison 3.3.2,1 devel/bison gawk 4.1.4_3 lang/gawk gmp 6.1.2_1 math/gmp gsed 4.7 textproc/gsed mpc 1.1.0_2 math/mpc vesta# get on with the process as detailed on that wiki page : vesta# git clone https://github.com/freebsd-riscv/riscv-gnu-toolchain Cloning into 'riscv-gnu-toolchain'... remote: Enumerating objects: 7319, done. remote: Total 7319 (delta 0), reused 0 (delta 0), pack-reused 7319 Receiving objects: 100% (7319/7319), 4.65 MiB | 5.58 MiB/s, done. Resolving deltas: 100% (3578/3578), done. vesta# cd riscv-gnu-toolchain vesta# git submodule update --init --recursive Submodule 'riscv-binutils' (https://github.com/freebsd-riscv/riscv-binutils-gdb) registered for path 'riscv-binutils' Submodule 'riscv-gcc' (https://github.com/freebsd-riscv/riscv-gcc) registered for path 'riscv-gcc' Submodule 'riscv-gdb' (https://github.com/freebsd-riscv/riscv-binutils-gdb) registered for path 'riscv-gdb' Submodule 'riscv-qemu' (https://github.com/riscv/riscv-qemu) registered for path 'riscv-qemu' Cloning into '/root/riscv-gnu-toolchain/riscv-binutils'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu'... Cloning into '/root/riscv-gnu-toolchain/riscv-gdb'... Cloning into '/root/riscv-gnu-toolchain/riscv-gcc'... Submodule path 'riscv-binutils': checked out '82dcb8613e1b1fb2989deffde1d3c9729695ff9c' Submodule path 'riscv-gcc': checked out 'be9abee2aaa919ad8530336569d17b5a60049717' Submodule path 'riscv-gdb': checked out '044a7fdd5d0e6f3a4fc60e43673368e387c4b753' Submodule path 'riscv-qemu': checked out 'ff36f2f77ec3e6a6211c63bfe1707ec057b12f7d' Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'riscv-qemu/dtc' Submodule 'pixman' (git://anongit.freedesktop.org/pixman) registered for path 'riscv-qemu/pixman' Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'riscv-qemu/roms/SLOF' Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'riscv-qemu/roms/ipxe' Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'riscv-qemu/roms/openbios' Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'riscv-qemu/roms/openhackware' Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'riscv-qemu/roms/qemu-palcode' Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'riscv-qemu/roms/seabios' Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'riscv-qemu/roms/sgabios' Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'riscv-qemu/roms/u-boot' Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'riscv-qemu/roms/vgabios' Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/dtc'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/openhackware'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/pixman'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/qemu-palcode'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/SLOF'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/sgabios'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/openbios'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/vgabios'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/seabios'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/u-boot'... Cloning into '/root/riscv-gnu-toolchain/riscv-qemu/roms/ipxe'... Submodule path 'riscv-qemu/dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf' Submodule path 'riscv-qemu/pixman': checked out '87eea99e443b389c978cf37efc52788bf03a0ee0' Submodule path 'riscv-qemu/roms/SLOF': checked out 'e3d05727a074619fc12d0a67f05cf2c42c875cce' Submodule path 'riscv-qemu/roms/ipxe': checked out '04186319181298083ef28695a8309028b26fe83c' Submodule path 'riscv-qemu/roms/openbios': checked out 'c5542f226c0d3d61e7bb578b70e591097d575479' Submodule path 'riscv-qemu/roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Submodule path 'riscv-qemu/roms/qemu-palcode': checked out 'c87a92639b28ac42bc8f6c67443543b405dc479b' Submodule path 'riscv-qemu/roms/seabios': checked out 'e2fc41e24ee0ada60fc511d60b15a41b294538be' Submodule path 'riscv-qemu/roms/sgabios': checked out '23d474943dcd55d0550a3d20b3d30e9040a4f15b' Submodule path 'riscv-qemu/roms/u-boot': checked out '2072e7262965bb48d7fffb1e283101e6ed8b21a8' Submodule path 'riscv-qemu/roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485' vesta# vesta# ./configure --prefix=$PREFIX checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking for grep that handles long lines and -e... /usr/local/bin/grep checking for fgrep... /usr/local/bin/grep -F checking for grep that handles long lines and -e... (cached) /usr/local/bin/grep checking for bash... /usr/local/bin/bash checking for __gmpz_init in -lgmp... no checking for mpfr_init in -lmpfr... no checking for mpc_init2 in -lmpc... no checking for curl... /usr/local/bin/curl checking for wget... /usr/local/bin/wget checking for ftp... /usr/bin/ftp configure: creating ./config.status config.status: creating Makefile config.status: creating scripts/wrapper/awk/awk config.status: creating scripts/wrapper/sed/sed vesta# I am not going to even bother with -j16 or -j4 or any parallel build here : vesta# /usr/bin/time -p gmake freebsd . . . gmake[3]: Leaving directory '/root/riscv-gnu-toolchain/build-gcc-freebsd/gcc' gmake[2]: Leaving directory '/root/riscv-gnu-toolchain/build-gcc-freebsd' rm -rf /root/riscv/lib/gcc/riscv64-unknown-freebsd*/*/include-fixed mkdir -p stamps/ && touch stamps/build-gcc-freebsd gmake[1]: Leaving directory '/root/riscv-gnu-toolchain' real 3156.02 user 2964.85 sys 213.00 vesta# Lovely. Here we hit the first bit of BROKEN and WRONG stuff on that page : vesta# ls -lad ${PREFIX}/lib/gcc/ drwxr-xr-x 3 root wheel 3 Mar 13 10:30 /root/riscv/lib/gcc/ vesta# ls /root/riscv/lib/gcc/ riscv64-unknown-freebsd12.0 vesta# vesta# ls /root/riscv/lib/gcc/riscv64-unknown-freebsd12.0/ 8.2.0 vesta# vesta# ls /root/riscv/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/ include install-tools plugin vesta# There is no such thing as "include-fixed" there and certainly not for FreeBSD 11.2 AND not gcc 8.1.0 and what else do you need? WRONG. Let's try to stumble forwards knowing that we are in the land of WRONG now and who knows what breaks next. vesta# cd vesta# pwd /root ??? Alternatively, install devel/riscv64-xtoolchain-gcc .... Why is this AFTER the instructions to build the cross compiler tools manually ??? vesta# svn co http://svn.freebsd.org/base/head freebsd-riscv . . . A freebsd-riscv/Makefile.sys.inc U freebsd-riscv Checked out revision 345085. vesta# vesta# Well now we hit the muddy bits. When using toolchain built by hand: ??? When using devel/riscv64-xtoolchain-gcc: ??? There is no explanation where this stuff comes from or what it is or why. I will make a wild guess and assume that someone somewhere is talking about a cross compiler : vesta# pkg query %n\ %v\ %o | grep 'risc' riscv64-binutils 2.32,1 devel/riscv64-binutils riscv64-gcc 8.1.0_1 devel/riscv64-gcc riscv64-xtoolchain-gcc 0.4_1 devel/riscv64-xtoolchain-gcc vesta# The user at the moment is root so whatever stuff on that page is about /home/${USER} is plain WRONG so we have to guess that maybe some path stuff has to be just sort of made up : vesta# vesta# pwd /root/freebsd-riscv vesta# setenv MAKEOBJDIRPREFIX /root/obj/ vesta# setenv WITHOUT_FORMAT_EXTENSIONS yes vesta# /usr/bin/time -p make CROSS_TOOLCHAIN=riscv64-gcc TARGET_ARCH=riscv64 buildworld [Creating objdir /root/obj//root/freebsd-riscv/amd64.amd64...] [Creating objdir /root/obj//root/freebsd-riscv/riscv.riscv64...] -------------------------------------------------------------- >>> World build started on Wed Mar 13 11:35:01 GMT 2019 -------------------------------------------------------------- -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- rm -rf /root/obj//root/freebsd-riscv/riscv.riscv64/tmp cd /root/freebsd-riscv/tools/build; make DIRPRFX=tools/build/ DESTDIR=/root/obj//root/freebsd-riscv/riscv.riscv64/tmp/legacy installdirs [Creating objdir /root/obj//root/freebsd-riscv/riscv.riscv64/tools/build...] mkdir -p "/root/obj//root/freebsd-riscv/riscv.riscv64/tmp/legacy/bin" mkdir -p "/root/obj//root/freebsd-riscv/riscv.riscv64/tmp/legacy/usr/lib" . . . /usr/local/bin/riscv64-unknown-freebsd12.0-gcc --sysroot=/root/obj//root/freebsd-riscv/riscv.riscv64/tmp -B/usr/local/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 real 1366.98 user 1189.19 sys 237.14 vesta# FAIL ... OKay maybe we try the cross tools built before ?? Let's watch that FAIL also ... vesta# cd vesta# rm -rf freebsd-riscv vesta# vesta# pwd /root vesta# svn co http://svn.freebsd.org/base/head freebsd-riscv A freebsd-riscv/share A freebsd-riscv/share/man . . . A freebsd-riscv/.gitignore A freebsd-riscv/.arclint U freebsd-riscv Checked out revision 345085. vesta# vesta# vesta# cd freebsd-riscv vesta# vesta# setenv MAKEOBJDIRPREFIX /root/obj vesta# setenv CROSS_BINUTILS_PREFIX $PREFIX/riscv64-unknown-freebsd12.0/bin/ vesta# setenv CROSS_COMPILER_PREFIX $PREFIX/bin/riscv64-unknown-freebsd12.0- vesta# setenv XCC ${CROSS_COMPILER_PREFIX}gcc vesta# setenv XCXX ${CROSS_COMPILER_PREFIX}c++ vesta# setenv XCPP ${CROSS_COMPILER_PREFIX}cpp vesta# setenv STRIPBIN ${CROSS_COMPILER_PREFIX}strip vesta# setenv X_COMPILER_TYPE gcc vesta# vesta# ls -lad $MAKEOBJDIRPREFIX drwxrwxr-x 3 root wheel 3 Mar 13 11:35 /root/obj vesta# ls -lad $CROSS_BINUTILS_PREFIX drwxr-xr-x 2 root wheel 12 Mar 13 09:44 /root/riscv/riscv64-unknown-freebsd12.0/bin/ vesta# ls -lad $XCC -rwxr-xr-x 2 root wheel 3653920 Mar 13 10:31 /root/riscv/bin/riscv64-unknown-freebsd12.0-gcc vesta# ls -lad $XCXX -rwxr-xr-x 2 root wheel 3656840 Mar 13 10:31 /root/riscv/bin/riscv64-unknown-freebsd12.0-c++ vesta# ls -lad $XCPP -rwxr-xr-x 1 root wheel 3655288 Mar 13 10:31 /root/riscv/bin/riscv64-unknown-freebsd12.0-cpp vesta# ls -lad $STRIPBIN -rwxr-xr-x 2 root wheel 5080736 Mar 13 09:44 /root/riscv/bin/riscv64-unknown-freebsd12.0-strip vesta# vesta# vesta# /root/riscv/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. vesta# /root/riscv/bin/riscv64-unknown-freebsd12.0-gcc -v Using built-in specs. COLLECT_GCC=/root/riscv/bin/riscv64-unknown-freebsd12.0-gcc COLLECT_LTO_WRAPPER=/root/riscv/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/lto-wrapper Target: riscv64-unknown-freebsd12.0 Configured with: /root/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-freebsd12.0 --prefix=/root/riscv --with-sysroot=/root/riscv/sysroot --with-gxx-include-dir=/usr/include/c++/v1/ --without-newlib --without-headers --disable-werror --enable-threads --enable-tls --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-libatomic --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-bootstrap --disable-multilib --with-arch=rv64imafdc Thread model: posix gcc version 8.2.0 (GCC) vesta# Great. The arch there is rv64imafdc or rv64gc is the same thing. Looks good. vesta# vesta# echo $DESTDIR DESTDIR: Undefined variable. vesta# setenv DESTDIR /root/riscv-world vesta# /usr/bin/time -p make TARGET_ARCH=riscv64 buildworld -------------------------------------------------------------- >>> World build started on Wed Mar 13 12:23:28 GMT 2019 -------------------------------------------------------------- -------------------------------------------------------------- >>> Rebuilding the temporary build tree -------------------------------------------------------------- rm -rf /root/obj/root/freebsd-riscv/riscv.riscv64/tmp cd /root/freebsd-riscv/tools/build; make DIRPRFX=tools/build/ DESTDIR=/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/legacy installdirs mkdir -p "/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/legacy/bin" . . . /root/riscv/bin/riscv64-unknown-freebsd12.0-gcc --sysroot=/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 real 1346.37 user 1174.05 sys 230.59 vesta# FAIL again ... same fail in fact of that makes sense. So really .. no .. that page is wrong and no one has tested it in a while. Dennis