Commit b905116f authored by Sören Tempel's avatar Sören Tempel Committed by Leo
Browse files

main/ccache: enable support for file cloning on ppc64le

parent ee4e2c49
......@@ -2,21 +2,17 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ccache
pkgver=4.3
pkgrel=0
pkgrel=1
pkgdesc="fast C/C++ compiler cache"
options="!check" # fails on builders, passes on CI
url="https://ccache.dev/"
arch="all"
license="GPL-3.0-or-later"
makedepends="cmake zstd-dev asciidoc perl"
makedepends="cmake zstd-dev asciidoc perl linux-headers"
checkdepends="bash"
subpackages="$pkgname-doc"
source="https://github.com/ccache/ccache/releases/download/v$pkgver/ccache-$pkgver.tar.xz"
case $CARCH in
ppc64le) ;; # https://github.com/ccache/ccache/issues/820
*) makedepends="$makedepends linux-headers" ;;
esac
source="https://github.com/ccache/ccache/releases/download/v$pkgver/ccache-$pkgver.tar.xz
ioctl.patch"
build() {
cmake -B build \
......@@ -44,4 +40,5 @@ package() {
sha512sums="
ec082de95ea8b22154ce1e67e0a0fc28266cfb71f382205f7eab14e6ac1c7841027d063041131832b3227d833d99ec874e90df238f35f433de4c381566931c7f ccache-4.3.tar.xz
7780c932beeb4ae4965a1f7c8f235fa586aa65ae4768599834e441447c84be29fbf5915cbb500333b0a239a2e7552d76717f88d1f1a341ca121a9c8772518ef1 ioctl.patch
"
musl uses an `int` instead of a `unsigend long` for the ioctl function
prototype, contrary to glibc, since POSIX mandates the former. This
causes a spurious error on ppc64le which can be silenced by casting to
int explicitly.
See https://www.openwall.com/lists/musl/2020/01/20/2
diff -upr ccache-4.3.orig/src/Util.cpp ccache-4.3/src/Util.cpp
--- ccache-4.3.orig/src/Util.cpp 2021-10-26 20:08:52.043967336 +0200
+++ ccache-4.3/src/Util.cpp 2021-10-26 20:09:08.797534622 +0200
@@ -246,7 +246,7 @@ clone_file(const std::string& src, const
}
}
- if (ioctl(*dest_fd, FICLONE, *src_fd) != 0) {
+ if (ioctl(*dest_fd, (int)FICLONE, *src_fd) != 0) {
throw Error(strerror(errno));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment