From owner-freebsd-ppc@freebsd.org Tue Jul 16 02:38:49 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E725BA39C3 for ; Tue, 16 Jul 2019 02:38:49 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from atl4mhob06.registeredsite.com (atl4mhob06.registeredsite.com [209.17.115.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.registeredsite.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F4308C77D for ; Tue, 16 Jul 2019 02:38:48 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from mailpod.hostingplatform.com (atl4qobmail01pod2.registeredsite.com [10.30.77.35]) by atl4mhob06.registeredsite.com (8.14.4/8.14.4) with ESMTP id x6G2cino019513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 15 Jul 2019 22:38:44 -0400 Received: (qmail 25689 invoked by uid 0); 16 Jul 2019 02:38:44 -0000 X-TCPREMOTEIP: 99.253.177.25 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.3?) (dclarke@blastwave.org@99.253.177.25) by 0 with ESMTPA; 16 Jul 2019 02:38:44 -0000 Subject: FreeBSD current on ppc64 and RISC-V rv64imafdc To: Mark Linimon Cc: FreeBSD PowerPC ML , FreeBSD PowerPC ML References: <8352f841-0522-9f45-148d-d2948e97857e@gmail.com> <20190713152404.GJ1503@dendrobates> <6b3dcec02b425a8559605b4e6c5ada19ee642728.camel@freebsd.org> <20190713194256.GK1503@dendrobates> <85e35455-793a-84fe-c8cf-39b89ade7c11@gmail.com> <26864b34-624a-075f-4a10-859314649d2f@blastwave.org> <20190714172816.GA26897@lonesome.com> <3e91570f-69b4-1d29-ada9-bd13d42e236a@blastwave.org> <20190716003844.GB19462@lonesome.com> From: Dennis Clarke Message-ID: Date: Mon, 15 Jul 2019 22:38:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <20190716003844.GB19462@lonesome.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0F4308C77D X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [5.19 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.93)[0.931,0]; IP_SCORE(1.41)[ip: (3.98), ipnet: 209.17.112.0/21(1.74), asn: 19871(1.39), country: US(-0.06)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[blastwave.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.96)[0.962,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx1.netsolmail.net]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[44.115.17.209.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:19871, ipnet:209.17.112.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 02:38:50 -0000 On 7/15/19 8:38 PM, Mark Linimon wrote: > On Mon, Jul 15, 2019 at 08:29:06PM -0400, Dennis Clarke wrote: >> Essentially one may checkout the sources and do a clean build only to >> see the kernel panic on ppc64 hardware. > > I don't understand. What hardware? PowerMac G5 quad however things just got a *lot* better today : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238730 > > We are doing a lot of work on Power8 and Power9 hardware from various > manufacturers, and both 12 and -CURRENT behave well, even under stress. I am so very happy to hear that. I would like to see IBM Power be a tier-1 as would many others I am sure. Perhaps not Red Hat. Then again who knows. > (I have powered down my Power5 machine; I know of two cases where I > cannot move to 12.X, and since I have Power9 in-house, I probably will > not pursue it.) It is best to stick in the Power8 land and upwards. Those of us still messing with the old PowerMac G5 with its IBM 970MP processors are going to be around for a long time yet. Given that FreeBSD runs there. >> Strangely I have [a RISC-V] instance that boots neatly inside a qemu >> vm and that even includes a ZFS zpool. > > If you've built ports on it, you may be the first. You are definitely > at the bleeding edge in this case. I know of no user documentation for > FreeBSD/RISC-V. I know. There really is not much and everything has to be looked at carefully in the smallest details. However I have an 8-way smp RISC-V qemu vm running or at least walking : bbl loader ---<>--- KDB: debugger backends: ddb KDB: current backend: ddb Found 8 CPUs in the device tree Copyright (c) 1992-2019 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT r348983 QEMU riscv gcc version 8.1.0 (FreeBSD Ports Collection for riscv64) WARNING: WITNESS option enabled, expect reduced performance. Preloaded elf64 kernel "kernel" at 0xffffffc0007ce840. CPU(0): Unknown Implementer Unknown Processor real memory = 8588886016 (8191 MB) Physical memory chunk(s): 0x0000000080a2f000 - 0x0000000080bfffff, 1904640 bytes (465 pages) 0x0000000080d00000 - 0x00000002731e7fff, 8360198144 bytes (2041064 pages) avail memory = 8328466432 (7942 MB) Starting CPU 4 (hart 0) Starting CPU 5 (hart 1) Starting CPU 6 (hart 2) Starting CPU 7 (hart 3) Starting CPU 1 (hart 5) Starting CPU 2 (hart 6) Starting CPU 3 (hart 7) FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before_seeding' was enabled. VIMAGE (virtualized network stack) enabled ULE: setup cpu 0 ULE: setup cpu 1 ULE: setup cpu 2 ULE: setup cpu 3 ULE: setup cpu 4 ULE: setup cpu 5 ULE: setup cpu 6 ULE: setup cpu 7 random: entropy device external interface null: nfslock: pseudo-device openfirm: mem: crypto: ofwbus0: simplebus0: on ofwbus0 plic0: mem 0xc000000-0xfffffff irq 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 on simplebus0 timer0: Timecounter "RISC-V Timecounter" frequency 10000000 Hz quality 1000 Event timer "RISC-V Eventtimer" frequency 10000000 Hz quality 1000 rcons0: ofwbus0: no default resources for rid = 0, type = 4 ofwbus0: no default resources for rid = 0, type = 4 ofwbus0: no default resources for rid = 0, type = 4 uart0: <16550 or compatible> mem 0x10000000-0x100000ff irq 0 on ofwbus0 uart0: console (76800,n,8,1) uart0: fast interrupt uart0: PPS capture mode: DCD ofwbus0: mem 0x100000-0x100fff compat sifive,test0 (no driver attached) virtio_mmio0: mem 0x10008000-0x10008fff irq 1 on ofwbus0 virtio_mmio1: mem 0x10007000-0x10007fff irq 2 on ofwbus0 vtblk0: on virtio_mmio1 virtio_mmio1: host features: 0x31000ed4 virtio_mmio1: negotiated features: 0x10000e54 vtblk0: 32768MB (67108864 512 byte sectors) virtio_mmio2: mem 0x10006000-0x10006fff irq 3 on ofwbus0 vtblk1: on virtio_mmio2 virtio_mmio2: host features: 0x31000ed4 virtio_mmio2: negotiated features: 0x10000e54 vtblk1: 4096MB (8390400 512 byte sectors) virtio_mmio3: mem 0x10005000-0x10005fff irq 4 on ofwbus0 vtblk2: on virtio_mmio3 virtio_mmio3: host features: 0x31000ed4 virtio_mmio3: negotiated features: 0x10000e54 vtblk2: 4096MB (8390400 512 byte sectors) virtio_mmio4: mem 0x10004000-0x10004fff irq 5 on ofwbus0 vtblk3: on virtio_mmio4 virtio_mmio4: host features: 0x31000ed4 virtio_mmio4: negotiated features: 0x10000e54 vtblk3: 4096MB (8390400 512 byte sectors) virtio_mmio5: mem 0x10003000-0x10003fff irq 6 on ofwbus0 vtnet0: on virtio_mmio5 virtio_mmio5: host features: 0x39bf8064 virtio_mmio5: negotiated features: 0x308f8060 vtnet0: bpf attached vtnet0: Ethernet address: 52:54:00:12:34:56 virtio_mmio6: mem 0x10002000-0x10002fff irq 7 on ofwbus0 virtio_mmio7: mem 0x10001000-0x10001fff irq 8 on ofwbus0 cpulist0: on ofwbus0 cpu0: on cpulist0 cpu0: Nominal frequency 1000Mhz riscv64_cpu0: register <0> cpu1: on cpulist0 cpu1: Nominal frequency 1000Mhz riscv64_cpu1: register <1> cpu2: on cpulist0 cpu2: Nominal frequency 1000Mhz riscv64_cpu2: register <2> cpu3: on cpulist0 cpu3: Nominal frequency 1000Mhz riscv64_cpu3: register <3> cpu4: on cpulist0 cpu4: Nominal frequency 1000Mhz riscv64_cpu4: register <4> cpu5: on cpulist0 cpu5: Nominal frequency 1000Mhz riscv64_cpu5: register <5> cpu6: on cpulist0 cpu6: Nominal frequency 1000Mhz riscv64_cpu6: register <6> cpu7: on cpulist0 cpu7: Nominal frequency 1000Mhz riscv64_cpu7: register <7> cryptosoft0: crypto: assign cryptosoft0 driver id 0, flags 0x6000000 crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0 . . . Device configuration finished. procfs registered Timecounters tick every 10.000 msec vlan: initialized, using hash tables with chaining lo0: bpf attached tcp_init: net.inet.tcp.tcbhashsize auto tuned to 65536 IPsec: Initialized Security Association Processing. GEOM: new disk vtbd0 GEOM: new disk vtbd1 GEOM: new disk vtbd2 GEOM: new disk vtbd3 Release APs CPU(1): Unknown Implementer Unknown Processor CPU(2): Unknown Implementer Unknown Processor CPU(3): Unknown Implementer Unknown Processor CPU(7): Unknown Implementer Unknown Processor CPU(4): Unknown Implementer Unknown Processor CPU(5): Unknown Implementer Unknown Processor CPU(6): Unknown Implementer Unknown Processor WARNING: WITNESS option enabled, expect reduced performance. Trying to mount root from ufs:/dev/vtbd0 []... WARNING: / was not properly dismounted Warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init Setting hostuuid: 96d5bdc1-8d93-11e9-9a83-1502ebf1fac6. Setting hostid: 0xc77cd316. ZFS filesystem version: 5 ZFS storage pool version: features support (5000) . . . Setting hostuuid: 96d5bdc1-8d93-11e9-9a83-1502ebf1fac6. Setting hostid: 0xc77cd316. No suitable dump device was found. Fast boot: skipping disk checks. Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib ldconfig: /usr/local/lib: ignoring directory not owned by root Setting hostname: ganymede. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . lo0: link state changed to UP vtnet0: link state changed to UP Starting Network: lo0 vtnet0. lo0: flags=8049 metric 0 mtu 16384 options=680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21 vtnet0: flags=8843 metric 0 mtu 1500 options=80028 ether 52:54:00:12:34:56 inet 172.16.35.6 netmask 0xffffffc0 broadcast 172.16.35.63 media: Ethernet 10Gbase-T status: active nd6 options=29 Starting devd. add host 127.0.0.1: gateway lo0 fib 0: route already in table add net default: gateway 172.16.35.1 add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Creating and/or trimming log files. Starting syslogd. Clearing /tmp. Updating motd:. Mounting late filesystems:. Performing sanity check on sshd configuration. Starting sshd. Starting sendmail. Starting sendmail_msp_queue. Starting cron. Jul 16 01:40:06 ganymede sm-msp-queue[612]: x5E4t2I2000849: SYSERR(root): timeout writing message to [127.0.0.1] Starting background file system checks in 60 seconds. Tue Jul 16 01:40:10 UTC 2019 FreeBSD/riscv (ganymede) (ttyu0) login: root Jul 16 01:40:18 ganymede login[663]: ROOT LOGIN (root) ON ttyu0 Last login: Fri Jun 14 03:57:55 on ttyu0 FreeBSD 13.0-CURRENT r348983 QEMU +---------------------------------------------------------------------+ |FreeBSD ganymede 13.0-CURRENT r348983 RISC-V rv64imafdc | +---------------------------------------------------------------------+ | | | * * * W A R N I N G * * * | | | | Property of | | | | #### ###### # # # # # # ##### # # | | # # # ## # # # ## # # # # | | # ##### # # # # # # # # # ## | | # ### # # # # # # # # # # ## | | # # # # ## # # # ## # # # | | #### ###### # # #### # # ##### # # | | | | If you are not authorized to access this system, disconnect now. | | Users of this system have no expectation of privacy. By continuing, | | you consent to your keystrokes and data content being monitored. | | | +---------------------------------------------------------------------+ Welcome to FreeBSD! . . . ganymede# ganymede# ls bin dn zl ganymede# ganymede# bin/zl NAME USED AVAIL EX DV CKS CMP RATIO QUOTA SNAP MNT MOUNTPOINT rv64imafdc 1.06G 2.57G on off sha256 on 2.45x none 0 no none rv64imafdc/ports 183M 2.57G on on sha256 lz4 2.30x none 0 yes /usr/ports rv64imafdc/z 862M 1.16G off off sha256 on 2.50x 2G 0 yes /z rv64imafdc/z/000 861M 163M on off sha256 on 2.50x 1G 17.0M yes /z/000 rv64imafdc/z/001 47K 1024M on off sha256 on 1.26x 1G 13K yes /z/001 rv64imafdc/z/002 868K 1023M on off sha256 on 2.54x 1G 0 yes /z/002 ganymede# ganymede# zpool status pool: rv64imafdc state: ONLINE scan: scrub repaired 0 in 0 days 00:27:04 with 0 errors on Fri Jun 14 04:30:36 2019 config: NAME STATE READ WRITE CKSUM rv64imafdc ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 vtbd1 ONLINE 0 0 0 vtbd2 ONLINE 0 0 0 spares vtbd3 AVAIL errors: No known data errors ganymede# ganymede# zpool scrub rv64imafdc ganymede# Jul 16 02:00:04 ganymede sendmail[762]: x6G202Uh000762: SYSERR(operator): timeout writing message to [127.0.0.1] ganymede# zpool status pool: rv64imafdc state: ONLINE scan: scrub in progress since Tue Jul 16 01:58:24 2019 1.06G scanned at 3.33M/s, 1.71M issued at 5.38K/s, 1.06G total 0 repaired, 0.16% done, no estimated completion time config: NAME STATE READ WRITE CKSUM rv64imafdc ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 vtbd1 ONLINE 0 0 0 vtbd2 ONLINE 0 0 0 spares vtbd3 AVAIL errors: No known data errors ganymede# ganymede# zfs list NAME USED AVAIL REFER MOUNTPOINT rv64imafdc 1.06G 2.57G 23K none rv64imafdc/ports 183M 2.57G 183M /usr/ports rv64imafdc/z 862M 1.16G 23K /z rv64imafdc/z/000 861M 163M 844M /z/000 rv64imafdc/z/001 47K 1024M 34K /z/001 rv64imafdc/z/002 868K 1023M 868K /z/002 ganymede# ganymede# zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT rv64imafdc/z/000@20190523135048 13K - 23K - rv64imafdc/z/000@20190523141917 17.0M - 861M - rv64imafdc/z/001@20190523135048 13K - 23K - ganymede# . . . ganymede# sysctl -a | grep 'smp' kern.smp.maxid: 7 kern.smp.maxcpus: 16 kern.smp.active: 1 kern.smp.disabled: 0 kern.smp.cpus: 8 kern.smp.threads_per_core: 1 kern.smp.cores: 8 kern.smp.topology: 0 kern.smp.forward_signal_enabled: 1 "zfs","crossmp" "devfs","crossmp" "entropy harvest mutex","smp rendezvous" ganymede# ganymede# which dn /root/bin/dn ganymede# cat /root/bin/dn #!/bin/sh TZ=GMT0;export TZ LC_TIME=C;export LC_TIME /bin/date '+%Y%m%d%H%M%S' ganymede# ganymede# dn 20190716020810 ganymede# As an ordinary user all seems fine until I try to use the linker : ganymede$ ganymede$ head foo.c /* taken directly from http://www.cse.psu.edu/~dheller/cmpsc311/sp13/Projects/Project-1/pr1.1.c */ #include #include #include #include #include #include #include #include ganymede$ ganymede$ CC=/usr/local/bin/gcc ; export CC ganymede$ ganymede$ $CC --version 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. ganymede$ ganymede$ $CC -v Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/lto-wrapper Target: riscv64-unknown-freebsd12.0 Configured with: /home/br/dev/riscv20181213/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-freebsd12.0 --host=riscv64-unknown-freebsd12.0 --with-build-sysroot=/home/br/riscv-world --without-newlib --without-headers --disable-werror --disable-shared --enable-threads --enable-tls --enable-languages=c,c++ --with-gmp=/home/br/riscv-world/usr/local --with-mpfr=/home/br/riscv-world/usr/local --with-mpc=/home/br/riscv-world/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) ganymede$ ganymede$ $CC -v -std=iso9899:1999 -pedantic -pedantic-errors \ > -O0 -fno-builtin -march=rv64imafdc -mabi=lp64d \ > -mpreferred-stack-boundary=4 -mstrict-align \ > -mexplicit-relocs -S -o foo.s foo.c Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc Target: riscv64-unknown-freebsd12.0 Configured with: /home/br/dev/riscv20181213/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-freebsd12.0 --host=riscv64-unknown-freebsd12.0 --with-build-sysroot=/home/br/riscv-world --without-newlib --without-headers --disable-werror --disable-shared --enable-threads --enable-tls --enable-languages=c,c++ --with-gmp=/home/br/riscv-world/usr/local --with-mpfr=/home/br/riscv-world/usr/local --with-mpc=/home/br/riscv-world/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) COLLECT_GCC_OPTIONS='-v' '-std=c99' '-Wpedantic' '-pedantic-errors' '-O0' '-fno-builtin' '-march=rv64imafdc' '-mabi=lp64d' '-mpreferred-stack-boundary=4' '-mstrict-align' '-mexplicit-relocs' '-S' '-o' 'foo.s' /usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/cc1 -quiet -v foo.c -quiet -dumpbase foo.c -march=rv64imafdc -mabi=lp64d -mpreferred-stack-boundary=4 -mstrict-align -mexplicit-relocs -auxbase-strip foo.s -O0 -Wpedantic -pedantic-errors -std=c99 -version -fno-builtin -o foo.s GNU C99 (GCC) version 8.2.0 (riscv64-unknown-freebsd12.0) compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/include" #include "..." search starts here: #include <...> search starts here: /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/include /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/include-fixed /usr/include End of search list. GNU C99 (GCC) version 8.2.0 (riscv64-unknown-freebsd12.0) compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 4dda19917b6f288652be2776fcfdf247 COMPILER_PATH=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ LIBRARY_PATH=/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-std=c99' '-Wpedantic' '-pedantic-errors' '-O0' '-fno-builtin' '-march=rv64imafdc' '-mabi=lp64d' '-mpreferred-stack-boundary=4' '-mstrict-align' '-mexplicit-relocs' '-S' '-o' 'foo.s' ganymede$ ganymede$ $CC -v -std=iso9899:1999 -pedantic -pedantic-errors \ > -O0 -fno-builtin -march=rv64imafdc -mabi=lp64d \ > -mpreferred-stack-boundary=4 -mstrict-align \ > -mexplicit-relocs -c -o foo.o foo.s Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc Target: riscv64-unknown-freebsd12.0 Configured with: /home/br/dev/riscv20181213/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-freebsd12.0 --host=riscv64-unknown-freebsd12.0 --with-build-sysroot=/home/br/riscv-world --without-newlib --without-headers --disable-werror --disable-shared --enable-threads --enable-tls --enable-languages=c,c++ --with-gmp=/home/br/riscv-world/usr/local --with-mpfr=/home/br/riscv-world/usr/local --with-mpc=/home/br/riscv-world/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) COLLECT_GCC_OPTIONS='-v' '-std=c99' '-Wpedantic' '-pedantic-errors' '-O0' '-fno-builtin' '-march=rv64imafdc' '-mabi=lp64d' '-mpreferred-stack-boundary=4' '-mstrict-align' '-mexplicit-relocs' '-c' '-o' 'foo.o' /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/as -v --traditional-format -march=rv64imafdc -mabi=lp64d -o foo.o foo.s GNU assembler version 2.31.1 (riscv64-unknown-freebsd12.0) using BFD version (GNU Binutils) 2.31.1 COMPILER_PATH=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ LIBRARY_PATH=/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-std=c99' '-Wpedantic' '-pedantic-errors' '-O0' '-fno-builtin' '-march=rv64imafdc' '-mabi=lp64d' '-mpreferred-stack-boundary=4' '-mstrict-align' '-mexplicit-relocs' '-c' '-o' 'foo.o' ganymede$ ganymede$ $CC -v -std=iso9899:1999 -pedantic -pedantic-errors \ > -O0 -fno-builtin -march=rv64imafdc -mabi=lp64d \ > -mpreferred-stack-boundary=4 -mstrict-align \ > -mexplicit-relocs -o foo foo.o Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/lto-wrapper Target: riscv64-unknown-freebsd12.0 Configured with: /home/br/dev/riscv20181213/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-freebsd12.0 --host=riscv64-unknown-freebsd12.0 --with-build-sysroot=/home/br/riscv-world --without-newlib --without-headers --disable-werror --disable-shared --enable-threads --enable-tls --enable-languages=c,c++ --with-gmp=/home/br/riscv-world/usr/local --with-mpfr=/home/br/riscv-world/usr/local --with-mpc=/home/br/riscv-world/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) COMPILER_PATH=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ LIBRARY_PATH=/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/:/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-std=c99' '-Wpedantic' '-pedantic-errors' '-O0' '-fno-builtin' '-march=rv64imafdc' '-mabi=lp64d' '-mpreferred-stack-boundary=4' '-mstrict-align' '-mexplicit-relocs' '-o' 'foo' /usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/collect2 -plugin /usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/liblto_plugin.so -plugin-opt=/usr/local/libexec/gcc/riscv64-unknown-freebsd12.0/8.2.0/lto-wrapper -plugin-opt=-fresolution=/var/tmp/dclarke/cctol3UB.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -melf64lriscv -V -dynamic-linker /libexec/ld-elf.so.1 -o foo /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0 -L/usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/lib foo.o -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o GNU ld (GNU Binutils) 2.31.1 Supported emulations: elf64lriscv elf32lriscv /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ld: cannot find -lgcc /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ld: cannot find -lc /usr/local/lib/gcc/riscv64-unknown-freebsd12.0/8.2.0/../../../../riscv64-unknown-freebsd12.0/bin/ld: cannot find -lgcc collect2: error: ld returned 1 exit status ganymede$ * * * really ?? * * * ganymede$ ls -lap total 68 drwxr-xr-x 2 dclarke devl 512 Jul 16 02:30 ./ drwxr-xr-x 3 dclarke devl 512 Jul 16 02:16 ../ -rw-r--r-- 1 dclarke devl 5133 Jul 16 02:23 foo.c -rw-r--r-- 1 dclarke devl 33472 Jul 16 02:30 foo.o -rw-r--r-- 1 dclarke devl 16151 Jul 16 02:29 foo.s ganymede$ ganymede$ file foo.o foo.o: ELF 64-bit LSB relocatable, UCB RISC-V, version 1 (SYSV), not stripped ganymede$ I have no idea why ld can not locate libgcc.so.X and would love some insights on that from anyone. -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional