ccache-cross-symlinks: all arches, relative, clang (!299)
Create symlinks for all supported arches (armhf, armv7, aarch64, x86_64, x86), not only armhf and aarch64. Skip creating symlinks for the arch that the package gets built for, so we can include x86_64 in the list without conflicting with the ccache package from Alpine. Link to ../../../bin/ccache instead of /usr/bin/ccache, so it works properly with crossdirect (where we mount the native chroot to /native in the foreign chroot). Add symlinks for clang and clang++.
This commit is contained in:
parent
f540943f0c
commit
9c90da7969
1 changed files with 12 additions and 5 deletions
|
@ -4,8 +4,8 @@
|
||||||
# ccache, which can then cache the results.
|
# ccache, which can then cache the results.
|
||||||
|
|
||||||
pkgname=ccache-cross-symlinks
|
pkgname=ccache-cross-symlinks
|
||||||
pkgver=1
|
pkgver=2
|
||||||
pkgrel=4
|
pkgrel=0
|
||||||
pkgdesc="Enable ccache for cross-compilers with symlinks"
|
pkgdesc="Enable ccache for cross-compilers with symlinks"
|
||||||
url="https://ccache.samba.org/"
|
url="https://ccache.samba.org/"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -14,14 +14,21 @@ depends="ccache"
|
||||||
options="!check"
|
options="!check"
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
local _archs="armhf aarch64"
|
# Keep in sync with pmb.config.build_device_architectures
|
||||||
local _bins="c++ cc cpp g++ gcc"
|
local _archs="armhf armv7 aarch64 x86_64 x86"
|
||||||
|
|
||||||
|
local _bins="c++ cc cpp g++ gcc clang clang++"
|
||||||
mkdir -p "$pkgdir/usr/lib/ccache/bin"
|
mkdir -p "$pkgdir/usr/lib/ccache/bin"
|
||||||
cd "$pkgdir/usr/lib/ccache/bin"
|
cd "$pkgdir/usr/lib/ccache/bin"
|
||||||
for _arch in $_archs; do
|
for _arch in $_archs; do
|
||||||
|
if [ "$_arch" = "$CARCH" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
_hostspec="$(arch_to_hostspec $_arch)"
|
_hostspec="$(arch_to_hostspec $_arch)"
|
||||||
for _bin in $_bins; do
|
for _bin in $_bins; do
|
||||||
ln -v -s /usr/bin/ccache ${_hostspec}-${_bin}
|
# Relative symlink, so it works with crossdirect (pointing to
|
||||||
|
# /native/usr/bin/ccache)
|
||||||
|
ln -v -s ../../../bin/ccache ${_hostspec}-${_bin}
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue