Package Details: riscv-gnu-toolchain-bin 2024.11.22-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: Meta-package for a pre-compiled GNU toolchain for riscv32 and riscv64, linux and ELF.
Upstream URL: https://github.com/riscv-collab/riscv-gnu-toolchain
Licenses: GPL2
Submitter: sickcodes
Maintainer: gilbs
Last Packager: gilbs
Votes: 5
Popularity: 0.017081
First Submitted: 2021-09-22 01:23 (UTC)
Last Updated: 2024-11-22 08:01 (UTC)

Pinned Comments

gilbs commented on 2024-05-20 22:46 (UTC) (edited on 2024-06-20 20:24 (UTC) by gilbs)

Please refrain from flagging this package as out-of-date because it is a meta-package. Its dependencies are updated on a daily basis (depending on upstream releases), so wait a few days before marking those as out-of-date.

Rather than installing this huge meta-package, you might just prefer installing just the toolchains you need, among the following AUR packages I also maintain:

If you want to change something about the packaging, please send PRs here: https://framagit.org/gilbsgilbs/aur-packages/-/tree/main/pkg/riscv-gnu-toolchain-bin

Latest Comments

« First ‹ Previous 1 2

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?

felixonmars commented on 2021-09-21 17:09 (UTC)

Hi. Since this package is installing from pre-built binary packages, it should use the "-bin" suffix (e.g. riscv-gnu-toolchain-bin).

Also upstream is marking releases as pre-releases, so that a "-nightly" suffix may help too. I am not sure if they are going to make "stable" releases ever, so this is up to you (e.g. riscv-gnu-toolchain-nightly-bin).

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