Package Details: riscv-gnu-toolchain-bin 2022.10.11-1

Git Clone URL: https://aur.archlinux.org/riscv-gnu-toolchain-bin.git (read-only, click to copy)
Package Base: riscv-gnu-toolchain-bin
Description: GNU toolchain for RISC-V, including GCC. Precompiled riscv64-unknown-elf-gcc, riscv32-unknown-elf-gcc, riscv64-unknown-linux-gnu-gcc, and riscv32-unknown-linux-gnu-gcc.
Upstream URL: https://github.com/riscv-collab/riscv-gnu-toolchain
Keywords: riscv32 riscv32-unknown-elf-gcc riscv32-unknown-linux-gnu-gcc riscv64 riscv64-unknown-elf-gcc riscv64-unknown-linux-gnu-gcc
Licenses: GPL2
Provides: riscv-gnu-toolchain-bin, riscv32-unknown-elf-addr2line, riscv32-unknown-elf-ar, riscv32-unknown-elf-as, riscv32-unknown-elf-c++, riscv32-unknown-elf-c++filt, riscv32-unknown-elf-cpp, riscv32-unknown-elf-elfedit, riscv32-unknown-elf-g++, riscv32-unknown-elf-gcc, riscv32-unknown-elf-gcc-12.2.0, riscv32-unknown-elf-gcc-ar, riscv32-unknown-elf-gcc-nm, riscv32-unknown-elf-gcc-ranlib, riscv32-unknown-elf-gcov, riscv32-unknown-elf-gcov-dump, riscv32-unknown-elf-gcov-tool, riscv32-unknown-elf-gdb, riscv32-unknown-elf-gdb-add-index, riscv32-unknown-elf-gprof, riscv32-unknown-elf-ld, riscv32-unknown-elf-ld.bfd, riscv32-unknown-elf-lto-dump, riscv32-unknown-elf-nm, riscv32-unknown-elf-objcopy, riscv32-unknown-elf-objdump, riscv32-unknown-elf-ranlib, riscv32-unknown-elf-readelf, riscv32-unknown-elf-run, riscv32-unknown-elf-size, riscv32-unknown-elf-strings, riscv32-unknown-elf-strip, riscv32-unknown-linux-gnu-addr2line, riscv32-unknown-linux-gnu-ar, riscv32-unknown-linux-gnu-as, riscv32-unknown-linux-gnu-c++, riscv32-unknown-linux-gnu-c++filt, riscv32-unknown-linux-gnu-cpp, riscv32-unknown-linux-gnu-elfedit, riscv32-unknown-linux-gnu-g++, riscv32-unknown-linux-gnu-gcc, riscv32-unknown-linux-gnu-gcc-12.2.0, riscv32-unknown-linux-gnu-gcc-ar, riscv32-unknown-linux-gnu-gcc-nm, riscv32-unknown-linux-gnu-gcc-ranlib, riscv32-unknown-linux-gnu-gcov, riscv32-unknown-linux-gnu-gcov-dump, riscv32-unknown-linux-gnu-gcov-tool, riscv32-unknown-linux-gnu-gdb, riscv32-unknown-linux-gnu-gdb-add-index, riscv32-unknown-linux-gnu-gfortran, riscv32-unknown-linux-gnu-gprof, riscv32-unknown-linux-gnu-ld, riscv32-unknown-linux-gnu-ld.bfd, riscv32-unknown-linux-gnu-lto-dump, riscv32-unknown-linux-gnu-nm, riscv32-unknown-linux-gnu-objcopy, riscv32-unknown-linux-gnu-objdump, riscv32-unknown-linux-gnu-ranlib, riscv32-unknown-linux-gnu-readelf, riscv32-unknown-linux-gnu-run, riscv32-unknown-linux-gnu-size, riscv32-unknown-linux-gnu-strings, riscv32-unknown-linux-gnu-strip, riscv64-unknown-elf-addr2line, riscv64-unknown-elf-ar, riscv64-unknown-elf-as, riscv64-unknown-elf-c++, riscv64-unknown-elf-c++filt, riscv64-unknown-elf-cpp, riscv64-unknown-elf-elfedit, riscv64-unknown-elf-g++, riscv64-unknown-elf-gcc, riscv64-unknown-elf-gcc-12.2.0, riscv64-unknown-elf-gcc-ar, riscv64-unknown-elf-gcc-nm, riscv64-unknown-elf-gcc-ranlib, riscv64-unknown-elf-gcov, riscv64-unknown-elf-gcov-dump, riscv64-unknown-elf-gcov-tool, riscv64-unknown-elf-gdb, riscv64-unknown-elf-gdb-add-index, riscv64-unknown-elf-gprof, riscv64-unknown-elf-ld, riscv64-unknown-elf-ld.bfd, riscv64-unknown-elf-lto-dump, riscv64-unknown-elf-nm, riscv64-unknown-elf-objcopy, riscv64-unknown-elf-objdump, riscv64-unknown-elf-ranlib, riscv64-unknown-elf-readelf, riscv64-unknown-elf-run, riscv64-unknown-elf-size, riscv64-unknown-elf-strings, riscv64-unknown-elf-strip, riscv64-unknown-linux-gnu-addr2line, riscv64-unknown-linux-gnu-ar, riscv64-unknown-linux-gnu-as, riscv64-unknown-linux-gnu-c++, riscv64-unknown-linux-gnu-c++filt, riscv64-unknown-linux-gnu-cpp, riscv64-unknown-linux-gnu-elfedit, riscv64-unknown-linux-gnu-g++, riscv64-unknown-linux-gnu-gcc, riscv64-unknown-linux-gnu-gcc-12.2.0, riscv64-unknown-linux-gnu-gcc-ar, riscv64-unknown-linux-gnu-gcc-nm, riscv64-unknown-linux-gnu-gcc-ranlib, riscv64-unknown-linux-gnu-gcov, riscv64-unknown-linux-gnu-gcov-dump, riscv64-unknown-linux-gnu-gcov-tool, riscv64-unknown-linux-gnu-gdb, riscv64-unknown-linux-gnu-gdb-add-index, riscv64-unknown-linux-gnu-gfortran, riscv64-unknown-linux-gnu-gprof, riscv64-unknown-linux-gnu-ld, riscv64-unknown-linux-gnu-ld.bfd, riscv64-unknown-linux-gnu-lto-dump, riscv64-unknown-linux-gnu-nm, riscv64-unknown-linux-gnu-objcopy, riscv64-unknown-linux-gnu-objdump, riscv64-unknown-linux-gnu-ranlib, riscv64-unknown-linux-gnu-readelf, riscv64-unknown-linux-gnu-run, riscv64-unknown-linux-gnu-size, riscv64-unknown-linux-gnu-strings, riscv64-unknown-linux-gnu-strip
Submitter: sickcodes
Maintainer: supergarfield
Last Packager: sickcodes
Votes: 4
Popularity: 0.067264
First Submitted: 2021-09-22 01:23 (UTC)
Last Updated: 2022-12-09 07:11 (UTC)

Pinned Comments

sickcodes commented on 2021-09-20 10:27 (UTC)

If this package is out of date for a day or two while I catch up, you can use change the nightly release date as specified in the releases page: https://github.com/riscv-collab/riscv-gnu-toolchain/releases

Pull requests: https://github.com/sickcodes/aur

Latest Comments

1 2 Next › Last »

mrms commented on 2024-03-17 15:04 (UTC)

Hey @supergarfield and @sickcodes. Are any of you two still planning on maintaining this package? If not, I'd be glad to step up as a maintainer.

sickcodes commented on 2022-12-10 06:53 (UTC)

If anyone wants to maintain or has a better PKGBUILD feel free

leuko commented on 2022-10-19 09:34 (UTC) (edited on 2022-10-19 09:49 (UTC) by leuko)

The package cannot be installed along with gcc:

...
error: failed to commit transaction (conflicting files)
riscv-gnu-toolchain-bin: /usr/share/gcc-12.2.0/python/libstdcxx/__init__.py exists in filesystem (owned by gcc)
...
  1. 11.1.0 must be replaced with 12.2.0.
  2. Also noticed that _target is unused.

Update: There is already a PR

quite commented on 2022-09-07 05:58 (UTC)

OK so this package is still just downloading the binaries, and is essentially (or completely) the same as riscv-gnu-toolchain-bin. Would be great if you make this package build from sources, or remove it? But many thank yous for packaging!

sickcodes commented on 2022-07-25 14:56 (UTC)

Hey @supergarfield I added you as a comaintainer if you'd like, or if you would like to maintain this just let me know

supergarfield commented on 2022-04-08 02:10 (UTC)

Yeah, same problem as @maleadt. I changed the PKGBUILD as follows and it looks like it fixed the issue:

(Some changes like checksums are not actually necessary, of course)

diff --git a/PKGBUILD b/PKGBUILD
index 504a44b..633333f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,8 @@ provides=(${pkgname}
 )
 depends=()
 optdepends=()
-makedepends=(curl python3 libmpc mpfr gmp texinfo gperf libtool patchutils bc zlib expat)
+makedepends=()
+options=(!strip)
 source=(
   "https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${pkgver}/riscv32-elf-${_pkg_prefix}-${pkgver}-nightly.tar.gz"
   "https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${pkgver}/riscv32-glibc-${_pkg_prefix}-${pkgver}-nightly.tar.gz"
@@ -26,42 +27,23 @@ source=(
   "https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/${pkgver}/riscv64-glibc-${_pkg_prefix}-${pkgver}-nightly.tar.gz"
 )
 # skipping shasums due to size
-sha256sums=(
-  'SKIP'
-  'SKIP'
-  'SKIP'
-  'SKIP'
-)
+sha256sums=('adef8ca8c24b237e9c2090b508fc44c0202f86362eb4f4dfe9698e4603973b66'
+            '3de9818ccc9d15d20a3e305b2409274a407320f8ec83cb4f79750845d90d2b3b'
+            '14d3415e671283b2f1de493ade1b69807a72242b237dca35b5b23a8e20c7e8ac'
+            '1654499b4bf014fc3e54a96512dd0174bd02ffd30fd4e5bb04518a7a21965bb0')

 package() {
-  
-  rm -rf "${srcdir}"/riscv/sysroot
-  rm -rf "${srcdir}"/riscv/riscv64-unknown-linux-gnu
-  rm -rf "${srcdir}"/riscv/riscv32-unknown-linux-gnu
-  rm -rf "${srcdir}"/riscv/riscv64-unknown-elf
-  rm -rf "${srcdir}"/riscv/riscv32-unknown-elf
-
-  install -dm755 ${pkgdir}/usr/libexec
-  install -dm755 ${pkgdir}/usr/share
-  install -dm755 ${pkgdir}/usr/bin
-  install -dm755 ${pkgdir}/usr/lib
+  install -dm755 "${pkgdir}"/usr/

-  cp -pvr "${srcdir}"/riscv/libexec/* "${pkgdir}"/usr/libexec/
-  cp -pvr "${srcdir}"/riscv/share/* "${pkgdir}"/usr/share/
-  cp -pvr "${srcdir}"/riscv/bin/* "${pkgdir}"/usr/bin/
-  cp -pvr "${srcdir}"/riscv/lib/* "${pkgdir}"/usr/lib/
+  cp -pr "${srcdir}"/riscv/* "${pkgdir}"/usr/

-  # strip host binaries
-  find "${pkgdir}"/usr/bin/ "${pkgdir}"/usr/lib/gcc/ -type f -and \( -executable \) -exec strip '{}' \;
-
-  # Remove existing conflicts
+  # Remove existing conflicts with gcc and other packages
+  rm -rf "${pkgdir}"/usr/include/gdb/jit-reader.h
   rm -rf "${pkgdir}"/usr/share/man/man7
   rm -rf "${pkgdir}"/usr/lib/libcc1.so*
   rm -rf "${pkgdir}"/usr/lib/bfd-plugins/libdep.so
-  rm -rf "${pkgdir}"/usr/share/gcc-11.1.0/python/libstdcxx
   rm -rf "${pkgdir}"/usr/share/gdb/python/gdb
   rm -rf "${pkgdir}"/usr/share/gdb/syscalls
   rm -rf "${pkgdir}"/usr/share/gdb/system-gdbinit
   rm -rf "${pkgdir}"/usr/share/info
-
 }

maleadt commented on 2021-12-04 21:53 (UTC)

How do you use the RISCV toolchain as packaged here? GCC seems confused by everything existing in /usr/bin and falls back to the host as which obviously does not work:

$ riscv64-unknown-elf-gcc dummy.c -march=rv32im -mabi=ilp32  -v
[...]
 as -v --traditional-format -march=rv32im -march=rv32im -mabi=ilp32 -o /tmp/cckCT3Al.o /tmp/ccOBmH6G.s
GNU assembler version 2.36.1 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.36.1
Assembler messages:
Fatal error: invalid -march= option: `rv32im'

Extracting the upstream binaries in their own folder (e.g. /opt/riscv-gnu-toolchain) does result in a working compiler.

sickcodes commented on 2021-09-22 01:27 (UTC)

Thank you felix, I moved the nightly style build to https://aur.archlinux.org/packages/riscv-gnu-toolchain-bin/

I will modify this PKGBUILD to create from source.

Secondly, thanks for confirming that it's okay to get creative with pkgver()!

I will adjust any other, or future -git packages :)

felixonmars commented on 2021-09-21 18:04 (UTC)

-git ones are supposed to using git sources and do not need any changes to always point to the latest source (with the help of a pkgver() function). This package could build from source of a tag (pre-released one works too imho, if there is no stable release).

I agree that you should move the current downloading-binary one to -bin :)

sickcodes commented on 2021-09-21 17:55 (UTC)

Hey Felix, thanks for the feedback as I was considering making a -git version for built versions.

Alternatively, should I move this rendition to -bin and replace this with the build from sources one with the extra flags instead of using -git?