Skip to content

Commit c24a531

Browse files
committed
riscv-none-elf-gcc-12-bin: add new pkg
add prebuilt binary package for Cross compiler for 32-bit and 64-bit RISC-V (The xPack GNU RISC-V Embedded GCC)
1 parent 1b14f9e commit c24a531

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Maintainer: matrikslee <[email protected]>
2+
3+
_target=riscv-none-elf
4+
_pkgname=$_target-gcc
5+
pkgname=$_pkgname-12-xpack-bin
6+
pkgver=12.3.0_2
7+
pkgrel=1
8+
pkgdesc='Cross compiler for 32-bit and 64-bit RISC-V (The xPack GNU RISC-V Embedded GCC)'
9+
arch=('arm' 'aarch64' 'x86_64')
10+
url='https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack'
11+
license=('GPL' 'LGPL')
12+
conflicts=("xpack-riscv-none-elf-gcc" "xpack-riscv-none-embed-gcc")
13+
depends=("libmpc")
14+
provides=("xpack-${_pkgname}"
15+
"${_target}-gdb" "${_target}-binutils" "${_target}-newlib")
16+
options=('!emptydirs' '!strip')
17+
source_arm=("${url}/releases/download/v${pkgver//_/-}/xpack-${_pkgname}-${pkgver//_/-}-linux-arm.tar.gz")
18+
source_aarch64=("${url}/releases/download/v${pkgver//_/-}/xpack-${_pkgname}-${pkgver//_/-}-linux-arm64.tar.gz")
19+
source_x86_64=("${url}/releases/download/v${pkgver//_/-}/xpack-${_pkgname}-${pkgver//_/-}-linux-x64.tar.gz")
20+
sha256sums_arm=('79d7859b8ab7ead40bd34a0ea14d063f02ada92cc24c8ef98416681008bb2bce')
21+
sha256sums_aarch64=('09343a15feafa1b370436d806dc4efba5bce02586ef7f317a894c16615213c27')
22+
sha256sums_x86_64=('9921d63c04611954af016b9ca74cd52c1ccb832800d321d67e4e651f16146d16')
23+
24+
package() {
25+
install -dm755 ${pkgdir}/opt/xpack/${_pkgname}
26+
27+
cp -a ${srcdir}/xpack-${_pkgname}-${pkgver//_/-}/* ${pkgdir}/opt/xpack/${_pkgname}/
28+
29+
# Strip target binaries
30+
#find "$pkgdir/opt/xpack/${_pkgname}/lib/gcc/$_target/" -type f \
31+
# -and \( -name \*.a -or -name \*.o \) -exec $_target-objcopy \
32+
# -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames \
33+
# -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str \
34+
# -R .debug_ranges -R .debug_loc '{}' \;
35+
36+
# Strip host binaries
37+
# find "$pkgdir/opt/xpack/${_pkgname}/bin/" "$pkgdir/opt/xpack/${_pkgname}/libexec/gcc/$_target/" -type f \
38+
# -and \( -executable \) -exec strip '{}' \;
39+
40+
install -Dm0644 /dev/stdin "${pkgdir}/etc/profile.d/${_pkgname}.sh" << EOF
41+
#!/bin/sh
42+
[ -d /opt/xpack/${_pkgname}/bin ] && append_path '/opt/xpack/${_pkgname}/bin'
43+
44+
export PATH
45+
EOF
46+
}
47+
48+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
update_on:
2+
- source: manual
3+
manual: 12.3.0-2
4+
5+
maintainers:
6+
- github: matrikslee

0 commit comments

Comments
 (0)