Hello Herman,

Sure I know those pages. I try to avoid as much as possible local VM when
internet access exist for architecture/OS I'm looking for.

I currently consider riscv32/64 only Copper ports for OpenLisp (vs. Gold and
Silver).

I make copper ports mainly to verify that my complex fully portable build
toolchain works on all systems I have access to.

 

See: http://www.eligis.com/downloads/

 

Jslinux is perfect for my need.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org]
On Behalf Of Herman ten Brugge via Tinycc-devel
Sent: Tuesday, May 26, 2020 21:11
To: tinycc-devel@nongnu.org
Cc: Herman ten Brugge
Subject: Re: [Tinycc-devel] riscv64 feedback

 

I got it working with:
https://fedoraproject.org/wiki/Architectures/RISC-V
https://fedorapeople.org/groups/risc-v/disk-images/

Follow the readme and copy tcc to the disk image:

git clone git://repo.or.cz/tinycc.git
scp -P 10000 -r tinycc root@localhost:.

Run configure/make/make test as usual.

Regards,

    Herman

On 2020-05-26 07:43, Christian Jullien wrote:

For Michael,

 

Again, many thanks for riscv64 backend.

I finally found a way to give riscv64 a try . and it is again from Fabrice
Bellard solution using jslinux online VM.

 

For that I use the fedora29 risvc64 vm in text mode and raised to 1Gb:

https://bellard.org/jslinux/vm.html?cpu=riscv64
<https://bellard.org/jslinux/vm.html?cpu=riscv64&url=fedora29-riscv-2.cfg&me
m=1024&rows=48&cols=160&font_size=12>
&url=fedora29-riscv-2.cfg&mem=1024&rows=48&cols=160&font_size=12

 

It is very slow but it works well.

 

I started with gcc and my own projects. Now it's the tcc turn (please be
sure I don't ask you anything to support tcc on this VM).

 

Tcc is configured with: ./configure --with-selinux

 

While compiling tcc (2020-05-mob) I get very few warnings:

tccrun.c:844:2: warning: #warning add arch specific rt_get_caller_pc()
[-Wcpp]

#warning add arch specific rt_get_caller_pc()

  ^~~~~~~

gcc -o riscv64-gen.o -c riscv64-gen.c -DCONFIG_LDDIR="\"lib64\""
-DHAVE_SELINUX -DTCC_TARGET_RISCV64       -DONE_SOURCE=0 -Wall -O2
-Wdeclaration-after-statemen

t -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare
-Wno-unused-result -Wno-format-truncation -I.

riscv64-gen.c: In function 'load_symofs':

riscv64-gen.c:161:71: warning: format '%llx' expects argument of type 'long
long unsigned int', but argument 2 has type 'uint64_t' {aka 'long unsigned
int'} [-W

format=]

               tcc_error("unimp: large addend for global address (0x%llx)",
sv->c.i);

                                                                    ~~~^
~~~~~~~

                                                                    %lx

 

It produces a valid tcc binary which allows me to make "Hello World" compile
and run.

 

But test suite unfortunately fails because of map memory error.

Please note that I was also unable to mmap OpenLisp memory on this VM but,
in this case, OpenLisp uses  malloc.

 

[root@localhost tinycc]# make test

make[1]: Entering directory '/root/tinycc/tests'

------------ hello-exe ------------

Hello World

------------ hello-run ------------

tcc: error: tccrun: could not map memory

+ ../tcc -vv

tcc version 0.9.27 (riscv64 Linux)

install: /usr/local/lib/tcc

include:

  /usr/local/lib/tcc/include

  /usr/local/include

  /usr/include

libraries:

  /usr/lib64

  /lib64

  /usr/local/lib64

libtcc1:

  /usr/local/lib/tcc/libtcc1.a

crt:

  /usr/lib64

elfinterp:

  /lib/ld-linux-riscv64-lp64d.so.1

+ ldd ../tcc

        linux-vdso.so.1 (0x000000200001d000)

        libm.so.6 => /lib64/lp64d/libm.so.6 (0x0000002000030000)

        libpthread.so.0 => /lib64/lp64d/libpthread.so.0 (0x00000020000cf000)

        libdl.so.2 => /lib64/lp64d/libdl.so.2 (0x00000020000eb000)

        libc.so.6 => /lib64/lp64d/libc.so.6 (0x00000020000f0000)

        /lib/ld-linux-riscv64-lp64d.so.1 (0x0000002000000000)

+ exit 1

make[2]: *** [Makefile:82: hello-run] Error 1

make[1]: *** [Makefile:74: all] Error 2

make[1]: Leaving directory '/root/tinycc/tests'

make: *** [Makefile:378: test] Error 2

 

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to