sabnzbd / sabctools

C implementations of functions for use within SABnzbd
GNU General Public License v2.0
21 stars 10 forks source link

SBC with RISC-V & Vector 1.0: no commands starting with "v" (for vector?) in generated sabctools so library #116

Closed sanderjo closed 4 months ago

sanderjo commented 4 months ago

pinging @animetosho

I received my "Banana Pi BPI-F3 SpacemiT K1 8 Core RISC-V", which should have risc-v vector 1.0 (aka RVV 1.0). Running Armbian Ubuntu noble on it.

After python3 setup.py build, I do not see commands starting with "v" (assumption: vector commands) in the objdump of the generated sabctools .so libary.

Wrong method? Wrong gcc? Wrong ... ?

Help appreciated.

sander@bananapif3:~/git/sabctools$ objdump -d build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so | awk '{ print $3 }'  | sort | grep -E ^v
sander@bananapif3:~/git/sabctools$ 
sander@bananapif3:~/git/sabctools$ file build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so
build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so: ELF 64-bit LSB shared object, UCB RISC-V, RVC, double-float ABI, version 1 (SYSV), dynamically linked, BuildID[sha1]=315e5cdf08195349ab78d64a00efffdb9443c8ac, with debug_info, not stripped

System info:

sander@bananapif3:~/git/sabctools$ gcc --version
gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Copyright (C) 2023 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.
sander@bananapif3:~/git/sabctools$ uname -a
Linux bananapif3 6.1.15-legacy-k1 #2 SMP PREEMPT Wed May  1 14:17:59 UTC 2024 riscv64 riscv64 riscv64 GNU/Linux
sander@bananapif3:~/git/sabctools$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Armbian-bpi-SpacemiT 24.5.0-trunk noble
Release:    24.04
Codename:   noble
sander@bananapif3:~/git/sabctools$ 
sander@bananapif3:~/git/sabctools$ cat /proc/cpuinfo 
processor   : 0
hart        : 0
model name  : Spacemit(R) X60
isa     : rv64imafdcv_sscofpmf_sstc_svpbmt_zicbom_zicboz_zicbop_zihintpause
mmu     : sv39
mvendorid   : 0x710
marchid     : 0x8000000058000001
mimpid      : 0x1000000049772200
sander@bananapif3:~/git/sabctools$ git log --oneline | head -8
c085cb1 Release v8.2.0
b1e86cc Bump pypa/cibuildwheel from 2.17.0 to 2.18.0 (#115)
04386bd Update yEnc module to rapidyenc 1.1.1 (#114)
3ed5229 Correct building on macOS-latest
b2ea288 Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#113)
c7e6891 Bump pypa/cibuildwheel from 2.16.4 to 2.16.5 (#112)
b206964 Bump pypa/cibuildwheel from 2.16.2 to 2.16.4 (#111)
59306c5 Correct publish action steps
animetosho commented 4 months ago

You generally want to be running bleeding edge for RISC-V, so try upgrading to GCC 14. GCC 13 lacks typecast intrinsics, so it's explicitly disabled there.

Clang 14+ should also work.

sanderjo commented 4 months ago

I installed gcc-14 etc, made it active, did the build, but still no commands starting with "v" in the objdump-disassembly.

So can you help further? And: the objdump method: is that correct, and does it give v-commands in your output?

Installed gcc-14:

sudo apt install gcc-14 g++-14

via update-alternatives set gcc-14 etc to active:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 90 --slave /usr/bin/g++ g++ /usr/bin/g++-14 --slave /usr/bin/gcov gcov /usr/bin/gcov-14 --slave /usr/bin/riscv64-linux-gnu-gcc riscv64-linux-gnu-gcc /usr/bin/riscv64-linux-gnu-gcc-14

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 70 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13 --slave /usr/bin/riscv64-linux-gnu-gcc  riscv64-linux-gnu-gcc /usr/bin/riscv64-linux-gnu-gcc-13

Checking ... looks good ... version 14 is now default:

sander@bananapif3:~/git/sabctools$ riscv64-linux-gnu-gcc --version
riscv64-linux-gnu-gcc (Ubuntu 14-20240412-0ubuntu1) 14.0.1 20240412 (experimental) [master r14-9935-g67e1433a94f]
Copyright (C) 2024 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.

sander@bananapif3:~/git/sabctools$ which  riscv64-linux-gnu-gcc
/usr/bin/riscv64-linux-gnu-gcc
sander@bananapif3:~/git/sabctools$ ll /usr/bin/riscv64-linux-gnu-gcc
lrwxrwxrwx 1 root root 39 May 17 15:10 /usr/bin/riscv64-linux-gnu-gcc -> /etc/alternatives/riscv64-linux-gnu-gcc*
sander@bananapif3:~/git/sabctools$ ll /etc/alternatives/riscv64-linux-gnu-gcc
lrwxrwxrwx 1 root root 33 Apr 12 14:30 /etc/alternatives/riscv64-linux-gnu-gcc -> /usr/bin/riscv64-linux-gnu-gcc-14*

clean & build:

python3 setup.py clean
python3 setup.py build

Check: yes, freshly built:

sander@bananapif3:~/git/sabctools$ ll build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so
-rwxrwxr-x 1 sander sander 385656 May 17 15:11 build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so*

... but still no commands starting with "v" in the disassembled code:

objdump -d  build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so  | awk '{ print $3 }'  | sort -u | grep -E "^v"

Proof the objdump does disassemble:

sander@bananapif3:~/git/sabctools$ objdump -d  build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so  | awk '{ print $3 }'  | sort -u | head

add
addi
addiw
addw
and
andi
auipc
beq
beqz
sander@bananapif3:~/git/sabctools$ objdump -d  build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so  | awk '{ print $3 }'  | sort -u | tail
srai
sraiw
srl
srli
srliw
sub
subw
sw
xor
zext.b
animetosho commented 4 months ago

Thanks for trying that out.

And: the objdump method: is that correct, and does it give v-commands in your output?

That should be a sufficient indicator.

Are you able to check what commands are being passed to the compiler exactly? Not sure if setuptools offers the option by default.

You can also try with rapidyenc directly - this should help isolate whether the build config has an issue.
If you try rapidyenc directly, after the cmake .. command, you can use make VERBOSE=1 which should show the commands being executed. In the list, the de/encoder_rvv files should have the -march=rv64gcv option set.

animetosho commented 4 months ago

You should also be able to see ==> Checking support for flag: -march=rv64gcv in the build log for sabctools.
If using pip to install/build, it seems like passing the -v option will display all issued commands. Look at the commands used to build decoder_rvv.cc

My attempt to cross build isn't working due to setuptools sending flags the compiler doesn't like.

sanderjo commented 4 months ago
sander@bananapif3:~/git/sabctools$ git pull
Already up to date.

sander@bananapif3:~/git/sabctools$ python3 setup.py clean
running clean
removing 'build/temp.linux-riscv64-cpython-312' (and everything under it)

sander@bananapif3:~/git/sabctools$ 
sander@bananapif3:~/git/sabctools$ 
sander@bananapif3:~/git/sabctools$ python3 setup.py build
running build
running build_py
running build_ext
==> Baseline detection: ARM=False, x86=False, macOS=False
==> Checking support for flag: -std=c++11
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmp28dpejbi.cc -o tmp/tmp28dpejbi.o -std=c++11
==> Success!
==> Checking support for flag: -march=rv64gcv
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmpczvs55v1.cc -o tmp/tmpczvs55v1.o -march=rv64gcv
==> Success!
==> Checking support for flag: -march=rv64gc_zbkc
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmp5tjjbe6o.cc -o tmp/tmp5tjjbe6o.o -march=rv64gc_zbkc
==> Success!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/platform.cc -o build/src/yencode/platform.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/encoder.cc -o build/src/yencode/encoder.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/decoder.cc -o build/src/yencode/decoder.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/crc.cc -o build/src/yencode/crc.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_sse2.cc -o build/src/yencode/encoder_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_sse2.cc -o build/src/yencode/decoder_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_ssse3.cc -o build/src/yencode/encoder_ssse3.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_ssse3.cc -o build/src/yencode/decoder_ssse3.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_folding.cc -o build/src/yencode/crc_folding.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_folding_256.cc -o build/src/yencode/crc_folding_256.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_avx.cc -o build/src/yencode/encoder_avx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_avx.cc -o build/src/yencode/decoder_avx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_avx2.cc -o build/src/yencode/encoder_avx2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_avx2.cc -o build/src/yencode/decoder_avx2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_vbmi2.cc -o build/src/yencode/encoder_vbmi2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_vbmi2.cc -o build/src/yencode/decoder_vbmi2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_neon.cc -o build/src/yencode/encoder_neon.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_neon64.cc -o build/src/yencode/decoder_neon64.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_arm.cc -o build/src/yencode/crc_arm.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_arm_pmull.cc -o build/src/yencode/crc_arm_pmull.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_rvv.cc -o build/src/yencode/encoder_rvv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_rvv.cc -o build/src/yencode/decoder_rvv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_riscv.cc -o build/src/yencode/crc_riscv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/crc32c_sse4.cc -o build/src/crcutil-1.0/code/crc32c_sse4.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.cc -o build/src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.cc -o build/src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/examples/interface.cc -o build/src/crcutil-1.0/examples/interface.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yenc.cc -o build/src/yenc.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/unlocked_ssl.cc -o build/src/unlocked_ssl.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter -Wno-missing-field-initializers
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/crc32.cc -o build/src/crc32.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/sparse.cc -o build/src/sparse.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/utils.cc -o build/src/utils.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
building 'sabctools.sabctools' extension
creating build/temp.linux-riscv64-cpython-312
creating build/temp.linux-riscv64-cpython-312/src
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/sabctools.cc -o build/temp.linux-riscv64-cpython-312/src/sabctools.o -std=c++11
riscv64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-riscv64-cpython-312/src/sabctools.o -L/usr/lib/riscv64-linux-gnu -o build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so -ldl build/src/yencode/platform.o build/src/yencode/encoder.o build/src/yencode/decoder.o build/src/yencode/crc.o build/src/yencode/encoder_sse2.o build/src/yencode/decoder_sse2.o build/src/yencode/encoder_ssse3.o build/src/yencode/decoder_ssse3.o build/src/yencode/crc_folding.o build/src/yencode/crc_folding_256.o build/src/yencode/encoder_avx.o build/src/yencode/decoder_avx.o build/src/yencode/encoder_avx2.o build/src/yencode/decoder_avx2.o build/src/yencode/encoder_vbmi2.o build/src/yencode/decoder_vbmi2.o build/src/yencode/encoder_neon.o build/src/yencode/decoder_neon64.o build/src/yencode/crc_arm.o build/src/yencode/crc_arm_pmull.o build/src/yencode/encoder_rvv.o build/src/yencode/decoder_rvv.o build/src/yencode/crc_riscv.o build/src/crcutil-1.0/code/crc32c_sse4.o build/src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.o build/src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.o build/src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.o build/src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.o build/src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.o build/src/crcutil-1.0/examples/interface.o build/src/yenc.o build/src/unlocked_ssl.o build/src/crc32.o build/src/sparse.o build/src/utils.o
sander@bananapif3:~/git/sabctools$ 
sanderjo commented 4 months ago

My attempt to cross build isn't working due to setuptools sending flags the compiler doesn't like.

I can give you ssh access to my RVV 1.0 hardware. Preferably via IPv6, as I'm behind IPV4-CGNAT.

And if you want, I can give you root access. The system is 2 days old, so clean, and I can reflash/reinstall if things go wrong.

sanderjo commented 4 months ago

Ah, progress ... via an ugly hack: forcing "-march=rv64gcv" as cflags in setup.py:

sander@bananapif3:~/git/sabctools$ diff setup.py.ORG setup.py
123a124,125
>             cflags.append("-march=rv64gcv") # Sander hack
> 

... and ... bingo ... v-commands in the resulting sabctools .so.

So detecting or setting -march=rv64gcvis not going well in the non-hacked setup.py?

sander@bananapif3:~/git/sabctools$ objdump -d build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so | awk '{ print $3 }' | sort -u | grep -E "^v" | head -20
vadd.vi
vadd.vv
vand.vi
vcompress.vm
vcpop.m
vid.v
viota.m
vle64.v
vle8.v
vmadc.vi
vmadc.vv
vmand.mm
vmandn.mm
vmerge.vxm
vmnor.mm
vmnot.m
vmor.mm
vmsbf.m
vmseq.vi
vmseq.vv
animetosho commented 4 months ago

Ah, I think I messed some code in setup.py. Could you try replacing all instances of gcc_rv_flags with gcc_flags in that file, and try again?

sanderjo commented 4 months ago

Could you try replacing all instances of gcc_rv_flags with gcc_flags in that file, and try again?

Bingo! The resulting .so contains v-commands! And compiling is now a normal time (1 minute), not 3+ minutes like with my ugly hack (where each compile line had that option forced in).

$ sed -i -e 's/gcc_rv_flags/gcc_flags/g' setup.py Looks good:

sander@bananapif3:~/git/sabctools$ diff setup.py.ORG setup.py
291c291
<                 "gcc_rv_flags": gcc_rvv_flags,
---
>                 "gcc_flags": gcc_rvv_flags,
296c296
<                 "gcc_rv_flags": gcc_rvzbkc_flags,
---
>                 "gcc_flags": gcc_rvzbkc_flags,

WAIT: gcc_rvv_flags (double v) should still be there? It works, so looks good, but just checking ...

sander@bananapif3:~/git/sabctools$ objdump -d build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so | awk '{ print $3 }' | sort -u | grep -E "^v" | head -10
vadd.vi
vadd.vv
vcompress.vm
vcpop.m
viota.m
vle8.v
vmadc.vi
vmadc.vv
vmand.mm
vmandn.mm
sander@bananapif3:~/git/sabctools$ time python3 setup.py build
running build
running build_py
running build_ext
==> Baseline detection: ARM=False, x86=False, macOS=False
==> Checking support for flag: -std=c++11
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmpp4bp8htk.cc -o tmp/tmpp4bp8htk.o -std=c++11
==> Success!
==> Checking support for flag: -march=rv64gcv
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmpx80zysr5.cc -o tmp/tmpx80zysr5.o -march=rv64gcv
==> Success!
==> Checking support for flag: -march=rv64gc_zbkc
==> Please ignore any errors shown below!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c /tmp/tmpf8z0mjzf.cc -o tmp/tmpf8z0mjzf.o -march=rv64gc_zbkc
==> Success!
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/platform.cc -o build/src/yencode/platform.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/encoder.cc -o build/src/yencode/encoder.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/decoder.cc -o build/src/yencode/decoder.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/yencode/crc.cc -o build/src/yencode/crc.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_sse2.cc -o build/src/yencode/encoder_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_sse2.cc -o build/src/yencode/decoder_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_ssse3.cc -o build/src/yencode/encoder_ssse3.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_ssse3.cc -o build/src/yencode/decoder_ssse3.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_folding.cc -o build/src/yencode/crc_folding.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_folding_256.cc -o build/src/yencode/crc_folding_256.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_avx.cc -o build/src/yencode/encoder_avx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_avx.cc -o build/src/yencode/decoder_avx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_avx2.cc -o build/src/yencode/encoder_avx2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_avx2.cc -o build/src/yencode/decoder_avx2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_vbmi2.cc -o build/src/yencode/encoder_vbmi2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_vbmi2.cc -o build/src/yencode/decoder_vbmi2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_neon.cc -o build/src/yencode/encoder_neon.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_neon64.cc -o build/src/yencode/decoder_neon64.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_arm.cc -o build/src/yencode/crc_arm.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_arm_pmull.cc -o build/src/yencode/crc_arm_pmull.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/encoder_rvv.cc -o build/src/yencode/encoder_rvv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -march=rv64gcv
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/decoder_rvv.cc -o build/src/yencode/decoder_rvv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -march=rv64gcv
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yencode/crc_riscv.cc -o build/src/yencode/crc_riscv.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -march=rv64gc_zbkc
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/crc32c_sse4.cc -o build/src/crcutil-1.0/code/crc32c_sse4.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.cc -o build/src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.cc -o build/src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.cc -o build/src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DCRCUTIL_USE_MM_CRC32=0 -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/tests -I/usr/include/python3.12 -c src/crcutil-1.0/examples/interface.cc -o build/src/crcutil-1.0/examples/interface.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-expansion-to-defined -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/yenc.cc -o build/src/yenc.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/unlocked_ssl.cc -o build/src/unlocked_ssl.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter -Wno-missing-field-initializers
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Isrc/crcutil-1.0/code -Isrc/crcutil-1.0/examples -I/usr/include/python3.12 -c src/crc32.cc -o build/src/crc32.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/sparse.cc -o build/src/sparse.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/utils.cc -o build/src/utils.o -Wall -Wextra -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -O3 -fPIC -fwrapv -std=c++11 -Wno-unused-parameter
building 'sabctools.sabctools' extension
creating build/temp.linux-riscv64-cpython-312
creating build/temp.linux-riscv64-cpython-312/src
riscv64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/include/python3.12 -c src/sabctools.cc -o build/temp.linux-riscv64-cpython-312/src/sabctools.o -std=c++11
riscv64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-riscv64-cpython-312/src/sabctools.o -L/usr/lib/riscv64-linux-gnu -o build/lib.linux-riscv64-cpython-312/sabctools/sabctools.cpython-312-riscv64-linux-gnu.so -ldl build/src/yencode/platform.o build/src/yencode/encoder.o build/src/yencode/decoder.o build/src/yencode/crc.o build/src/yencode/encoder_sse2.o build/src/yencode/decoder_sse2.o build/src/yencode/encoder_ssse3.o build/src/yencode/decoder_ssse3.o build/src/yencode/crc_folding.o build/src/yencode/crc_folding_256.o build/src/yencode/encoder_avx.o build/src/yencode/decoder_avx.o build/src/yencode/encoder_avx2.o build/src/yencode/decoder_avx2.o build/src/yencode/encoder_vbmi2.o build/src/yencode/decoder_vbmi2.o build/src/yencode/encoder_neon.o build/src/yencode/decoder_neon64.o build/src/yencode/crc_arm.o build/src/yencode/crc_arm_pmull.o build/src/yencode/encoder_rvv.o build/src/yencode/decoder_rvv.o build/src/yencode/crc_riscv.o build/src/crcutil-1.0/code/crc32c_sse4.o build/src/crcutil-1.0/code/multiword_64_64_cl_i386_mmx.o build/src/crcutil-1.0/code/multiword_64_64_gcc_amd64_asm.o build/src/crcutil-1.0/code/multiword_64_64_gcc_i386_mmx.o build/src/crcutil-1.0/code/multiword_64_64_intrinsic_i386_mmx.o build/src/crcutil-1.0/code/multiword_128_64_gcc_amd64_sse2.o build/src/crcutil-1.0/examples/interface.o build/src/yenc.o build/src/unlocked_ssl.o build/src/crc32.o build/src/sparse.o build/src/utils.o

real    1m3.101s
user    0m59.747s
sys 0m3.330s
animetosho commented 4 months ago

Great, thanks for testing!

gcc_rvv_flags (double v) should still be there?

Originally I intended it to be a contraction of RISC-V, so not RVV, but in the end, it's not really needed.